geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r111396 - in geronimo/trunk/modules: assembly/src/plan axis/src/etc/META-INF axis/src/test/org/apache/geronimo/axis/testUtils connector-builder/src/test-data/connector_1_5 connector/src/test/org/apache/geronimo/connector/outbound jetty-builder/src/test/org/apache/geronimo/jetty/deployment jetty/src/test/org/apache/geronimo/jetty timer/src/test/org/apache/geronimo/timer transaction/src/etc/META-INF transaction/src/java/org/apache/geronimo/transaction transaction/src/java/org/apache/geronimo/transaction/context transaction/src/java/org/apache/geronimo/transaction/manager transaction/src/test/org/apache/geronimo/transaction transaction/src/test/org/apache/geronimo/transaction/context transaction/src/test/org/apache/geronimo/transaction/manager
Date Thu, 09 Dec 2004 15:41:30 GMT
Author: djencks
Date: Thu Dec  9 07:41:29 2004
New Revision: 111396

URL: http://svn.apache.org/viewcvs?view=rev&rev=111396
Log:
Finish removing TransactionManagerProxy, GERONIMO-380
Added:
   geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/TransactionManagerImplTest.java
      - copied, changed from r111234, geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/TransactionManagerProxyTest.java
Removed:
   geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/GeronimoTransactionManager.java
   geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/TransactionManagerProxy.java
   geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/TransactionManagerProxyTest.java
Modified:
   geronimo/trunk/modules/assembly/src/plan/j2ee-client-plan.xml
   geronimo/trunk/modules/assembly/src/plan/j2ee-server-plan.xml
   geronimo/trunk/modules/axis/src/etc/META-INF/geronimo-service.xml
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManager.java
   geronimo/trunk/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml
   geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java
   geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionCachingInterceptorTest.java
   geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionEnlistingInterceptorTest.java
   geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
   geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java
   geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/NontransactionalThreadPooledTimerTest.java
   geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/TransactionalThreadPooledTimerTest.java
   geronimo/trunk/modules/transaction/src/etc/META-INF/geronimo-service.xml
   geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/ExtendedTransactionManager.java
   geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java
   geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/Recovery.java
   geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java
   geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/context/TransactionContextManagerTest.java
   geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/ProtocolTest.java
   geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/TestTransactionManager.java
   geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/XATransactionTester.java
   geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/XidImporterTest.java

Modified: geronimo/trunk/modules/assembly/src/plan/j2ee-client-plan.xml
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/j2ee-client-plan.xml?view=diff&rev=111396&p1=geronimo/trunk/modules/assembly/src/plan/j2ee-client-plan.xml&r1=111395&p2=geronimo/trunk/modules/assembly/src/plan/j2ee-client-plan.xml&r2=111396
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/j2ee-client-plan.xml	(original)
+++ geronimo/trunk/modules/assembly/src/plan/j2ee-client-plan.xml	Thu Dec  9 07:41:29 2004
@@ -93,7 +93,7 @@
         <reference name="TransactionContextManager">geronimo.client:type=TransactionContextManager</reference>
     </gbean>
 
-    <gbean name="geronimo.client:type=TransactionManager" class="org.apache.geronimo.transaction.GeronimoTransactionManager">
+    <gbean name="geronimo.client:type=TransactionManager" class="org.apache.geronimo.transaction.manager.TransactionManagerImpl">
         <references name="ResourceManagers">
             <pattern>geronimo.client:j2eeType=JCAManagedConnectionFactory,*</pattern>
             <pattern>geronimo.client:j2eeType=ActivationSpec,*</pattern>
@@ -103,7 +103,6 @@
     <gbean name="geronimo.client:type=TransactionContextManager" class="org.apache.geronimo.transaction.context.TransactionContextManager">
         <reference name="TransactionManager">geronimo.client:type=TransactionManager</reference>
         <reference name="XidImporter">geronimo.client:type=TransactionManager</reference>
-        <reference name="Recovery">geronimo.client:type=TransactionManager</reference>
     </gbean>
 
 </configuration>

Modified: geronimo/trunk/modules/assembly/src/plan/j2ee-server-plan.xml
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/j2ee-server-plan.xml?view=diff&rev=111396&p1=geronimo/trunk/modules/assembly/src/plan/j2ee-server-plan.xml&r1=111395&p2=geronimo/trunk/modules/assembly/src/plan/j2ee-server-plan.xml&r2=111396
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/j2ee-server-plan.xml	(original)
+++ geronimo/trunk/modules/assembly/src/plan/j2ee-server-plan.xml	Thu Dec  9 07:41:29 2004
@@ -248,7 +248,7 @@
         <reference name="serverInfo">geronimo.system:role=ServerInfo</reference>
     </gbean>
 
