[jbpm-dev] [Design of JBoss jBPM] - statefull vs stateless delegation classes

tom.baeyens@jboss.com do-not-reply at jboss.com
Wed Feb 18 03:16:26 EST 2009


can we safely assume that all delegation classes are stateless ?

when a process calls out to a user class, this can be done by specifying the classname and some configuration injections.  there are various use cases of delegation classes: Assigner's (aka AssignmentHandlers), EventListeners (aka Actions) and so on.

with delegation classes being stateless i mean that execution of those delegation classes will not update their member field.  so after construction (incl injecting configuration) they can be considered immutable.

if that is the case, those objects become thread safe and cacheble.

we didn't assume this in jbpm 3 and hence instantiated each object each time as there is no good way of introducing caching.

so...

can we safely assume that all delegation classes are stateless as the default ?

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

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



More information about the jbpm-dev mailing list