I'm trying to get Hibernate to use WebLogic 8.1's JTA for transaction management with Oracle 9.2, but they don't appear to be interacting properly. I believe the problem is because Hibernate is creating vanilla OracleConnections rather than OracleXAConnections -- I am not using a WLS-managed data source (which does work, but which is not how I want to manage my DB connections) but am instead allowing Hibernate to directly mange Oracle connections.
I specified that Hibernate should use the OracleXADataSource driver class... what else do I need to do to get Hibernate to create XA connections?
Here's my hibernate.xml:
Code:
<hibernate-configuration>
<session-factory name="jbpmSessionFactory">
<property name="dialect">net.sf.hibernate.dialect.Oracle9Dialect</property>
<property name="jndi.url">t3://localhost:7001</property>
<property name="jndi.class">weblogic.jndi.WLInitialContextFactory</property>
<property name="jta.UserTransaction">javax/transaction/UserTransaction</property>
<property name="transaction.manager_lookup_class">net.sf.hibernate.transaction.WeblogicTransactionManagerLookup</property>
<property name="transaction.factory_class">net.sf.hibernate.transaction.JTATransactionFactory</property>
<property name="connection.driver_class">oracle.jdbc.xa.client.OracleXADataSource</property>
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:NBOYDLAP</property>
<property name="connection.username">jbpm</property>
<property name="connection.password">jbpm</property>
<property name="jdbc.batch_size">0</property>
<property name="statement_cache.size">5</property>
<property name="show_sql">true</property>
</session-factory>
</hibernate-configuration>