-    <gbean name="geronimo.server:type=TransactionManager" class="org.apache.geronimo.transaction.GeronimoTransactionManager">
+    <gbean name="geronimo.server:type=TransactionManager" class="org.apache.geronimo.transaction.manager.TransactionManagerImpl">
         <attribute name="defaultTransactionTimeoutSeconds" type="int">300</attribute>
         <reference name="TransactionLog">geronimo.server:type=HOWLTransactionLog</reference>
         <references name="ResourceManagers">
@@ -260,7 +260,6 @@
     <gbean name="geronimo.server:type=TransactionContextManager" class="org.apache.geronimo.transaction.context.TransactionContextManager">
         <reference name="TransactionManager">geronimo.server:type=TransactionManager</reference>
         <reference name="XidImporter">geronimo.server:type=TransactionManager</reference>
-        <reference name="Recovery">geronimo.server:type=TransactionManager</reference>
     </gbean>
 
 

Modified: geronimo/trunk/modules/axis/src/etc/META-INF/geronimo-service.xml
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/etc/META-INF/geronimo-service.xml?view=diff&rev=111396&p1=geronimo/trunk/modules/axis/src/etc/META-INF/geronimo-service.xml&r1=111395&p2=geronimo/trunk/modules/axis/src/etc/META-INF/geronimo-service.xml&r2=111396
==============================================================================
--- geronimo/trunk/modules/axis/src/etc/META-INF/geronimo-service.xml	(original)
+++ geronimo/trunk/modules/axis/src/etc/META-INF/geronimo-service.xml	Thu Dec  9 07:41:29 2004
@@ -21,5 +21,5 @@
     <path>geronimo-spec-j2ee-connector-DEV.jar</path>
 
     <!-- transaction -->
-    <gbean class="org.apache.geronimo.transaction.TransactionManagerProxy" objectName="geronimo.transaction:service=TransactionManager"/>
+    <gbean class="org.apache.geronimo.transaction.manager.TransactionManagerImpl" objectName="geronimo.transaction:service=TransactionManager"/>
 </gbeans>

Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManager.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManager.java?view=diff&rev=111396&p1=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManager.java&r1=111395&p2=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManager.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManager.java	(original)
+++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/testUtils/J2EEManager.java	Thu Dec  9 07:41:29 2004
@@ -35,7 +35,7 @@
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.timer.vm.VMStoreThreadPooledNonTransactionalTimer;
 import org.apache.geronimo.timer.vm.VMStoreThreadPooledTransactionalTimer;
