Package org.camunda.bpm.engine.impl.cfg

Examples of org.camunda.bpm.engine.impl.cfg.TransactionListener


    if (entityManager == null) {
      entityManager = getEntityManagerFactory().createEntityManager();
     
      if(handleTransactions) {
        // Add transaction listeners, if transactions should be handled
        TransactionListener jpaTransactionCommitListener = new TransactionListener() {
          public void execute(CommandContext commandContext) {
            if (isTransactionActive()) {
              entityManager.getTransaction().commit();
            }
          }
        };
       
        TransactionListener jpaTransactionRollbackListener = new TransactionListener() {
          public void execute(CommandContext commandContext) {
            if (isTransactionActive()) {
              entityManager.getTransaction().rollback();
            }
          }
View Full Code Here


  }

  protected void hintJobExecutor(JobEntity job) {
    JobExecutor jobExecutor = Context.getProcessEngineConfiguration().getJobExecutor();
    JobExecutorContext jobExecutorContext = Context.getJobExecutorContext();
    TransactionListener transactionListener = null;
    if(!job.isSuspended()
            && job.isExclusive()
            && jobExecutorContext != null
            && jobExecutorContext.isExecutingExclusiveJob()) {
      // lock job & add to the queue of the current processor
View Full Code Here

  }

  protected void hintJobExecutor(JobEntity job) {
    JobExecutor jobExecutor = Context.getProcessEngineConfiguration().getJobExecutor();
    JobExecutorContext jobExecutorContext = Context.getJobExecutorContext();
    TransactionListener transactionListener = null;
    if(!job.isSuspended()
            && job.isExclusive()
            && jobExecutorContext != null
            && jobExecutorContext.isExecutingExclusiveJob()) {
      // lock job & add to the queue of the current processor
View Full Code Here

    if (entityManager == null) {
      entityManager = getEntityManagerFactory().createEntityManager();
     
      if(handleTransactions) {
        // Add transaction listeners, if transactions should be handled
        TransactionListener jpaTransactionCommitListener = new TransactionListener() {
          public void execute(CommandContext commandContext) {
            if (isTransactionActive()) {
              entityManager.getTransaction().commit();
            }
          }
        };
       
        TransactionListener jpaTransactionRollbackListener = new TransactionListener() {
          public void execute(CommandContext commandContext) {
            if (isTransactionActive()) {
              entityManager.getTransaction().rollback();
            }
          }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.cfg.TransactionListener

Copyright © 2018 www.massapicom. 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.