Hi,

I want to run jBPM in a 2-way cluster, but I saw that the CommandExecutor loads 
the messages without locking and processes them.

The problem is, when there is one CommandExecutor on each machine, both could 
load and process the same message, isn't it?

The query named "MessagingSession.findMessages" for selecting the messages is 
in the hibernate.queries.hbm.xml file, but it loads all messages at once.

How can I modify jBPM to do a row lock on only the message currently being 
processed? It is critical that no message is processed by both CommandExecutors.

Would it be enough to place the line in bold into the executeCommand() method 
of the CommandExecutorThread class:

...
message = dbMessageService.receiveNoWait(destination);
jbpmContext.getSession().lock(message, LockMode.UPGRADE);

?

The second problem would be how to make the CommandExecutor to skip the locked 
messages.

Thanx in advance

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

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


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to