[ojb-users] AutoCommit during transaction in JBoss
Brought to you by:
thma
From: Graeme P. <gr...@Gr...> - 2002-05-19 09:59:01
|
Hi all, I'm using OJB 0.8.4 to do BMP in JBoss, but I keep getting "java.sql.SQLException: You cannot set autocommit during a managed transaction!". This happens inside my ejbCreate method when I try to do a store(). I've changed the OJB.properties to use the J2EE stuff (PersistenceBrokerClass and PersistenceBrokerFactoryClass), and I've also set the JNDI properties in that same file. There is nothing relating to transactions in my OJB code (no beginTransaction() calls, etc, etc). If I change the transaction attribute in my ejb-jar file from "Required" to "Supports" (no container transaction), everything works. I did see some stuff about ignoring auto commit problems in the source code, but I haven't managed to figure it out yet. I'm basically struggling to get OJB to use the JBoss transaction in an EJB method. Any help will be appreciated. Graeme |