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.

3:43:42,060 INFO [STDOUT] SQLExceptionSQLExceptionSQLExceptionSQLExceptionSQLExceptionSQLExceptionSQLExceptionSQLExc ep
ionSQLExceptionjava.sql.SQLException: You cannot rollback during a managed transaction!
3:43:42,060 ERROR [STDERR] java.sql.SQLException: You cannot set autocommit during a managed transaction!
3:43:42,060 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.setJdbcAutoCommit(BaseWr

Can you please help me out guys.
Thanks Alot in Advance