[jboss-user] [jBPM] - Pessimistic locking in a clustered environment
des kane
do-not-reply at jboss.com
Fri Apr 9 08:42:46 EDT 2010
des kane [http://community.jboss.org/people/kaned] created the discussion
"Pessimistic locking in a clustered environment"
To view the discussion, visit: http://community.jboss.org/message/536554#536554
--------------------------------------------------------------
Hi,
Our first implementation of jBPM uses 3.2.6 and we need to cater for concurrent users in a clustered Tomcat environment.
More specifically we need to ensure that when we update a process definition, it is "locked" until the update completes and any other threads wait until the lock is released before being able to read or write the process definition.
We were under the impression (advice given by a Redhat consultant) that the
getProcessInstanceForUpdate(processInstanceId) method on the JbpmContext class would carry out a "SELECT FOR UPDATE" at the database level and we have implemented our solution around this.
However, having read the java doc for this method -
http://docs.jboss.org/jbpm/v3/javadoc/org/jbpm/JbpmContext.html#loadProcessInstanceForUpdate(long) (http://docs.jboss.org/jbpm/v3/javadoc/org/jbpm/JbpmContext.html#loadProcessInstanceForUpdate(long)
it simply states that it is a convenience class that means that will automatically save the updates to the process instance when the context is closed.
I've seen anothe post that suggests we need to apply the SELECT FOR UPDATE lock programatically
http://community.jboss.org/message/373432#373432
Can someone confirm the way to apply pessimistic locking in a clustered environment ?
Cheers,
Des Kane.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/536554#536554]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100409/f5af0d56/attachment.html
More information about the jboss-user
mailing list