I am facing a strange problem regarding transaction handling in 'ejb + spring + hibernate' application. There is a need for me to create / update 5 tables (One master and 4 associated tables) in database in one shot. The thing works fine when I test with happy scenario. But when I try to crash the system, four reference tables get updated, but the master table. I am wondering why this happens, coz the system should delete updated records from the reference tables ideally.
I have set the following in spring mapping file to say I am using jboss transaction manager.
I am catching generic 'Exception' in the session bean (just to test), and have set the following:
But strangely, the application doesn't go into the catch block. So it looks like everything is ok. But when the application leaves the method it gives the following error :
11:53:16,309 ERROR [LogInterceptor] TransactionRolledbackException in method: public abstract com.... SomeException,java.rmi.RemoteException, causedBy:
org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=Asiri/19, BranchQual=, localId=19] status=STATUS_NO_TRANSACTION
If anyone has encountered a similar problem and managed solve it out, please help me in this regard.
Thanks in Advance,