• No replies
1 Post

Pinned topic WebshpereUOWTransactionManager not working

‏2009-12-10T08:21:49Z |
I'm using WAS with ejb3 and ws features pack.

I have configured JPA with transaction-type=JTA. When I invoke a JPA query, each sql query issued by the jpa query executes on a different JDBC connection of the WAS datasource; after each sql operation, the borrowed JDBC connection does not return to the datasource, and eventually the application hangs (when the datasource runs out of available connections).

My configuration is as followed:
Oracle 9i
Oracle XA JDBC provider for Oracle 9i
WebSphere JNDI datasource based on the above JDBC provider
IBM certified Spring's WebSphereUowTransactionManager
JPA with Hibernate provider (core: 3.3.2.GA and entitymanager: 3.4.0.GA) and transaction manager lookup class set to Hibernate's WebSphereExtendedJTATransactionLookup

Hibernate gets JDBC connections by invoking getConnection() on WebSphere's WSJdbcDataSource (which is the configured JNDI DataSource).

Here are parts of my configuration:


<persistence-unit name=
"persistence" transaction-type=
"JTA"> <jta-data-source>jdbc/ds_BAM</jta-data-source> <properties> <property name=
"hibernate.archive.autodetection" value=
"class"/> <property name=
"hibernate.dialect" value=
"org.hibernate.dialect.Oracle9iDialect"/> <property name=
"hibernate.current_session_context_class" value=
"jta"/> <property name=
"hibernate.cache.provider_class" value=
"org.hibernate.cache.NoCacheProvider"/> <property name=
"hibernate.default_batch_fetch_size" value=
"20"/> <property name=
"hibernate.transaction.manager_lookup_class" value=
"org.hibernate.transaction.WebSphereExtendedJTATransactionLookup"/> </properties> </persistence-unit>

I have checked in debug mode and noticed that the JPA query executes inside WebSphere's UOW transaction.

Any help would be greatly appreciated.