This content has been marked as final.
Show 1 reply
-
1. Re: persisting exception information to db after transaction exceptions
gebuh Jun 20, 2012 10:24 AM (in response to gebuh)after much googling I found the problem. When the original exception is raised Seam marks the transaction for rollback. Because Seam doesn't have a way to require a new transaction (there's a Jira for this that has a patch attached but appears to be in limbo) and my method is called in the same transaction(I tried annotating it with Asynchronous, but didn't work) it blows up.
What I ended up doing - and I don't know if I'm creating a whole new problem was add this:
if(userTx.isRolledBackOrMarkedRollback()) { userTx.rollback(); }
inside my addExceptions method before I persist the exceptions data.