[jboss-user] [jBPM Users] - Re: jBPM 4 and thread-safeness

tom.baeyens@jboss.com do-not-reply at jboss.com
Fri Sep 11 04:16:38 EDT 2009


good question/remark.

event listeners threadsafety in jbpm has a different meaning then threadsafe in general java.  so therefor, we should indeed update the docs and not use the word threadsafe for it.

in strickt java sense, nutable methods on threadsafe objects should be synchronized.  in jbpm sense, the only requirement is that you don't change your member fields in the execute method.  setters of event handlers don't have to be synchronized as this is done during initialization before jbpm will use the object.

in jbpm 3, a new delegation object was instantiated *for every usage* of an action (event listener).  in jbpm 4, we want to get to a situation that the event listener object becomes a part of the process definition object graph.  and hence it gets cached and used by all threads.

hth

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

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



More information about the jboss-user mailing list