[jboss-svn-commits] JBL Code SVN: r24782 - labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Jan 19 08:02:30 EST 2009
Author: jhalliday
Date: 2009-01-19 08:02:30 -0500 (Mon, 19 Jan 2009)
New Revision: 24782
Modified:
labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/TransactionManagerImple.java
Log:
Fixed JTS handling of TransactionManager.resume(null). JBTM-466
Modified: labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/TransactionManagerImple.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/TransactionManagerImple.java 2009-01-19 11:20:43 UTC (rev 24781)
+++ labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/TransactionManagerImple.java 2009-01-19 13:02:30 UTC (rev 24782)
@@ -1,8 +1,8 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a full listing
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
* of individual contributors.
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
@@ -14,7 +14,7 @@
* v.2.1 along with this distribution; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
- *
+ *
* (C) 2005-2006,
* @author JBoss Inc.
*/
@@ -52,7 +52,7 @@
/**
* An implementation of javax.transaction.TransactionManager.
- *
+ *
* @author Mark Little (mark_little at hp.com)
* @version $Id: TransactionManagerImple.java 2342 2006-03-30 13:06:17Z $
* @since JTS 1.2.4.
@@ -122,35 +122,44 @@
super.checkTransactionState();
- if (which instanceof TransactionImple)
- {
- TransactionImple theTransaction = (TransactionImple) which;
+ if (which != null)
+ {
+ if (which instanceof TransactionImple)
+ {
+ TransactionImple theTransaction = (TransactionImple) which;
- try
- {
- ControlWrapper cont = theTransaction.getControlWrapper();
+ try
+ {
+ ControlWrapper cont = theTransaction.getControlWrapper();
- OTSImpleManager.current().resumeWrapper(cont);
+ OTSImpleManager.current().resumeWrapper(cont);
- cont = null;
- theTransaction = null;
- }
- catch (org.omg.CosTransactions.InvalidControl e1)
- {
- //throw new InvalidTransactionException();
- }
- catch (org.omg.CORBA.SystemException e2)
- {
- throw new javax.transaction.SystemException();
- }
- }
- else
- throw new InvalidTransactionException();
- }
+ cont = null;
+ theTransaction = null;
+ }
+ catch (org.omg.CosTransactions.InvalidControl e1)
+ {
+ //throw new InvalidTransactionException();
+ }
+ catch (org.omg.CORBA.SystemException e2)
+ {
+ throw new javax.transaction.SystemException();
+ }
+ }
+ else
+ {
+ throw new InvalidTransactionException();
+ }
+ }
+ else
+ {
+ // resume a null tx == nothing to do
+ }
+ }
/**
* Creates a TransactionManageImple from the given information.
- *
+ *
* @param obj
* @param name
* @param nameCtx
More information about the jboss-svn-commits
mailing list