-
1. Re: Wildfly11 not rolling back EJB 2 (CMT) Transactions
grossmeister_g Oct 24, 2018 7:38 AM (in response to sganta07)1 of 1 people found this helpfulHi,
what kind of exception are we talking about? You need to distinguish between checked and unchecked exceptions. If it is a unchecked exception (e.g. RuntimeException) the container will do the rollback automatically. If it is a checked Exception (e.g. public void perform() throws IOException), then no rollback is performed.
This one might help you find further informations:
java - EJB3 transaction rollback - Stack Overflow
P.S. I saw you're talking about EJB2. I'm only familiar with EJB3 but i suppose the container might behave similarly. -
2. Re: Wildfly11 not rolling back EJB 2 (CMT) Transactions
sganta07 Oct 25, 2018 4:10 PM (in response to grossmeister_g)Hi,
Thanks for your reply. when we throw an unchecked exception (RuntimeException) such as EJBException the container is rolling back the transaction. where as if we throw a checked exception the container is not rolling back even though we have jta='true' in datasource.xml.
please let me know whether I am missing anything here.
Thanks in advance