Ok, figured it out. It is because you are setting the tx as setRollbackOnly() before
interacting with the cache. The cache sees the transaction as being invalid (since its
state is not active) and does not associate any subsequent invocations with the
transaction.
I need to check with the JTA spec and see if this is a bug or expected behaviour, although
I suspect it would be a bug.
As a workaround, what you should do is make a cache call - even a simple one, like
cache.getRoot() - before any potential rollback call.
Also, raise a JIRA about this and assign it to me.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204071#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...