Examples of beginWork()


Examples of marauroa.server.db.TransactionPool.beginWork()

      props.put("jdbc_class", "com.mysql.jdbc.Driver");
      props.put("jdbc_user", "junittest");
      props.put("jdbc_pwd", "passwd");

      TransactionPool pool = new TransactionPool(props);
      pool.rollback(pool.beginWork());
      pool.close();
    } catch (Exception e) {
      throw new Exception("Database is not accessible. Please check \"marauroatest\" is created and that user \"junittest\" with password \"passwd\" can access it.", e);
    }
  }
View Full Code Here

Examples of marauroa.server.db.TransactionPool.beginWork()

   
    for (int i = 1122; i < 346000; i++) {
      System.out.println("> " + i);
      String cmd = "INSERT INTO itemlog_new (id, timedate, itemid, source, event, param1, param2, param3, param4)"
        + " SELECT id, timedate, itemid, source, event, param1, param2, param3, param4 FROM itemlog WHERE id >= " + (i * 100) + " AND id < "  + ((i+1) * 100);
      DBTransaction transaction = transactionPool.beginWork();
      transaction.execute(cmd, null);
      transactionPool.commit(transaction);
      System.out.println("< " + i);
      Thread.sleep(3000);
    }
View Full Code Here

Examples of marauroa.server.db.TransactionPool.beginWork()

        continue;
      }
      cmd.append(" " + line);
     
      if (cmd.indexOf(";") > -1) {
        DBTransaction transaction = transactionPool.beginWork();
        try {
          if (cmd.indexOf("DROP TABLE") != 0 && cmd.indexOf("CREATE TABLE") != 0) {
            transaction.execute(line, null);
          }
        } catch (SQLException e) {
View Full Code Here

Examples of marauroa.server.db.TransactionPool.beginWork()

    if (result != null) {
      return new CharacterResult(result, character, template);
    }

    final TransactionPool transactionPool = SingletonRepository.getTransactionPool();
    final DBTransaction trans = transactionPool.beginWork();
    final CharacterDAO characterDAO = DAORegister.get().get(CharacterDAO.class);

    try {
      if (characterDAO.hasCharacter(trans, character)) {
        logger.warn("Character already exist: " + character);
View Full Code Here

Examples of marauroa.server.db.TransactionPool.beginWork()

   *
   * @return Result.OK_CREATED on success
   */
  private AccountResult insertIntoDatabase() {
    final TransactionPool transactionPool = SingletonRepository.getTransactionPool();
    final DBTransaction transaction = transactionPool.beginWork();
    final AccountDAO accountDAO = DAORegister.get().get(AccountDAO.class);

    try {
      if (accountDAO.hasPlayer(transaction, username)) {
        logger.warn("Account already exist: " + username);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.