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&...]