[jboss-svn-commits] JBL Code SVN: r24399 - labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/jbossatx/jts.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Dec 17 07:10:54 EST 2008


Author: jhalliday
Date: 2008-12-17 07:10:53 -0500 (Wed, 17 Dec 2008)
New Revision: 24399

Modified:
   labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/jbossatx/jts/TransactionManagerService.java
Log:
Move registerTransactionManager call later in the service lifecycle to ensure the ORB has already been initialized. JBTM-403


Modified: labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/jbossatx/jts/TransactionManagerService.java
===================================================================
--- labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/jbossatx/jts/TransactionManagerService.java	2008-12-17 11:58:49 UTC (rev 24398)
+++ labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/jbossatx/jts/TransactionManagerService.java	2008-12-17 12:10:53 UTC (rev 24399)
@@ -220,19 +220,6 @@
         JNDIManager.bindJTATransactionManagerImplementation();
         JNDIManager.bindJTATransactionSynchronizationRegistryImplementation();
 
-        try
-        {
-            org.omg.CosTransactions.TransactionFactory factory = com.arjuna.ats.jts.OTSManager.get_factory();
-            final int resolver = com.arjuna.ats.jts.TransactionServer.getResolver();
-
-            com.arjuna.ats.jts.TransactionServer.registerTransactionManager(resolver, ORB.getInstance("jboss-atx"), factory);
-        }
-        catch (final Exception ex)
-        {
-            log.fatal("Problem encountered while trying to register transaction manager with ORB!");
-
-            throw new Exception("Problem encountered while trying to register transaction manager with ORB! "+ex);
-        }
     }
 
     public void start(org.omg.CORBA.ORB theCorbaORB) throws Exception
@@ -253,6 +240,21 @@
             RecoveryORBManager.setORB(orb);
             RecoveryORBManager.setPOA(oa);
 
+            try
+            {
+                org.omg.CosTransactions.TransactionFactory factory = com.arjuna.ats.jts.OTSManager.get_factory();
+                final int resolver = com.arjuna.ats.jts.TransactionServer.getResolver();
+
+                com.arjuna.ats.jts.TransactionServer.registerTransactionManager(resolver, orb, factory);
+            }
+            catch (final Exception ex)
+            {
+                log.fatal("Problem encountered while trying to register transaction manager with ORB!");
+
+                throw new Exception("Problem encountered while trying to register transaction manager with ORB! "+ex);
+            }
+
+
             // Start the recovery manager
             if (_runRM)
             {




More information about the jboss-svn-commits mailing list