Examples of startTransaction()


Examples of net.yura.lobby.database.impl.JPADatabase.startTransaction()

    @Test
    public void testSaveGame() {
        System.out.println("saveGame");
        Database database = new JPADatabase();
       
        database.startTransaction();
        GameTypeRoom gameTypeRoom = database.getGameTypes().iterator().next();
        database.endTransaction();
       
        User user = new User();
       
View Full Code Here

Examples of net.yura.lobby.database.impl.JPADatabase.startTransaction()

        GameTypeRoom gameTypeRoom = database.getGameTypes().iterator().next();
        database.endTransaction();
       
        User user = new User();
       
        database.startTransaction();
        database.saveUser(user);
        database.endTransaction();
       
        GameRoom gameRoom = new GameRoom();
        gameRoom.setName("Test Game Room");
View Full Code Here

Examples of net.yura.lobby.database.impl.JPADatabase.startTransaction()

        gameTypeRoom.getGameRooms().add(gameRoom);
       
        gameRoom.getUsers().add(user);
        user.getGames().add(gameRoom);
       
        database.startTransaction();
        database.saveGame(gameRoom);
        database.endTransaction();

        User user2 = new User();
       
View Full Code Here

Examples of org.apache.aurora.scheduler.storage.log.LogManager.StreamManager.startTransaction()

  @Test
  public void testStreamManagerSuccessiveCommits() throws CodingException {
    control.replay();

    StreamManager streamManager = createNoMessagesStreamManager();
    StreamTransaction streamTransaction = streamManager.startTransaction();
    streamTransaction.commit();

    assertNotSame("Expected a new transaction to be started after a commit",
        streamTransaction, streamManager.startTransaction());
  }
View Full Code Here

Examples of org.apache.aurora.scheduler.storage.log.LogManager.StreamManager.startTransaction()

    StreamManager streamManager = createNoMessagesStreamManager();
    StreamTransaction streamTransaction = streamManager.startTransaction();
    streamTransaction.commit();

    assertNotSame("Expected a new transaction to be started after a commit",
        streamTransaction, streamManager.startTransaction());
  }

  @Test
  public void testTransactionEmpty() throws CodingException {
    control.replay();
View Full Code Here

Examples of org.apache.aurora.scheduler.storage.log.LogManager.StreamManager.startTransaction()

    expectFrames(position1, message);

    control.replay();

    StreamManager streamManager = createStreamManager(message.chunkSize);
    StreamTransaction transaction = streamManager.startTransaction();
    transaction.add(saveFrameworkId);

    Position position = transaction.commit();
    assertSame(position1, position);
  }
View Full Code Here

Examples of org.apache.aurora.scheduler.storage.log.LogManager.StreamManager.startTransaction()

        throw new UnsupportedOperationException();
      }
    };

    final StreamManager streamManager = new StreamManager(mockStream, false, message1.chunkSize);
    StreamTransaction tr1 = streamManager.startTransaction();
    tr1.add(op1);

    Thread snapshotThread = new Thread() {
      @Override
      public void run() {
View Full Code Here

Examples of org.apache.aurora.scheduler.storage.log.LogManager.StreamManager.startTransaction()

    tr1.add(op1);

    Thread snapshotThread = new Thread() {
      @Override
      public void run() {
        StreamTransaction tr2 = streamManager.startTransaction();
        tr2.add(op2);
        try {
          message1Started.await();
          tr2.commit();
        } catch (CodingException | InterruptedException e) {
View Full Code Here

Examples of org.apache.isis.applib.services.command.spi.CommandService.startTransaction()

        final CommandService commandService = getServiceOrNull(CommandService.class);
        if(commandService == null) {
            return;
        }
        final Command command = commandContext.getCommand();
        commandService.startTransaction(command, transactionId);
    }


    /**
     * @return - the service, or <tt>null</tt> if no service registered of specified type.
View Full Code Here

Examples of org.apache.isis.applib.services.command.spi.CommandService.startTransaction()

        final CommandService commandService = getServiceOrNull(CommandService.class);
        if(commandService == null) {
            return;
        }
        final Command command = commandContext.getCommand();
        commandService.startTransaction(command, transactionId);
    }


    /**
     * @return - the service, or <tt>null</tt> if no service registered of specified type.
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.