Package org.jbpm.job.executor

Examples of org.jbpm.job.executor.JobExecutor


  private JbpmConfiguration jbpmConfiguration;

  public void contextInitialized(ServletContextEvent event) {
    String jbpmCfgResource = event.getServletContext().getInitParameter("jbpm.configuration.resource");
    jbpmConfiguration = JbpmConfiguration.getInstance(jbpmCfgResource);
    JobExecutor jobExecutor = jbpmConfiguration.getJobExecutor();
    if (jobExecutor != null)
      jobExecutor.start();
  }
View Full Code Here


    if (jobExecutor != null)
      jobExecutor.start();
  }

  public void contextDestroyed(ServletContextEvent event) {
    JobExecutor jobExecutor = jbpmConfiguration.getJobExecutor();
    if (jobExecutor != null)
      jobExecutor.stop();
  }
View Full Code Here

    @Override
    protected void startService()
        throws Exception
    {
        final JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance() ;
        final JobExecutor jobExecutor = jbpmConfiguration.getJobExecutor() ;
        if (jobExecutor != null)
        {
            jobExecutor.start() ;
        }
        final JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext() ;
        jbpmContext.close() ;
        super.startService();
    }
View Full Code Here

    protected void stopService()
        throws Exception
    {
        super.stopService();
        final JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance() ;
        final JobExecutor jobExecutor = jbpmConfiguration.getJobExecutor() ;
        if (jobExecutor != null)
        {
            jobExecutor.stopAndJoin() ;
        }
        jbpmConfiguration.close() ;
    }
View Full Code Here

        if (isDebugEnabled)
        {
            logger.debug("Sent signal task to message service for token id " + tokenId + " from process instance " + processInstanceId) ;
        }
       
        final JobExecutor jobExecutor = jbpmContext.getJbpmConfiguration().getJobExecutor() ;
        if (jobExecutor != null)
        {
            final TransactionStrategy transactionStrategy = TransactionStrategy.getTransactionStrategy(true) ;
            try
            {
View Full Code Here

    log.debug("saved job["+job.getId()+", "+job.getClass().getName()+"]");
    hasProducedJobs = true;
  }

  public void close() {
    JobExecutor jobExecutor = jbpmConfiguration.getJobExecutor();
    if ( (hasProducedJobs)
         && (jobExecutor!=null)
       ) {
      log.debug("messages were produced the jobExecutor will be signalled");
      synchronized(jobExecutor) {
        jobExecutor.notify();
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.jbpm.job.executor.JobExecutor

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.