-import org.apache.geronimo.transaction.GeronimoTransactionManager;
+import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
 import org.apache.geronimo.transaction.context.TransactionContextManager;
 
 /**
@@ -94,7 +94,7 @@
 
     private void setUpTransactionManager(Kernel kernel) throws AxisFault {
         try {
-            GBeanData tmGBean = new GBeanData(AxisGeronimoConstants.TRANSACTION_MANAGER_NAME,GeronimoTransactionManager.GBEAN_INFO);
+            GBeanData tmGBean = new GBeanData(AxisGeronimoConstants.TRANSACTION_MANAGER_NAME,TransactionManagerImpl.GBEAN_INFO);
             Set rmpatterns = new HashSet();
             rmpatterns.add(ObjectName.getInstance("geronimo.server:j2eeType=JCAManagedConnectionFactory,*"));
             tmGBean.setAttribute("defaultTransactionTimeoutSeconds", new Integer(10));

Modified: geronimo/trunk/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml?view=diff&rev=111396&p1=geronimo/trunk/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml&r1=111395&p2=geronimo/trunk/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml&r2=111396
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml	(original)
+++ geronimo/trunk/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml	Thu Dec  9 07:41:29 2004
@@ -112,7 +112,7 @@
         <reference name="TransactionContextManager">geronimo.server:type=TransactionContextManager</reference>
     </gbean>
 
-    <gbean name="geronimo.server:type=TransactionManager" class="org.apache.geronimo.transaction.GeronimoTransactionManager">
+    <gbean name="geronimo.server:type=TransactionManager" class="org.apache.geronimo.transaction.manager.TransactionManagerImpl">
         <attribute name="defaultTransactionTimeoutSeconds" type="int">10</attribute>
         <references name="ResourceManagers">
             <pattern>geronimo.server:j2eeType=JCAManagedConnectionFactory,*</pattern>
@@ -123,7 +123,6 @@
     <gbean name="geronimo.server:type=TransactionContextManager" class="org.apache.geronimo.transaction.context.TransactionContextManager">
         <reference name="TransactionManager">geronimo.server:type=TransactionManager</reference>
         <reference name="XidImporter">geronimo.server:type=TransactionManager</reference>
-        <reference name="Recovery">geronimo.server:type=TransactionManager</reference>
     </gbean>
 
     <gbean name="geronimo.security:service=RealmBridge,name=TargetRealm" class="org.apache.geronimo.security.bridge.ConfiguredIdentityUserPasswordRealmBridge">

Modified: geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java?view=diff&rev=111396&p1=geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java&r1=111395&p2=geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java	(original)
+++ geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java	Thu Dec  9 07:41:29 2004
@@ -90,8 +90,8 @@
 
     protected void setUp() throws Exception {
         connectionTrackingCoordinator = new ConnectionTrackingCoordinator();
-        TransactionManagerImpl transactionManager = new TransactionManagerImpl();
-        transactionContextManager = new TransactionContextManager(transactionManager, transactionManager, null);
+        TransactionManagerImpl transactionManager = new TransactionManagerImpl(10 * 1000, null, null);
+        transactionContextManager = new TransactionContextManager(transactionManager, transactionManager);
         mockManagedConnectionFactory = new MockManagedConnectionFactory();
         subject = new Subject();
         ContextManager.setCurrentCaller(subject);

Modified: geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionCachingInterceptorTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionCachingInterceptorTest.java?view=diff&rev=111396&p1=geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionCachingInterceptorTest.java&r1=111395&p2=geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionCachingInterceptorTest.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionCachingInterceptorTest.java	(original)
+++ geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionCachingInterceptorTest.java	Thu Dec  9 07:41:29 2004
@@ -39,8 +39,8 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        transactionManager = new TransactionManagerImpl();
-        transactionContextManager = new TransactionContextManager(transactionManager, transactionManager, null);
+        transactionManager = new TransactionManagerImpl(10 * 1000, null, null);
+        transactionContextManager = new TransactionContextManager(transactionManager, transactionManager);
         transactionCachingInterceptor = new TransactionCachingInterceptor(this, transactionContextManager);
     }
 

Modified: geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionEnlistingInterceptorTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionEnlistingInterceptorTest.java?view=diff&rev=111396&p1=geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionEnlistingInterceptorTest.java&r1=111395&p2=geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionEnlistingInterceptorTest.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionEnlistingInterceptorTest.java	(original)
+++ geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionEnlistingInterceptorTest.java	Thu Dec  9 07:41:29 2004
@@ -45,8 +45,8 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        TransactionManagerImpl transactionManager = new TransactionManagerImpl();
-        transactionContextManager = new TransactionContextManager(transactionManager, transactionManager, null);
+        TransactionManagerImpl transactionManager = new TransactionManagerImpl(10 * 1000, null, null);
+        transactionContextManager = new TransactionContextManager(transactionManager, transactionManager);
         transactionEnlistingInterceptor = new TransactionEnlistingInterceptor(this, transactionContextManager);
     }
 

Modified: geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java?view=diff&rev=111396&p1=geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java&r1=111395&p2=geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java	(original)
+++ geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java	Thu Dec  9 07:41:29 2004
@@ -44,7 +44,7 @@
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.security.SecurityServiceImpl;
-import org.apache.geronimo.transaction.GeronimoTransactionManager;
+import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
 import org.apache.geronimo.transaction.context.TransactionContextManager;
 
 /**
@@ -197,7 +197,7 @@
         start(container);
         start(connector);
 
-        tm = new GBeanData(tmName, GeronimoTransactionManager.GBEAN_INFO);
+        tm = new GBeanData(tmName, TransactionManagerImpl.GBEAN_INFO);
         Set patterns = new HashSet();
         patterns.add(ObjectName.getInstance("geronimo.server:j2eeType=JCAManagedConnectionFactory,*"));
         tm.setAttribute("defaultTransactionTimeoutSeconds", new Integer(10));

Modified: geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java?view=diff&rev=111396&p1=geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java&r1=111395&p2=geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java	(original)
+++ geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java	Thu Dec  9 07:41:29 2004
@@ -33,7 +33,7 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext;
 import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContextImpl;
 import org.apache.geronimo.transaction.OnlineUserTransaction;
-import org.apache.geronimo.transaction.GeronimoTransactionManager;
+import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
 import org.apache.geronimo.transaction.context.TransactionContextManager;
 import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.kernel.Kernel;
@@ -238,7 +238,7 @@
         start(container);
         start(connector);
 
-        tm = new GBeanData(tmName, GeronimoTransactionManager.GBEAN_INFO);
+        tm = new GBeanData(tmName, TransactionManagerImpl.GBEAN_INFO);
         Set patterns = new HashSet();
         patterns.add(ObjectName.getInstance("geronimo.server:j2eeType=JCAManagedConnectionFactory,*"));
         tm.setAttribute("defaultTransactionTimeoutSeconds", new Integer(10));

Modified: geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/NontransactionalThreadPooledTimerTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/NontransactionalThreadPooledTimerTest.java?view=diff&rev=111396&p1=geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/NontransactionalThreadPooledTimerTest.java&r1=111395&p2=geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/NontransactionalThreadPooledTimerTest.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/NontransactionalThreadPooledTimerTest.java	(original)
+++ geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/NontransactionalThreadPooledTimerTest.java	Thu Dec  9 07:41:29 2004
@@ -29,8 +29,8 @@
 public class NontransactionalThreadPooledTimerTest extends AbstractThreadPooledTimerTest {
 
     protected void setUp() throws Exception {
-        TransactionManagerImpl transactionManager = new TransactionManagerImpl();
-        transactionContextManager = new TransactionContextManager(transactionManager, transactionManager, null);
+        TransactionManagerImpl transactionManager = new TransactionManagerImpl(10 * 1000, null, null);
+        transactionContextManager = new TransactionContextManager(transactionManager, transactionManager);
         executableWorkFactory = new NontransactionalExecutorTaskFactory();
         super.setUp();
     }

Modified: geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/TransactionalThreadPooledTimerTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/TransactionalThreadPooledTimerTest.java?view=diff&rev=111396&p1=geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/TransactionalThreadPooledTimerTest.java&r1=111395&p2=geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/TransactionalThreadPooledTimerTest.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/TransactionalThreadPooledTimerTest.java	(original)
+++ geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/TransactionalThreadPooledTimerTest.java	Thu Dec  9 07:41:29 2004
@@ -29,8 +29,8 @@
 public class TransactionalThreadPooledTimerTest extends AbstractThreadPooledTimerTest {
 
     protected void setUp() throws Exception {
-        TransactionManagerImpl transactionManager = new TransactionManagerImpl();
-        transactionContextManager = new TransactionContextManager(transactionManager, transactionManager, null);
+        TransactionManagerImpl transactionManager = new TransactionManagerImpl(10 * 1000, null, null);
+        transactionContextManager = new TransactionContextManager(transactionManager, transactionManager);
         executableWorkFactory = new TransactionalExecutorTaskFactory(transactionContextManager, 1);
         super.setUp();
     }

Modified: geronimo/trunk/modules/transaction/src/etc/META-INF/geronimo-service.xml
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/etc/META-INF/geronimo-service.xml?view=diff&rev=111396&p1=geronimo/trunk/modules/transaction/src/etc/META-INF/geronimo-service.xml&r1=111395&p2=geronimo/trunk/modules/transaction/src/etc/META-INF/geronimo-service.xml&r2=111396
==============================================================================
--- geronimo/trunk/modules/transaction/src/etc/META-INF/geronimo-service.xml	(original)
+++ geronimo/trunk/modules/transaction/src/etc/META-INF/geronimo-service.xml	Thu Dec  9 07:41:29 2004
@@ -22,6 +22,6 @@
     <path>geronimo-spec-j2ee-connector-DEV.jar</path>
 
     <!-- transaction -->
-    <gbean class="org.apache.geronimo.transaction.TransactionManagerProxy" objectName="geronimo.transaction:service=TransactionManager"/>
+    <gbean class="org.apache.geronimo.transaction.manager.TransactionManagerImpl" objectName="geronimo.transaction:service=TransactionManager"/>
 
 </gbeans>

Modified: geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/ExtendedTransactionManager.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/ExtendedTransactionManager.java?view=diff&rev=111396&p1=geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/ExtendedTransactionManager.java&r1=111395&p2=geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/ExtendedTransactionManager.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/ExtendedTransactionManager.java	(original)
+++ geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/ExtendedTransactionManager.java	Thu Dec  9 07:41:29 2004
@@ -1,5 +1,6 @@
 package org.apache.geronimo.transaction;
 
+import java.util.Map;
 import javax.transaction.TransactionManager;
 import javax.transaction.NotSupportedException;
 import javax.transaction.SystemException;
@@ -10,5 +11,7 @@
 public interface ExtendedTransactionManager extends TransactionManager {
 
     Transaction begin(long transactionTimeoutMilliseconds) throws NotSupportedException, SystemException ;
+
+    Map getExternalXids();
 
 }

Deleted: /geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/GeronimoTransactionManager.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/GeronimoTransactionManager.java?view=auto&rev=111395
==============================================================================

Deleted: /geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/TransactionManagerProxy.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/TransactionManagerProxy.java?view=auto&rev=111395
==============================================================================

Modified: geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java?view=diff&rev=111396&p1=geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java&r1=111395&p2=geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java	(original)
+++ geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java	Thu Dec  9 07:41:29 2004
@@ -50,20 +50,18 @@
 
     private final ExtendedTransactionManager transactionManager;
     private final XidImporter importer;
-    private final Recovery recovery;
     private final Map importedTransactions = new HashMap();
 
     private boolean recoveryState = NOT_IN_RECOVERY;
 
     //use as reference endpoint.
     public TransactionContextManager() {
-        this(null, null, null);
+        this(null, null);
     }
 
-    public TransactionContextManager(ExtendedTransactionManager transactionManager, XidImporter importer, Recovery recovery) {
+    public TransactionContextManager(ExtendedTransactionManager transactionManager, XidImporter importer) {
         this.transactionManager = transactionManager;
         this.importer = importer;
-        this.recovery = recovery;
     }
 
     public TransactionManager getTransactionManager() {
@@ -203,7 +201,7 @@
         //we always return all xids in first call.
         //calling "startrscan" repeatedly starts at beginning of list again.
         if ((flag & XAResource.TMSTARTRSCAN) != 0) {
-            Map recoveredXidMap = recovery.getExternalXids();
+            Map recoveredXidMap = transactionManager.getExternalXids();
             Xid[] recoveredXids = new Xid[recoveredXidMap.size()];
             int i = 0;
             synchronized (importedTransactions) {
@@ -295,12 +293,11 @@
 
         infoFactory.addReference("TransactionManager", ExtendedTransactionManager.class);
         infoFactory.addReference("XidImporter", XidImporter.class);
-        infoFactory.addReference("Recovery", Recovery.class);
 
         infoFactory.addInterface(XATerminator.class);
         infoFactory.addInterface(XAWork.class);
 
-        infoFactory.setConstructor(new String[]{"TransactionManager", "XidImporter", "Recovery"});
+        infoFactory.setConstructor(new String[]{"TransactionManager", "XidImporter"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 

Modified: geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/Recovery.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/Recovery.java?view=diff&rev=111396&p1=geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/Recovery.java&r1=111395&p2=geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/Recovery.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/Recovery.java	(original)
+++ geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/Recovery.java	Thu Dec  9 07:41:29 2004
@@ -19,8 +19,8 @@
 
 import java.util.HashSet;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
+import java.util.Map;
 import javax.transaction.xa.XAException;
 import javax.transaction.xa.Xid;
 

Modified: geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java?view=diff&rev=111396&p1=geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java&r1=111395&p2=geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java	(original)
+++ geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java	Thu Dec  9 07:41:29 2004
@@ -17,6 +17,12 @@
 
 package org.apache.geronimo.transaction.manager;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 import java.util.Timer;
 import javax.transaction.HeuristicMixedException;
 import javax.transaction.HeuristicRollbackException;
@@ -29,6 +35,13 @@
 import javax.transaction.xa.XAException;
 import javax.transaction.xa.Xid;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.ReferenceCollection;
+import org.apache.geronimo.gbean.ReferenceCollectionEvent;
+import org.apache.geronimo.gbean.ReferenceCollectionListener;
 import org.apache.geronimo.transaction.ExtendedTransactionManager;
 import org.apache.geronimo.transaction.log.UnrecoverableLog;
 
@@ -39,26 +52,53 @@
  * @version $Rev$ $Date$
  */
 public class TransactionManagerImpl implements ExtendedTransactionManager, XidImporter {
-    private final TransactionLog txnLog;
-    private final XidFactory xidFactory;
+    final TransactionLog transactionLog;
+    final XidFactory xidFactory;
     private final int defaultTransactionTimeoutMilliseconds;
     private final ThreadLocal transactionTimeoutMilliseconds = new ThreadLocal();
     private final ThreadLocal threadTx = new ThreadLocal();
     private final Timer timeoutTimer = new Timer(true);
-
-    public TransactionManagerImpl() {
-        defaultTransactionTimeoutMilliseconds = 10 * 1000;
-        txnLog = new UnrecoverableLog();
-        xidFactory = new XidFactoryImpl();
-    }
-
-    public TransactionManagerImpl(int defaultTransactionTimeoutSeconds, TransactionLog txnLog, XidFactory xidFactory) {
+    private static final Log recoveryLog = LogFactory.getLog("RecoveryController");
+    final Recovery recovery;
+    final ReferenceCollection resourceManagers;
+    private List recoveryErrors = new ArrayList();
+
+    /**
+     * TODO NOTE!!! this should be called in an unspecified transaction context, but we cannot enforce this restriction!
+     */
+    public TransactionManagerImpl(int defaultTransactionTimeoutSeconds, TransactionLog transactionLog, Collection resourceManagers) throws XAException {
         if (defaultTransactionTimeoutSeconds <= 0) {
             throw new IllegalArgumentException("defaultTransactionTimeoutSeconds must be positive: attempted value: " + defaultTransactionTimeoutSeconds);
         }
+
         this.defaultTransactionTimeoutMilliseconds = defaultTransactionTimeoutSeconds * 1000;
-        this.txnLog = txnLog;
-        this.xidFactory = xidFactory;
+        this.transactionLog = transactionLog == null ? new UnrecoverableLog() : transactionLog;
+        this.xidFactory = new XidFactoryImpl("WHAT DO WE CALL IT?".getBytes());
+        this.resourceManagers = (ReferenceCollection) resourceManagers;
+        recovery = new RecoveryImpl(this.transactionLog, this.xidFactory);
+
+        if (resourceManagers != null) {
+            recovery.recoverLog();
+            List copy = null;
+            synchronized (resourceManagers) {
+                copy = new ArrayList(resourceManagers);
+                this.resourceManagers.addReferenceCollectionListener(new ReferenceCollectionListener() {
+                    public void memberAdded(ReferenceCollectionEvent event) {
+                        ResourceManager resourceManager = (ResourceManager) event.getMember();
+                        recoverResourceManager(resourceManager);
+                    }
+
+                    public void memberRemoved(ReferenceCollectionEvent event) {
+                    }
+
+                });
+            }
+            for (Iterator iterator = copy.iterator(); iterator.hasNext();) {
+                ResourceManager resourceManager = (ResourceManager) iterator.next();
+                recoverResourceManager(resourceManager);
+            }
+            //what to do if there are recovery errors? or not all resource managers are online?
+        }
     }
 
     public Transaction getTransaction() throws SystemException {
@@ -89,17 +129,17 @@
         if (getStatus() != Status.STATUS_NO_TRANSACTION) {
             throw new NotSupportedException("Nested Transactions are not supported");
         }
-        TransactionImpl tx = new TransactionImpl(xidFactory, txnLog);
+        TransactionImpl tx = new TransactionImpl(xidFactory, transactionLog);
         timeoutTimer.schedule(tx, getTransactionTimeoutMilliseconds(transactionTimeoutMilliseconds));
         threadTx.set(tx);
-        ((TransactionImpl)tx).setCurrentThread(Thread.currentThread());
+        ((TransactionImpl) tx).setCurrentThread(Thread.currentThread());
         return tx;
     }
 
     public Transaction suspend() throws SystemException {
         Transaction tx = getTransaction();
         if (tx != null) {
-            ((TransactionImpl)tx).setCurrentThread(null);
+            ((TransactionImpl) tx).setCurrentThread(null);
         }
         threadTx.set(null);
         return tx;
@@ -113,7 +153,7 @@
             throw new InvalidTransactionException("Cannot resume foreign transaction: " + tx);
         }
         threadTx.set(tx);
-        ((TransactionImpl)tx).setCurrentThread(Thread.currentThread());
+        ((TransactionImpl) tx).setCurrentThread(Thread.currentThread());
     }
 
     public void setRollbackOnly() throws IllegalStateException, SystemException {
@@ -133,7 +173,7 @@
             tx.commit();
         } finally {
             threadTx.set(null);
-            ((TransactionImpl)tx).setCurrentThread(null);
+            ((TransactionImpl) tx).setCurrentThread(null);
         }
     }
 
