I did the locking in the following way:
if (message != null) {
| jbpmContext.getSession().lock(message, LockMode.UPGRADE);
| checkForMoreMessages = true;
| Command command = (Command) message;
| command.execute();
| jbpmContext.save(message.getToken().getProcessInstance());
| jbpmContext.getSession().delete(message);
| }
| session.getTransaction().commit();
|
I implemented MyDbMessageService, because DbMessageService deletes the message from the
session before it returns it (and before I can lock it in the CommandExecutor).
The message is now deleted in the CommandExecutor after locking it.
It is not possible to simply extend jBPM classes if they are not in the same package.
This is because many jBPM classes don't use 'protected' fields, but ones with
package-local access.
For now I didn't try clustering with the CommandExecutor, I did only the locking part.
Also I can't use JMS.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960262#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...