Hello Friends, I have a sitiuation, where my SessionBean (say 'A') invokes SessionBean (say 'B') on another appserver. B makes some database updates and returns some values to 'A'. On the basis of the value retrieved from 'B', 'A' updates the database. Now my problem is if due some reason 'A' fails to update the database, than the changes made by 'B' should be rolled back.
I have set Transaction attributes for 'A' as requiresNew and for 'B' as required. But somehow it doesn't seems to work. I am using oracle 10gAS, and windows 2000.
Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
I think we can propagate transaction across different containers. This is also known as "two phase commit".
I think the problem amy be with the prograaming code at EJB A or EJB B.
Generally the EJBException should be propagated up to the Container. i.e we should not catch EJBException or RemoteException, if caught it should be rethrown again, so that the container will come to know that the exception has occured and then the container will rollback transaction. I am assuming that the container is responsible for managing transactions.