This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I am using java as my front end, and have AS/400 files at the back end. I am using JDBC diver to connect to AS/400 in my Session EJB. Now my problem is I have transactions, in which either all the queries should sucess, or all should fail. LIke if first query succeeds, and second query fails, then I need to roll back the earlier transaction also.
But its throwing an exception following Exception:You cannot rollback during a managed transaction!
13:43:42,060 INFO [STDOUT] before westwoodEJB.testTransaction(); 13:43:42,060 INFO [STDOUT] SQLExceptionSQLExceptionSQLExceptionSQLExceptionSQLExceptionSQLExceptionSQLExceptionSQLExcep tionSQLExceptionjava.sql.SQLException: You cannot rollback during a managed transaction! 13:43:42,060 ERROR [STDERR] java.sql.SQLException: You cannot set autocommit during a managed transaction! 13:43:42,060 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.setJdbcAutoCommit(BaseWr apperManagedConnection.java:482) 13:43:42,060 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrappedConnection.setAutoCommit(WrappedConnection.jav a:322)
Can you please help me out guys. Thanks Alot in Advance