[jboss-user] [jBPM Users] - Issues About JobExecutor in Jbpm 3.3.0GA
draculawong
do-not-reply at jboss.com
Mon Sep 28 03:57:12 EDT 2009
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:
public myMethod(){
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| .....
| jbpmContext.close();
| }
2.In jbpm.cfg.xml,if I set jobExecutor singleton="false" ,what will happen?
<bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor" singleton="true">
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?
public void close() {
| if ( (hasProducedJobs)
| && (jobExecutor!=null)
| ) {
| log.debug("messages were produced, job executor will be signalled");
| synchronized(jobExecutor) {
| jobExecutor.notify();
| }
| }
| }
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257257#4257257
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257257
More information about the jboss-user
mailing list