[jboss-cvs] JBossAS SVN: r80237 - in trunk: server/src/main/org/jboss/tm/usertx/client and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Oct 30 05:15:24 EDT 2008


Author: galder.zamarreno at jboss.com
Date: 2008-10-30 05:15:24 -0400 (Thu, 30 Oct 2008)
New Revision: 80237

Modified:
   trunk/component-matrix/pom.xml
   trunk/server/src/main/org/jboss/tm/usertx/client/ClientUserTransactionObjectFactory.java
Log:
[JBAS-5908] Updated jboss-integration to 5.0.0.GA and fixed issue accordingly.

Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml	2008-10-30 07:53:15 UTC (rev 80236)
+++ trunk/component-matrix/pom.xml	2008-10-30 09:15:24 UTC (rev 80237)
@@ -65,7 +65,7 @@
     <version.org.jboss.cluster>1.1.0.GA</version.org.jboss.cluster>
     <version.org.jboss.cluster.cache.spi>1.0.0.GA</version.org.jboss.cluster.cache.spi>
     <version.org.jboss.cluster.cache.jbc>1.0.1.CR1</version.org.jboss.cluster.cache.jbc>
-    <version.org.jboss.integration>5.0.0.CR2</version.org.jboss.integration>
+    <version.org.jboss.integration>5.0.0.GA</version.org.jboss.integration>
     <version.org.jboss.jbossxb>2.0.0.GA</version.org.jboss.jbossxb>
     <version.org.jboss.metadata>1.0.0.CR3</version.org.jboss.metadata>
     <version.org.jboss.naming>5.0.0.CR3</version.org.jboss.naming>

Modified: trunk/server/src/main/org/jboss/tm/usertx/client/ClientUserTransactionObjectFactory.java
===================================================================
--- trunk/server/src/main/org/jboss/tm/usertx/client/ClientUserTransactionObjectFactory.java	2008-10-30 07:53:15 UTC (rev 80236)
+++ trunk/server/src/main/org/jboss/tm/usertx/client/ClientUserTransactionObjectFactory.java	2008-10-30 09:15:24 UTC (rev 80237)
@@ -57,23 +57,18 @@
     */
    static private UserTransaction getUserTransaction()
    {
-      if (userTransaction == null) {
-         // See if we have a local TM
-         try {
-            new InitialContext().lookup("java:/TransactionManager");
-
-            // We execute in the server.
-            userTransaction = ServerVMClientUserTransaction.getSingleton();
-         } catch (NamingException ex) {
-            // We execute in a stand-alone client.
-            ClientUserTransaction cut = ClientUserTransaction.getSingleton();
-
-            // Tell the proxy that this is the factory for
-            // transaction propagation contexts.
-            TransactionPropagationContextUtil.setTPCFactory(cut);
-            userTransaction = cut;
-         }
+      UserTransaction userTransaction = null;
+      ServerVMClientUserTransaction serverUserTransaction = ServerVMClientUserTransaction.getSingleton();
+      if (serverUserTransaction.isServer())
+      {
+         userTransaction = serverUserTransaction;
       }
+      else
+      {
+         ClientUserTransaction cut = ClientUserTransaction.getSingleton();
+         TransactionPropagationContextUtil.setTPCFactory(cut);
+         userTransaction = cut;
+      }
       return userTransaction;
    }
 




More information about the jboss-cvs-commits mailing list