Hi Raj,

don't do it :-)

jBPM implements concurrent execution in a business process sense, NOT in a Java 
Thread sense. As you have to lock on processInstance anyway there is no real 
benefit in spawning two threads as one would always be waiting for the other so 
you might as well just use the jBPM Fork / Join nodes.

If your intention is real concurrency in the execution of long running task 
(find next prime number...) you would have to use a different approach. Send a 
JMS in an Action that triggers the task, return from the node (leaving it in a 
wait state) and let the executing MDB trigger the waiting token when it is 
finished. (Or check out the 3.1 async functionality, I haven't had a look at it 
yet.)

If you have two of these Actions in State nodes after your Fork you have real, 
Thread based concurrency.

If this sounds to complicated, check it out. Its not harder than what you are 
currently trying and it works :-)

Greetings



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

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to