Package javax.transaction

Examples of javax.transaction.UserTransaction.begin()


        service = new SingleSessionCommandService( sessionId,
                                                   kbase,
                                                   config,
                                                   env );
        ut.begin();
        completeWorkItemCommand = new CompleteWorkItemCommand();
        completeWorkItemCommand.setWorkItemId( workItem.getId() );
        service.execute( completeWorkItemCommand );
        ut.commit();
View Full Code Here


        service = new SingleSessionCommandService( sessionId,
                                                   kbase,
                                                   config,
                                                   env );
        ut.begin();
        getProcessInstanceCommand = new GetProcessInstanceCommand();
        getProcessInstanceCommand.setProcessInstanceId( processInstance.getId() );
        processInstance = service.execute( getProcessInstanceCommand );
        ut.commit();
        assertNotNull( processInstance );
View Full Code Here

        service = new SingleSessionCommandService( sessionId,
                                                   kbase,
                                                   config,
                                                   env );
        ut.begin();
        completeWorkItemCommand = new CompleteWorkItemCommand();
        completeWorkItemCommand.setWorkItemId( workItem.getId() );
        service.execute( completeWorkItemCommand );
        ut.commit();
View Full Code Here

        service = new SingleSessionCommandService( sessionId,
                                                   kbase,
                                                   config,
                                                   env );
        ut.begin();
        getProcessInstanceCommand = new GetProcessInstanceCommand();
        getProcessInstanceCommand.setProcessInstanceId( processInstance.getId() );
        processInstance = service.execute( getProcessInstanceCommand );
        ut.commit();
        assertNull( processInstance );
View Full Code Here

     */
    public void testUsingClientTrans() throws Exception {
        // gets the transaction
        UserTransaction utx = ExceptionHandleUtil.getUserTransaction();
        // starts the transaction
        utx.begin();
        // creates a table in the second database
        ItfDatabaseManager slsbDatabaseManager = EJBHelper.getBeanRemoteInstance(SLSBDatabaseManager.class,
                ItfDatabaseManager.class);
        slsbDatabaseManager.insertTable(DATABASE_2, ItfContainerTransaction.TABLE);
        /*
 
View Full Code Here

     * @throws Exception if an error during the transaction occurs.
     */
    private void executeErrorTransaction() throws Exception {
        UserTransaction utx = getUserTransaction();
        // starts the transaction
        utx.begin();
        // call the method that must have the same transaction context
        sfsbContainerTransaction.insertCorrectTableInBothDB(DATABASE_1, DATABASE_2);
        // rollback the transaction
        utx.rollback();
    }
View Full Code Here

     * @output an exception when the method verifies if the table exists.
     * @throws Exception if an error occurs during the tests.
     */
    public void testSetRollbackOnlyWithUserTransaction() throws Exception {
        UserTransaction utx = getUserTransaction();
        utx.begin();
        try {
            ItfContainerTransaction sfsbContainerTransaction = getBean();
            // calls the setRollbackOnly
            try {
                sfsbContainerTransaction.setRollbackOnly(DATABASE_1, DATABASE_2);
View Full Code Here

     * @throws Exception if an error occurs during the tests.
     */
    public void testGetRollbackOnlyWithUserTransaction() throws Exception {
        UserTransaction utx = getUserTransaction();

        utx.begin();
        testGetRollbackOnly();
        utx.commit();
    }

    /**
 
View Full Code Here

     * @throws Exception if an error occurs during the tests.
     */
    @Override
    public void testGetUserTransactionWithEJBContext() throws Exception {
        UserTransaction utx = getUserTransaction();
        utx.begin();
        try {
            super.testGetUserTransactionWithEJBContext();
        } finally {
            utx.rollback();
        }
View Full Code Here

     * @throws Exception if an error occurs during the tests.
     */
    @Override
    public void testGetUserTransactionWithLookup() throws Exception {
        UserTransaction utx = getUserTransaction();
        utx.begin();
        try {
            super.testGetUserTransactionWithLookup();
        } finally {
            utx.rollback();
        }
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.