Ed, Tom,

Yes, I do think it is a problem. 
In nearly any real-life application the process definition has to be accessed 
from many threads, each working with own process instance. For simplicity lets 
assume that they are all based on the same process definition. All  process 
instances are on the different stages of the process. As soon as you send 
signal to the process instance JBPM will try to access the corresponding 
process definition internally. Process definition will have to read some 
additional data from the database using Hibernate session it was attached to. 
With multiple process instances processed in different threads there will be 
sooner or later the situation when the same hibernate session will be used to 
read different parts (or even the same part) of the process definition in the 2 
or more threads .
I think it is clear that it is not feasible to sync. all the accesses to the 
process instances.
In my case I wrote some generic code that initializes recursively all the 
associations of the process definition whenever new process definition is 
loaded for the first time. I just didn't want to modify JBPM hbm files. But I 
do not see the reason to have lazy loading for the process definition, 
considering the problems it causes. At least for the cases that I would 
consider as a mainstream: few process definitions and  many process instances 
(each instance requiring some part of the process definition for further 
processing).

Andrey.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042429
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to