[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3111?page=c...
]
Felix von Delius commented on HHH-3111:
---------------------------------------
I assume you mean this: ... As yours does not compile :)
Sure, I typed it by hand, but You get the idea.. ;-)
I like the original proposed solution better since it touches only
WebSphere integration code...
I agree. But I'm not so deep in JTA spec to decide if it is ok to ask the
TransactionManager for the state of a transaction or if it is better to ask a (maybe not
available) Transaction about it's state.
And if you take the 1st approach, is it necessary to implement a null-check for the
getTransaction()-result? It works here for us in WebSphere, but I only did a short
"smoke test", not a longer integration test to have a good feeling about
that...
WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter.getStatus() implemented
incorrect
-------------------------------------------------------------------------------------------------
Key: HHH-3111
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3111
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.5, 3.2.6
Environment: Hibernate-3.2.6, Oracle 9i, IBM WebSphere 6.0.2.17 using
JTATransactions
Reporter: Felix von Delius
Priority: Critical
In our in-container-configuration (WebSphere 6.0.2.x), we get the following Exception
since moving from Hibernate 3.1.3 to 3.2.6 (Problem also occurs with 3.2.5):
Caused by: com.ing.diba.mws.tcore.exception.logging.ConvertedException:
org.hibernate.TransactionException: could not register synchronization with JTA Transa
ctionManager [Error code: MWS-6001: "Technischer Fehler"]
at
org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:185)
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:473)
at
org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:497)
at
org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:505)
at
com.ing.diba.mws.tcore.persistence.HibernateSessionSourceImpl.createPersistenceProvider(HibernateSessionSourceImpl.java:45)
...removed irrelevant lines...
at
com.ing.diba.mws.tcore.service.remoting.ejb.EJSLocalStatelessRemoteInvoker_d8103d48.invoke(Unknown
Source)
at
com.ing.diba.mws.tcore.service.remoting.RemotingInterceptorLocalEJB.invoke(RemotingInterceptorLocalEJB.java:90)
... 57 more
Caused by: java.lang.UnsupportedOperationException
at
org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter.getStatus(WebSphereExtendedJTATransactionLookup.java:87)
at
org.hibernate.transaction.JTATransactionFactory.isTransactionInProgress(JTATransactionFactory.java:94)
at org.hibernate.jdbc.JDBCContext.isTransactionInProgress(JDBCContext.java:191)
at
org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:159)
... 154 more
Our hibernate configuration contains the following settings:
hibernate.transaction.manager_lookup_class=org.hibernate.transaction.WebSphereExtendedJTATransactionLookup
hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory
It seems that getStatus() of the inner class TransactionManagerAdapter is invoked and
throws the UnsupportedOperationException. Instead of doing that, it probably should
delegate to the getStatus() method of the inner-inner class TransactionAdapter like this:
public int getStatus() throws SystemException {
return getTransaction().getStatus();
}
At least after patching that in Hibernate-3.2.6 and deploying the patched hibernate3.jar,
the problem disappeared.
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira