[jboss-user] [jBPM] - Re: StaleObjectStateException on jBPM 5.1 running on JBoss 6.1

Linh Pham do-not-reply at jboss.com
Tue Apr 10 02:54:35 EDT 2012


Linh Pham [https://community.jboss.org/people/lpham1] created the discussion

"Re: StaleObjectStateException on jBPM 5.1 running on JBoss 6.1"

To view the discussion, visit: https://community.jboss.org/message/729055#729055

--------------------------------------------------------------
I have found out that the transaction annoation for my MDB was wrong. It should be using TransactionAttributeType.REQUIRED instead of REQUIRES_NEW.  I also double check all datasource configurations to make sure they are XA transactions.  With @ApplicationException, the default for rollback is FALSE, make sure it is TRUE so that the transaction can be rolledback and retried when exception occurs.

Having done all of the above, my transactions indeed retried and it was processed successfully upon retry.  To minimise the possibility of StaleObjectStateException, I invoke *ksession.dispose()* at the end after complete using ksession.

Hope this helps.

-- Linh
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/729055#729055]

Start a new discussion in jBPM at Community
[https://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/20120410/90659356/attachment.html 


More information about the jboss-user mailing list