Hi all,
I have created a session bean (EJB 2.0) in which I am interacting with Hibernate 3.0 via DAO layer in RAD 7.0
The session bean will call a POJO which will initiate the Transaction .
This transaction will internally call another transaction. Transaction management has to be done using CMP.
The situation is like:
I have 4 independent methods in a session bean.
This bean calls to four different methods namely method1, method2, method3 and method4.
The method1, method2 and method4 are in one session and in one transaction.
Method3 is in a separate session and different transaction.
The container transaction has been set as “REQUIRED” for method1, method2 and method4 & “REQUIRES NEW” for method3.
The call goes like this –
Sessionbean()
{
Method1
Method2
Method3
Method4
}
In normal scenario things go well.
But if have any exception occurs in method4 then only method3 (which is in a separate session and transaction) should get committed and rest are to be rolled back
But here even method3 is getting Rolled back.
Any pointers?
_________________ Thanks
Gaurav
|