@@ -146,7 +186,7 @@
             tx.rollback();
         } finally {
             threadTx.set(null);
-            ((TransactionImpl)tx).setCurrentThread(null);
+            ((TransactionImpl) tx).setCurrentThread(null);
         }
     }
 
@@ -155,7 +195,7 @@
         if (transactionTimeoutMilliseconds < 0) {
             throw new SystemException("transaction timeout must be positive or 0 to reset to default");
         }
-        TransactionImpl tx = new TransactionImpl(xid, xidFactory, txnLog);
+        TransactionImpl tx = new TransactionImpl(xid, xidFactory, transactionLog);
         timeoutTimer.schedule(tx, getTransactionTimeoutMilliseconds(transactionTimeoutMilliseconds));
         return tx;
     }
@@ -219,4 +259,51 @@
         return defaultTransactionTimeoutMilliseconds;
     }
 
+    protected void recoverResourceManager(ResourceManager resourceManager) {
+        NamedXAResource namedXAResource = null;
+        try {
+            namedXAResource = resourceManager.getRecoveryXAResources();
+        } catch (SystemException e) {
+            recoveryLog.error(e);
+            recoveryErrors.add(e);
+            return;
+        }
+        if (namedXAResource != null) {
+            try {
+                recovery.recoverResourceManager(namedXAResource);
+            } catch (XAException e) {
+                recoveryLog.error(e);
+                recoveryErrors.add(e);
+            } finally {
+                resourceManager.returnResource(namedXAResource);
+            }
+        }
+    }
+
+
+    public Map getExternalXids() {
+        return new HashMap(recovery.getExternalXids());
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(TransactionManagerImpl.class);
+
+        infoBuilder.addAttribute("defaultTransactionTimeoutSeconds", int.class, true);
+        infoBuilder.addReference("TransactionLog", TransactionLog.class);
+        infoBuilder.addReference("ResourceManagers", ResourceManager.class);
+
+        infoBuilder.addInterface(ExtendedTransactionManager.class);
+        infoBuilder.addInterface(XidImporter.class);
+
+        infoBuilder.setConstructor(new String[]{"defaultTransactionTimeoutSeconds", "TransactionLog", "ResourceManagers"});
+
+        GBEAN_INFO = infoBuilder.getBeanInfo();
+    }
+
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
 }

