[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3481) JTATransactionFactory bug when Transaction cannot be found in JNDI

Steve Ebersole (JIRA) noreply at atlassian.com
Tue Jan 13 19:28:38 EST 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32113#action_32113 ] 

Steve Ebersole commented on HHH-3481:
-------------------------------------

Well have a look-see at the fix-for versions...

> JTATransactionFactory bug when Transaction cannot be found in JNDI
> ------------------------------------------------------------------
>
>                 Key: HHH-3481
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3481
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.3.0.CR2
>            Reporter: Steve Ebersole
>            Assignee: Steve Ebersole
>             Fix For: 3.2.x, 3.3.x, 3.4
>
>
> This is the code after linked patch:
> 	protected UserTransaction getUserTransaction() {
> 		log.trace( "Attempting to locate UserTransaction via JNDI [{}]", getUserTransactionName() );
> 		try {
> 			UserTransaction ut = ( UserTransaction ) getInitialContext().lookup( getUserTransactionName() );
> 			if ( ut == null ) {
> 				throw new TransactionException( "Naming service lookup for UserTransaction returned null [" + getUserTransactionName() +"]" );
> 			}
> 			log.trace( "Obtained UserTransaction" );
> 			return ut;
> 		}
> 		catch ( NamingException ne ) {
> 			throw new TransactionException( "Could not find UserTransaction in JNDI [" + getUserTransaction() + "]", ne );
> 		}
> 	}
> Notice that in catch of NamingException we try to build a TransactionException.  It is supposed to embed the JNDI namespace where we attempted to resolve the Transaction; but rather than getUserTransactionName() we are instead calling back into this same exact method getUserTransaction().

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