[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2457) UnsupportedOperationException with WebSphereExtendedJTATransactionLookup

Ivo Abeloos (JIRA) noreply at atlassian.com
Wed Sep 26 12:08:57 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_28224 ] 

Ivo Abeloos commented on HHH-2457:
----------------------------------

Comparing the 3.1.3 code that worked with the 3.2.5 code that failed I replaced some code in JDBCContext.java: 

I replaced the 3.2.5 code:

	public boolean isTransactionInProgress() {
		return owner.getFactory().getSettings().getTransactionFactory()
				.isTransactionInProgress( this, owner, hibernateTransaction );
	}

which will ALWAYS throw an exception when hibernateTransaction is null in case of a JTATransactionFactory

with the 3.1.3:

    public boolean isTransactionInProgress() {
        boolean isHibernateTransactionActive = hibernateTransaction!=null &&
                hibernateTransaction.isActive();
        return isHibernateTransactionActive || JTAHelper.isTransactionInProgress( owner.getFactory() );
    }

much more robust

This seems to be sufficient for me to get everything working again.  Question is ... is this correct?

--Ivo

> UnsupportedOperationException with WebSphereExtendedJTATransactionLookup
> ------------------------------------------------------------------------
>
>                 Key: HHH-2457
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2457
>             Project: Hibernate3
>          Issue Type: Bug
>    Affects Versions: 3.2.2
>            Reporter: Erik Post
>
> Using the WebSphereExtendedJTATransactionLookup as transaction manager lookup class results in an UnsupportedOperationException being thrown by WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter.getStatus(). This method is called by JTATransactionFactory.isTransactionInProgress().
> Would a solution be to have the TransactionManagerAdapter#getStatus method delegate to the TransactionAdapter#getStatus method?
> Also see http://forum.hibernate.org/viewtopic.php?t=966463

-- 
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