Right on.

Basically every non-read access to any element of a processInstance should be 
inside of a lock on the processInstance.

Logs are written, variables set, etc. etc. There are many reasons why this is 
required.

You cannot however use synchronized(). This locks on the Java Object, not on 
the processInstance as entity. If you were retrieing the processInstance in 
another Thread Hibernate would probably give you a different Java Object 
instance representing the same processInstance and synchronize would not work.

GraphSession has a lockProcessInstance() method that will lock by way oh 
database.

Greetings

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

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


-------------------------------------------------------
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