This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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