General J2EE: RollbackException WAS6.0
I have a simple POJO part of an EAR deployed on server instance A and an EJB part of different EAR deployed on server instance B on the same machine. both talk to same database. pojo is calling a DAO within the same EAR and doing some insert/update functions and also the EJB on server instance B. I have all my operations within a UserTransaction. UT=(UT)ctx.lookup("java:comp/UserTransaction") UT.begin() DAO.update() if(xx) DAO.insert() call to session EJB which inturn calls a singleton class to start workflow process DAO.update() endif UT.commit() when UT.commit() is called RollBackException is thrown. Environment is WAS6.0 and Oracle 9i. Any idea what is causing this error?
- Posted by: rangababu chakravarthula
- Posted on: September 17 2006 21:03 EDT
Looks like you are attempting do a transaction whose boundary spans between two j2ee server instances. technically it is possible. details below : http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/transactions/transactions3.html short answer in both server instances you might want to use distributed two phase commit protocol (XA) Bhagvan K http://www.jroller.com/page/bhagvank
Thank you. We enabled XA drivers on both servers and it worked.