Reputation: 150
TX Requires_New: No transaction to suspend.
TX Requires_New : Started Transactions ... gerenimo TransactionImpl....
logs from methodB execution... completes.
methodC throws some RuntimeException
TX Requires_New : Rolling Back transaction...
============
Even though it says Transaction is being rolled back.. the database records saved through methodA() still appears in the database. I want the database inserts should be rolled back as well.
Can you please help me understand what might be going wrong?
Upvotes: 1
Views: 595
Reputation: 2981
The problem is that methodA, B and C are running in different Transactional Contexts, therefore, there are three different and independents transactions executing in isolation within your process.
Each appserver defines a transactional context which it's shared by the EJBs deployed in the same server.
When you make a call to an EJB running in a remote server, the current transaction is not used.
You have to implement a distributed transaction if you want to share the same transaction over different remote servers.
Upvotes: 0