Package org.jbpm.tx

Examples of org.jbpm.tx.Transaction.addListener()


        AfterTxCompletionListener afterTxCompletionListener = new AfterTxCompletionListener(
                execution,
                exception,
                environment.getEnvironmentFactory()
        );
        transaction.addListener(afterTxCompletionListener, Transaction.EVENT_AFTERCOMPLETION);
        log.finest("registering exception handler to "+transaction);
        throw new PvmException("transaction exception handler registered handler after transaction completed.  make sure this transaction is rolled back", exception);
      } else {
        throw new PvmException("no transaction present in the environment for transactional exception handler", exception);
      }
View Full Code Here


    Transaction transaction = environment.getTransaction();
    transaction.setRollbackOnly();

    CommandService commandService = (CommandService) environment.get(CommandService.class);
    JobExceptionHandler jobExceptionHandler = new JobExceptionHandler(job.getDbid(), exception, commandService);
    transaction.addListener(jobExceptionHandler, Transaction.EVENT_AFTERCOMPLETION);
  }
}
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.