I have deployed 2 ejbs (EJB1 and EJB2) with RequiresNew transaction attributes in IBM WSAD 5.1. The reis one method process() in EJB1 which internally calls a POJO. This POJO calls the executeLogic() method in EJB2 which performs a database insert and database update using Hibernate. Upon returning successfully from EJB2.executeLogic(), the POJO throws an exception.
This exception is caught by EJB1 and sessionCOntext.setRollbackOnly() is called. Unfortunately, this rolls back the entries posted by EJB2. Ideally I believe this should not happen because they both are deployed with RequiresNew transaction attributes for all methods.
Can anyone help me with this issue ? Please respond. Thanx.