Hi Philip,

Sorry for the delayed response. We've been busy catching up on deadlines. 
Anyway may I ask why this code, looping then redeploying?


  | while (true) {
  |                         jbpmConfiguration = null;
  |                         processDefinition = null;
  |                         jbpmContext = null;
  |                         processInstance = null;
  |                         try {
  |                                 jbpmConfiguration = 
JbpmConfiguration.getInstance();
  |                                 processDefinition = 
ProcessDefinition.parseXmlResource("MultipleEvent.par/processdefinition.xml");
  |                                 jbpmContext = 
jbpmConfiguration.createJbpmContext();
  |                                 
jbpmContext.deployProcessDefinition(processDefinition);
  |                                 processInstance = 
jbpmContext.loadProcessInstanceForUpdate(process_id);
  |                                 processInstance.resume();
  |                                 processInstance.signal();
  |                         }
  |                         finally {
  |                                 jbpmContext.close();
  |                         }
  |                 }

Just a quick thing. As I remeber, one JbpmSession allocates one DB connection. 
Like I said, its not good to hold on to connections very long bec. normally 
connections have timeouts, and connections are expensive resources.  As I've 
seen the code, it seems you are continually looping using the connection 
without releasing it. I would suggest recoding esp. the action handler part. 

Your action handler is denying your main connection to get closed, its like its 
hogging it. What I suggest is use asynhronous transactions instead that signals 
your state when finished. However, I am not quite familiar with the suspend 
part and what it does to the connection, so I still have to check this one out. 

Regards,

Elmo  



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3927102#3927102

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3927102


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to