Several posts have touched on this issue, but from what I gather they all apply to those using JTA with Hibernate & WebSphere....
I'm trying get Hibernate to work with WebSphere, using a plain JDBC transaction factory. I'm using Hibernate in the EJB container, where the EJBs are just acting as facades, and my Hibernate sessions are being stored in ThreadLocals. I've had this issue with both WebSphere 5 and 6. I'm using Oracle 9i as my database.
I keep getting errors such as:
Code:
java.sql.SQLException: DSRA9350E: Operation Connection.commit is not allowed during a global transaction.
My transaction code is bog standard, as per "Hibernate In Action" book - simply beginTransaction(), do stuff, commit().
I can't understancd why I would be in a global transaction to begin with!
I've tried all sorts of Hibernate settings, but generally I'm using:
Code:
<property name="connection.datasource">MCIAWEBDS</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
<property name="hibernate.jndi.class">com.ibm.websphere.naming.WsnInitialContextFactory</property>
There doesn't seem to be anything special to configure on the WebSphere datasources, but I've tried XA and non-XA, updating to the latest JDBC drivers, everything I can think of.
If anyone out there in user-land has Hibernate working in WebSphere in a non-JTA way (there must be some of you!) can you pretty pretty pleeeeeeaaaaase detail for me the settings you have used.
pllllllleeeeeeeeeeeaaaaaaaaaaasssseeeeeeee.