1 Reply Latest reply on Oct 17, 2009 6:23 AM by Ronald van Kuijk

    Question about jbpm session and jobexecutor in jbpm3.3.0GA

    James Wang Newbie

      Hi,

      I had a few questions about job executor and jbpmcontext,

      1.Do we need to close jbpmContext every time after we used it?Like:
      Code:

      public myMethod(){
      JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
      .....
      jbpmContext.close();
      }



      2.In jbpm.cfg.xml,if I set jobExecutor singleton="false" ,what will happen?
      Code:





      3.In the jbpm source code ,there is a class DbMessageService.java,below is source code of this class,Could any one tell me why use "synchronized" here?
      Code:

      public void close() {
      if ( (hasProducedJobs)
      && (jobExecutor!=null)
      ) {
      log.debug("messages were produced, job executor will be signalled");
      synchronized(jobExecutor) {
      jobExecutor.notify();
      }
      }
      }