Deleted: /geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/TransactionManagerProxyTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/TransactionManagerProxyTest.java?view=auto&rev=111395
==============================================================================

Modified: geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/context/TransactionContextManagerTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/context/TransactionContextManagerTest.java?view=diff&rev=111396&p1=geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/context/TransactionContextManagerTest.java&r1=111395&p2=geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/context/TransactionContextManagerTest.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/context/TransactionContextManagerTest.java	(original)
+++ geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/context/TransactionContextManagerTest.java	Thu Dec  9 07:41:29 2004
@@ -20,9 +20,8 @@
 import javax.transaction.xa.Xid;
 
 import junit.framework.TestCase;
-import org.apache.geronimo.transaction.GeronimoTransactionManager;
 import org.apache.geronimo.transaction.ImportedTransactionActiveException;
-import org.apache.geronimo.transaction.TransactionManagerProxy;
+import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
 import org.apache.geronimo.transaction.manager.XidFactory;
 import org.apache.geronimo.transaction.manager.XidFactoryImpl;
 
@@ -38,8 +37,8 @@
     private XidFactory xidFactory = new XidFactoryImpl("geronimo.test.tm".getBytes());
 
     protected void setUp() throws Exception {
-        TransactionManagerProxy tm = new GeronimoTransactionManager(1000, null, null);
-        transactionContextManager = new TransactionContextManager(tm, tm, tm);
+        TransactionManagerImpl tm = new TransactionManagerImpl(1000, null, null);
+        transactionContextManager = new TransactionContextManager(tm, tm);
     }
 
     protected void tearDown() throws Exception {

Modified: geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/ProtocolTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/ProtocolTest.java?view=diff&rev=111396&p1=geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/ProtocolTest.java&r1=111395&p2=geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/ProtocolTest.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/ProtocolTest.java	(original)
+++ geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/ProtocolTest.java	Thu Dec  9 07:41:29 2004
@@ -4,19 +4,17 @@
 import javax.transaction.xa.XAResource;
 
 import junit.framework.TestCase;
-import org.apache.geronimo.transaction.log.UnrecoverableLog;
 
 /**
  */
 public class ProtocolTest extends TestCase {
 
-    XidFactory xidFactory = new XidFactoryImpl("test".getBytes());
-    TransactionManagerImpl tm;
-    MockResourceManager mrm1, mrm2;
-    MockResource mr11, mr12, mr21, mr22;
+    private TransactionManagerImpl tm;
+    private MockResourceManager mrm1, mrm2;
+    private MockResource mr11, mr12, mr21, mr22;
 
     protected void setUp() throws Exception {
-        tm = new TransactionManagerImpl(10, new UnrecoverableLog(), xidFactory);
+        tm = new TransactionManagerImpl(1000, null, null);
         mrm1 = new MockResourceManager(true);
         mrm2 = new MockResourceManager(true);
         mr11 = new MockResource(mrm1, "mr11");

Modified: geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/TestTransactionManager.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/TestTransactionManager.java?view=diff&rev=111396&p1=geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/TestTransactionManager.java&r1=111395&p2=geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/TestTransactionManager.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/TestTransactionManager.java	(original)
+++ geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/TestTransactionManager.java	Thu Dec  9 07:41:29 2004
@@ -112,7 +112,7 @@
     }
 
     protected void setUp() throws Exception {
-        tm = new TransactionManagerImpl();
+        tm = new TransactionManagerImpl(10 * 1000, null, null);
         rm1 = new MockResourceManager(true);
         rm2 = new MockResourceManager(true);
         rm3 = new MockResourceManager(false);

Copied: geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/TransactionManagerImplTest.java (from r111234, geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/TransactionManagerProxyTest.java)
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/TransactionManagerImplTest.java?view=diff&rev=111396&p1=geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/TransactionManagerProxyTest.java&r1=111234&p2=geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/TransactionManagerImplTest.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/TransactionManagerProxyTest.java	(original)
+++ geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/TransactionManagerImplTest.java	Thu Dec  9 07:41:29 2004
@@ -15,11 +15,10 @@
  *  limitations under the License.
  */
 
-package org.apache.geronimo.transaction;
+package org.apache.geronimo.transaction.manager;
 
 import java.util.ArrayList;
 import java.util.Map;
-
 import javax.transaction.RollbackException;
 import javax.transaction.Status;
 import javax.transaction.Transaction;
@@ -30,20 +29,11 @@
 import org.apache.geronimo.gbean.ReferenceCollection;
 import org.apache.geronimo.gbean.ReferenceCollectionEvent;
 import org.apache.geronimo.gbean.ReferenceCollectionListener;
-import org.apache.geronimo.transaction.manager.MockLog;
-import org.apache.geronimo.transaction.manager.MockResource;
-import org.apache.geronimo.transaction.manager.MockResourceManager;
-import org.apache.geronimo.transaction.manager.Recovery;
-import org.apache.geronimo.transaction.manager.RecoveryImpl;
-import org.apache.geronimo.transaction.manager.TransactionLog;
-import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
-import org.apache.geronimo.transaction.manager.XidFactory;
-import org.apache.geronimo.transaction.manager.XidFactoryImpl;
 
 /**
  * @version $Rev$ $Date$
  */
-public class TransactionManagerProxyTest extends TestCase {
+public class TransactionManagerImplTest extends TestCase {
 
     MockResourceManager rm1 = new MockResourceManager(true);
     MockResource r1_1 = rm1.getResource("rm1_1");
@@ -54,19 +44,14 @@
 
     TransactionLog transactionLog = new MockLog();
 
-    XidFactory xidFactory = new XidFactoryImpl("tm1".getBytes());
-    TransactionManagerImpl transactionManager;
-    Recovery recovery = new RecoveryImpl(transactionLog, xidFactory);
     ReferenceCollection resourceManagers = new TestReferenceCollection();
-    TransactionManagerProxy tm;
+    TransactionManagerImpl tm;
 
     protected void setUp() throws Exception {
-        transactionManager = new TransactionManagerImpl(10, transactionLog, xidFactory);
-        tm = new TransactionManagerProxy(transactionManager, transactionManager, recovery, resourceManagers);
+        tm = new TransactionManagerImpl(10, transactionLog, resourceManagers);
     }
 
     protected void tearDown() throws Exception {
-        transactionManager = null;
         tm = null;
     }
 
@@ -261,7 +246,7 @@
     //This test depends on using the resource that will be recovered by the resource manager.
     public void testSimpleRecovery() throws Exception {
         //create a transaction in our own transaction manager
-        Xid xid = xidFactory.createXid();
+        Xid xid = tm.xidFactory.createXid();
         Transaction tx = tm.importXid(xid, 0);
         tm.resume(tx);
         assertSame(tx, tm.getTransaction());
@@ -272,13 +257,13 @@
         tm.suspend();
         tm.prepare(tx);
         //recover
+        tm.recovery.recoverLog();
         resourceManagers.add(rm1);
-        tm.doStart();
         assertTrue(r1_2.isCommitted());
         assertTrue(!r2_2.isCommitted());
         resourceManagers.add(rm2);
         assertTrue(r2_2.isCommitted());
-        assertTrue(recovery.localRecoveryComplete());
+        assertTrue(tm.recovery.localRecoveryComplete());
     }
 
     public void testImportedXidRecovery() throws Exception {
@@ -295,14 +280,14 @@
         tm.suspend();
         tm.prepare(tx);
         //recover
+        tm.recovery.recoverLog();
         resourceManagers.add(rm1);
-        tm.doStart();
         assertTrue(!r1_2.isCommitted());
         assertTrue(!r2_2.isCommitted());
         resourceManagers.add(rm2);
         assertTrue(!r2_2.isCommitted());
         //there are no transactions started here, so local recovery is complete
-        assertTrue(recovery.localRecoveryComplete());
+        assertTrue(tm.recovery.localRecoveryComplete());
         Map recovered = tm.getExternalXids();
         assertEquals(1, recovered.size());
         assertEquals(xid, recovered.keySet().iterator().next());
@@ -310,7 +295,6 @@
 
     public void testResourceManagerContract() throws Exception {
         resourceManagers.add(rm1);
-        tm.doStart();
         assertTrue(rm1.areAllResourcesReturned());
     }
 

Modified: geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/XATransactionTester.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/XATransactionTester.java?view=diff&rev=111396&p1=geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/XATransactionTester.java&r1=111395&p2=geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/XATransactionTester.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/XATransactionTester.java	(original)
+++ geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/XATransactionTester.java	Thu Dec  9 07:41:29 2004
@@ -19,12 +19,9 @@
 
 import java.sql.Connection;
 import java.sql.Statement;
-import java.util.Map;
-import java.util.List;
-import java.util.Set;
-import java.util.Collection;
 import java.util.ArrayList;
-
+import java.util.Collection;
+import java.util.List;
 import javax.sql.XAConnection;
 import javax.sql.XADataSource;
 import javax.transaction.TransactionManager;
@@ -38,7 +35,6 @@
  * @version $Rev$ $Date$
  */
 public class XATransactionTester {
-    private TransactionLog log;
     private TransactionManager manager;
     private XADataSource ds;
     private Xid xid;
@@ -51,9 +47,7 @@
         ds = getDataSource(args);
         XAConnection xaConn = ds.getXAConnection("test", "test");
         XAResource xaRes = xaConn.getXAResource();
-        log = new DummyLog();
-        XidFactory xidFactory = new XidFactoryImpl();
-        manager = new TransactionManagerImpl(10, log, xidFactory);
+        manager = new TransactionManagerImpl(10, new DummyLog(), null);
         Connection c = xaConn.getConnection();
         Statement s = c.createStatement();
 

Modified: geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/XidImporterTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/XidImporterTest.java?view=diff&rev=111396&p1=geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/XidImporterTest.java&r1=111395&p2=geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/XidImporterTest.java&r2=111396
==============================================================================
--- geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/XidImporterTest.java	(original)
+++ geronimo/trunk/modules/transaction/src/test/org/apache/geronimo/transaction/manager/XidImporterTest.java	Thu Dec  9 07:41:29 2004
@@ -40,8 +40,12 @@
     MockResource r2_1 = new MockResource(rm2, "rm2");
     MockResource r2_2 = new MockResource(rm2, "rm2");
 
-    XidImporter tm = new TransactionManagerImpl();
+    XidImporter tm;
     XidFactory xidFactory = new XidFactoryImpl();
+
+    protected void setUp() throws Exception {
+        tm = new TransactionManagerImpl(10 * 1000, null, null);
+    }
 
     public void testImportXid() throws Exception {
         Xid externalXid = xidFactory.createXid();

Mime
View raw message