[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2160) JTATransactionFactory.isTransactionInProgress fails with WebSphereExtendedJTATransactionLookup
Ryo Ota (JIRA)
noreply at atlassian.com
Tue Jul 3 22:03:52 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27399 ]
Ryo Ota commented on HHH-2160:
------------------------------
I think this issue is related to HHH-2457
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2457
It seems to be fixed by WAS v6.1 fix pack 9(not tested yet on my testbed).
http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg1PK41846
> JTATransactionFactory.isTransactionInProgress fails with WebSphereExtendedJTATransactionLookup
> ----------------------------------------------------------------------------------------------
>
> Key: HHH-2160
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2160
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.2.0.ga
> Environment: Hibernate 3.2.0 ga
> WebSphere Application Server 6.0.2.15
> DB2 9.1
> Reporter: Timothy Folks
>
> Configurating Hibernate with the following settings:
> hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory
> hibernate.transaction.manager_lookup_class=org.hibernate.transaction.WebSphereExtendedJTATransactionLookup
> jta.UserTransaction=java:comp/UserTransaction
> hibernate.current_session_context_class=jta
> results in the following stack trace (irrelevant lines snipped)
> <snipped>
> Caused by: org.hibernate.TransactionException: could not register synchronization with JTA TransactionManager
> at org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:181)
> at org.hibernate.jdbc.JDBCContext.<init>(JDBCContext.java:76)
> at org.hibernate.impl.SessionImpl.<init>(SessionImpl.java:213)
> at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:525)
> at org.hibernate.context.JTASessionContext.buildOrObtainSession(JTASessionContext.java:114)
> at org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:80)
> at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:542)
> <snipped>
> Caused by: java.lang.UnsupportedOperationException
> at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter.getStatus(WebSphereExtendedJTATransactionLookup.java:78)
> at org.hibernate.transaction.JTATransactionFactory.isTransactionInProgress(JTATransactionFactory.java:94)
> at org.hibernate.jdbc.JDBCContext.isTransactionInProgress(JDBCContext.java:187)
> at org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:159)
> The workaround I've implemented is to change the following line in JTATransactionFactory.isTransactionInProgress:
> if ( jdbcContext.getFactory().getTransactionManager() != null ) {
> to:
> if ( jdbcContext.getFactory().getTransactionManager() != null && jdbcContext.getFactory().getTransactionManager() instanceof WebSphereExtendedJTATransactionLookup.TransactionManagerAdapter == false) {
> This results in the method falling back to looking up the UserTransaction in JNDI and calling getStatus on that.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list