I have a session EJB that makes use of Slide. I'm using a J2EEStore to save node info. The EJB specifies that Container-Managed Transaction is used.
J2EEStore refuses to cooperate. After some investigation, here is the reason. Under Container-Managed Transaction (CMT), there are methods that are not allowed because they might interfere with the transaction boundaries set by the container. The list of prohibited methods follows: commit, setAutoCommit, and rollback methods of java.sql.Connection getUserTransaction method of javax.ejb.EJBContext any method of javax.transaction.UserTransaction You may, however, use these methods to set boundaries in bean-managed transactions. Since J2EEStore explicitly invokes setAutoCommit(), commit(), and rollback(), it means that J2EEStore doesn't work for CMT. Does anyone use J2EEStore in EJBs successfully? Must Bean-Managed Transaction be used? -- Willie Vu > -----Original Message----- > From: Willie Vu [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 28, 2003 5:24 > To: 'Slide Users Mailing List' > Subject: J2EEStore problem in JBoss > > > Can someone give me a hint on the following problem? I'm > trying to use Slide to talk to Sybase in JBoss. > > CONNDEBUG: Couldn't get connection: You cannot set autocommit > during a managed transaction! > 2003-05-28 17:07:05,995 ERROR [STDERR] java.sql.SQLException: > You cannot set autocommit during a managed transaction! > 2003-05-28 17:07:05,995 ERROR [STDERR] at > org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.s > etJdbcAutoCommit(L > ocalManagedConnection.java:447) > 2003-05-28 17:07:05,995 ERROR [STDERR] at > org.jboss.resource.adapter.jdbc.local.LocalConnection.setAutoC > ommit(LocalConnect > ion.java:426) > 2003-05-28 17:07:05,995 ERROR [STDERR] at > slidestore.j2ee.J2EEStore$TransactionId.<init>(J2EEStore.java:522) > 2003-05-28 17:07:05,995 ERROR [STDERR] at > slidestore.j2ee.J2EEStore.start(J2EEStore.java:438) > 2003-05-28 17:07:05,995 ERROR [STDERR] at > org.apache.slide.transaction.SlideTransaction.enlistResource(S lideTransaction.ja > va:518) 2003-05-28 17:07:05,995 ERROR [STDERR] at > org.apache.slide.store.AbstractStore.enlist(AbstractStore.java:1393) > 2003-05-28 17:07:05,995 ERROR [STDERR] at > org.apache.slide.store.AbstractStore.createObject(AbstractStor e.java:587) > 2003-05-28 17:07:05,995 ERROR [STDERR] at > org.apache.slide.store.StandardStore.createObject(StandardStor e.java:209) > 2003-05-28 17:07:06,026 ERROR [STDERR] at > org.apache.slide.common.Namespace.loadBaseData(Namespace.java:792) > 2003-05-28 17:07:06,026 ERROR [STDERR] at > org.apache.slide.common.Domain.initNamespace(Domain.java:859) > 2003-05-28 17:07:06,042 ERROR [STDERR] at > org.apache.slide.common.Domain.init(Domain.java:478) > 2003-05-28 17:07:06,042 ERROR [STDERR] at > org.apache.slide.common.Domain.selfInit(Domain.java:792) > 2003-05-28 17:07:06,042 ERROR [STDERR] at > org.apache.slide.common.Domain.accessNamespace(Domain.java:280) > > -- > Willie Vu > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
