geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r430508 [3/5] - in /geronimo/trunk: ./ applications/magicGball/magicGball-ear/src/plan/ applications/magicGball/src/plan/ configs/client-corba/src/plan/ configs/client-deployer/src/plan/ configs/client/src/plan/ configs/j2ee-corba/src/plan/...
Date Thu, 10 Aug 2006 19:56:58 GMT
Modified: geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionCachingInterceptorTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionCachingInterceptorTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- 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 Aug 10 12:56:47 2006
@@ -18,11 +18,12 @@
 package org.apache.geronimo.connector.outbound;
 
 import javax.resource.ResourceException;
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+import javax.transaction.Status;
 
-import org.apache.geronimo.transaction.context.TransactionContextManager;
-import org.apache.geronimo.transaction.context.TransactionContext;
+import org.apache.geronimo.connector.ConnectorTransactionContext;
 import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
-import org.apache.geronimo.transaction.manager.XidFactoryImpl;
 
 /**
  *
@@ -31,35 +32,30 @@
  *
  * */
 public class TransactionCachingInterceptorTest extends ConnectionInterceptorTestUtils {
-
-    private TransactionManagerImpl transactionManager;
-    private TransactionContextManager transactionContextManager;
+    private TransactionManager transactionManager;
     private TransactionCachingInterceptor transactionCachingInterceptor;
 
     protected void setUp() throws Exception {
         super.setUp();
-        transactionManager = new TransactionManagerImpl(10 * 1000, 
-                new XidFactoryImpl("WHAT DO WE CALL IT?".getBytes()), null, null);
-        transactionContextManager = new TransactionContextManager(transactionManager, transactionManager);
-        transactionCachingInterceptor = new TransactionCachingInterceptor(this, transactionContextManager);
+        transactionManager = new TransactionManagerImpl();
+        transactionCachingInterceptor = new TransactionCachingInterceptor(this, transactionManager);
     }
 
     protected void tearDown() throws Exception {
         super.tearDown();
         transactionManager = null;
-        transactionContextManager = null;
         transactionCachingInterceptor = null;
     }
 
     public void testGetConnectionInTransaction() throws Exception {
-        TransactionContext transactionContext = transactionContextManager.newContainerTransactionContext();
+        transactionManager.begin();
         ConnectionInfo connectionInfo1 = makeConnectionInfo();
         transactionCachingInterceptor.getConnection(connectionInfo1);
         assertTrue("Expected to get an initial connection", obtainedConnectionInfo != null);
         assertTrue("Expected nothing returned yet", returnedConnectionInfo == null);
         assertTrue("Expected the same ManagedConnectionInfo in the TransactionContext as was returned",
                 connectionInfo1.getManagedConnectionInfo()
-                == getSharedManagedConnectionInfo(transactionContext));
+                == getSharedManagedConnectionInfo(transactionManager.getTransaction()));
         obtainedConnectionInfo = null;
         ConnectionInfo connectionInfo2 = new ConnectionInfo();
         transactionCachingInterceptor.getConnection(connectionInfo2);
@@ -68,26 +64,24 @@
         assertTrue("Expected the same ManagedConnectionInfo in both ConnectionInfos",
                 connectionInfo1.getManagedConnectionInfo() == connectionInfo2.getManagedConnectionInfo());
         assertTrue("Expected the same ManagedConnectionInfo in the TransactionContext as was returned",
-                connectionInfo1.getManagedConnectionInfo() == getSharedManagedConnectionInfo(transactionContext));
+                connectionInfo1.getManagedConnectionInfo() == getSharedManagedConnectionInfo(transactionManager.getTransaction()));
         //commit, see if connection returned.
         //we didn't create any handles, so the "ManagedConnection" should be returned.
-        assertTrue("Expected TransactionContext to report active", transactionContext.isActive());
-        transactionContext.commit();
+        assertTrue("Expected TransactionContext to report active", TxUtil.isTransactionActive(transactionManager));
+        transactionManager.commit();
         assertTrue("Expected connection to be returned", returnedConnectionInfo != null);
-        assertTrue("Expected TransactionContext to report inactive", !transactionContext.isActive());
+        assertTrue("Expected TransactionContext to report inactive", !TxUtil.isTransactionActive(transactionManager));
 
     }
 
     public void testGetUnshareableConnectionsInTransaction() throws Exception {
-        TransactionContext transactionContext = transactionContextManager.newContainerTransactionContext();
+        transactionManager.begin();
         ConnectionInfo connectionInfo1 = makeConnectionInfo();
         connectionInfo1.setUnshareable(true);
         transactionCachingInterceptor.getConnection(connectionInfo1);
         assertTrue("Expected to get an initial connection", obtainedConnectionInfo != null);
         assertTrue("Expected nothing returned yet", returnedConnectionInfo == null);
-        assertTrue("Expected different ManagedConnectionInfo in the TransactionContext as was returned",
-                connectionInfo1.getManagedConnectionInfo()
-                != getSharedManagedConnectionInfo(transactionContext));
+
         //2nd is shared, modelling a call into another ejb
         obtainedConnectionInfo = null;
         ConnectionInfo connectionInfo2 = makeConnectionInfo();
@@ -96,8 +90,7 @@
         assertTrue("Expected nothing returned yet", returnedConnectionInfo == null);
         assertTrue("Expected the same ManagedConnectionInfo in both ConnectionInfos",
                 connectionInfo1.getManagedConnectionInfo() != connectionInfo2.getManagedConnectionInfo());
-        assertTrue("Expected the same ManagedConnectionInfo in the TransactionContext as was returned",
-                connectionInfo2.getManagedConnectionInfo() == getSharedManagedConnectionInfo(transactionContext));
+
         //3rd is unshared, modelling a call into a third ejb
         obtainedConnectionInfo = null;
         ConnectionInfo connectionInfo3 = makeConnectionInfo();
@@ -107,22 +100,21 @@
         assertTrue("Expected nothing returned yet", returnedConnectionInfo == null);
         assertTrue("Expected different ManagedConnectionInfo in both unshared ConnectionInfos",
                 connectionInfo1.getManagedConnectionInfo() != connectionInfo3.getManagedConnectionInfo());
-        assertTrue("Expected different ManagedConnectionInfo in the TransactionContext as was returned",
-                connectionInfo3.getManagedConnectionInfo() != getSharedManagedConnectionInfo(transactionContext));
+
         //commit, see if connection returned.
         //we didn't create any handles, so the "ManagedConnection" should be returned.
-        assertTrue("Expected TransactionContext to report active", transactionContext.isActive());
-        transactionContext.commit();
+        assertTrue("Expected TransactionContext to report active", transactionManager.getStatus() == Status.STATUS_ACTIVE);
+        transactionManager.commit();
         assertTrue("Expected connection to be returned", returnedConnectionInfo != null);
-        assertTrue("Expected TransactionContext to report inactive", !transactionContext.isActive());
     }
 
-    private ManagedConnectionInfo getSharedManagedConnectionInfo(TransactionContext transactionContext) {
-        return ((TransactionCachingInterceptor.ManagedConnectionInfos)transactionContext.getManagedConnectionInfo(transactionCachingInterceptor)).getShared();
+    private ManagedConnectionInfo getSharedManagedConnectionInfo(Transaction transaction) {
+        if (transaction == null) return null;
+        ConnectorTransactionContext connectorTransactionContext = ConnectorTransactionContext.get(transaction);
+        return ((TransactionCachingInterceptor.ManagedConnectionInfos)connectorTransactionContext.getManagedConnectionInfo(transactionCachingInterceptor)).getShared();
     }
 
     public void testGetConnectionOutsideTransaction() throws Exception {
-        transactionContextManager.newUnspecifiedTransactionContext();
         ConnectionInfo connectionInfo1 = makeConnectionInfo();
         transactionCachingInterceptor.getConnection(connectionInfo1);
         assertTrue("Expected to get an initial connection", obtainedConnectionInfo != null);
@@ -143,14 +135,14 @@
     }
 
     public void testTransactionIndependence() throws Exception {
-        TransactionContext transactionContext1 = transactionContextManager.newContainerTransactionContext();
+        transactionManager.begin();
         ConnectionInfo connectionInfo1 = makeConnectionInfo();
         transactionCachingInterceptor.getConnection(connectionInfo1);
         obtainedConnectionInfo = null;
 
         //start a second transaction
-        transactionContext1.suspend();
-        TransactionContext transactionContext2 = transactionContextManager.newContainerTransactionContext();
+        Transaction suspendedTransaction = transactionManager.suspend();
+        transactionManager.begin();
         ConnectionInfo connectionInfo2 = makeConnectionInfo();
         transactionCachingInterceptor.getConnection(connectionInfo2);
         assertTrue("Expected to get a second connection", obtainedConnectionInfo != null);
@@ -158,19 +150,19 @@
         assertTrue("Expected different ManagedConnectionInfo in each ConnectionInfos",
                 connectionInfo1.getManagedConnectionInfo() != connectionInfo2.getManagedConnectionInfo());
         assertTrue("Expected the same ManagedConnectionInfo in the TransactionContext as was returned",
-                connectionInfo2.getManagedConnectionInfo() == getSharedManagedConnectionInfo(transactionContext2));
+                connectionInfo2.getManagedConnectionInfo() == getSharedManagedConnectionInfo(transactionManager.getTransaction()));
         //commit 2nd transaction, see if connection returned.
         //we didn't create any handles, so the "ManagedConnection" should be returned.
-        assertTrue("Expected TransactionContext to report active", transactionContext2.isActive());
-        transactionContext2.commit();
+        assertTrue("Expected TransactionContext to report active", transactionManager.getStatus() == Status.STATUS_ACTIVE);
+        transactionManager.commit();
         assertTrue("Expected connection to be returned", returnedConnectionInfo != null);
-        assertTrue("Expected TransactionContext to report inactive", !transactionContext2.isActive());
+        assertTrue("Expected TransactionContext to report inactive", transactionManager.getStatus() == Status.STATUS_NO_TRANSACTION);
         returnedConnectionInfo = null;
         //resume first transaction
-        transactionContext1.resume();
-        transactionContext1.commit();
+        transactionManager.resume(suspendedTransaction);
+        transactionManager.commit();
         assertTrue("Expected connection to be returned", returnedConnectionInfo != null);
-        assertTrue("Expected TransactionContext to report inactive", !transactionContext1.isActive());
+        assertTrue("Expected TransactionContext to report inactive", transactionManager.getStatus() == Status.STATUS_NO_TRANSACTION);
     }
 
 //interface implementations

Modified: geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionEnlistingInterceptorTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/TransactionEnlistingInterceptorTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- 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 Aug 10 12:56:47 2006
@@ -21,9 +21,8 @@
 import javax.transaction.xa.XAException;
 import javax.transaction.xa.XAResource;
 import javax.transaction.xa.Xid;
+import javax.transaction.TransactionManager;
 
-import org.apache.geronimo.transaction.context.TransactionContext;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
 import org.apache.geronimo.transaction.manager.NamedXAResource;
 import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
 import org.apache.geronimo.transaction.manager.XidFactoryImpl;
@@ -34,22 +33,18 @@
  * @version $Rev$ $Date$
  *
  * */
-public class TransactionEnlistingInterceptorTest extends ConnectionInterceptorTestUtils
-        implements NamedXAResource {
-
+public class TransactionEnlistingInterceptorTest extends ConnectionInterceptorTestUtils implements NamedXAResource {
     private TransactionEnlistingInterceptor transactionEnlistingInterceptor;
     private boolean started;
     private boolean ended;
     private boolean returned;
     private boolean committed;
-    private TransactionContextManager transactionContextManager;
+    private TransactionManager transactionManager;
 
     protected void setUp() throws Exception {
         super.setUp();
-        TransactionManagerImpl transactionManager = new TransactionManagerImpl(10 * 1000, 
-                new XidFactoryImpl("WHAT DO WE CALL IT?".getBytes()), null, null);
-        transactionContextManager = new TransactionContextManager(transactionManager, transactionManager);
-        transactionEnlistingInterceptor = new TransactionEnlistingInterceptor(this, transactionContextManager);
+        transactionManager = new TransactionManagerImpl();
+        transactionEnlistingInterceptor = new TransactionEnlistingInterceptor(this, this.transactionManager);
     }
 
     protected void tearDown() throws Exception {
@@ -63,7 +58,6 @@
 
     public void testNoTransaction() throws Exception {
         ConnectionInfo connectionInfo = makeConnectionInfo();
-        transactionContextManager.newUnspecifiedTransactionContext();
         transactionEnlistingInterceptor.getConnection(connectionInfo);
         assertTrue("Expected not started", !started);
         assertTrue("Expected not ended", !ended);
@@ -73,7 +67,7 @@
     }
 
     public void testTransactionShareableConnection() throws Exception {
-        TransactionContext transactionContext = transactionContextManager.newContainerTransactionContext();
+        transactionManager.begin();
         ConnectionInfo connectionInfo = makeConnectionInfo();
         transactionEnlistingInterceptor.getConnection(connectionInfo);
         assertTrue("Expected started", started);
@@ -83,12 +77,12 @@
         assertTrue("Expected not started", !started);
         assertTrue("Expected ended", ended);
         assertTrue("Expected returned", returned);
-        transactionContext.commit();
+        transactionManager.commit();
         assertTrue("Expected committed", committed);
     }
 
     public void testTransactionUnshareableConnection() throws Exception {
-        TransactionContext transactionContext = transactionContextManager.newContainerTransactionContext();
+        transactionManager.begin();
         ConnectionInfo connectionInfo = makeConnectionInfo();
         connectionInfo.setUnshareable(true);
         transactionEnlistingInterceptor.getConnection(connectionInfo);
@@ -99,7 +93,7 @@
         assertTrue("Expected not started", !started);
         assertTrue("Expected ended", ended);
         assertTrue("Expected returned", returned);
-        transactionContext.commit();
+        transactionManager.commit();
         assertTrue("Expected committed", committed);
     }
 

Modified: geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/connectiontracking/ConnectionTrackingCoordinatorTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/connectiontracking/ConnectionTrackingCoordinatorTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/connectiontracking/ConnectionTrackingCoordinatorTest.java (original)
+++ geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/connectiontracking/ConnectionTrackingCoordinatorTest.java Thu Aug 10 12:56:47 2006
@@ -31,8 +31,8 @@
 import org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor;
 import org.apache.geronimo.connector.outbound.ManagedConnectionInfo;
 import org.apache.geronimo.connector.outbound.GeronimoConnectionEventListener;
-import org.apache.geronimo.transaction.DefaultInstanceContext;
-import org.apache.geronimo.transaction.InstanceContext;
+import org.apache.geronimo.connector.outbound.connectiontracking.ConnectorInstanceContextImpl;
+import org.apache.geronimo.connector.outbound.connectiontracking.ConnectorInstanceContext;
 
 /**
  *
@@ -67,23 +67,23 @@
     }
 
     public void testSimpleComponentContextLifecyle() throws Exception {
-        DefaultInstanceContext componentContext = new DefaultInstanceContext(unshareableResources, applicationManagedSecurityResources);
-        InstanceContext oldInstanceContext = connectionTrackingCoordinator.enter(componentContext);
-        assertNull("Expected old instance context to be null", oldInstanceContext);
+        ConnectorInstanceContextImpl componentContext = new ConnectorInstanceContextImpl(unshareableResources, applicationManagedSecurityResources);
+        ConnectorInstanceContext oldConnectorInstanceContext = connectionTrackingCoordinator.enter(componentContext);
+        assertNull("Expected old instance context to be null", oldConnectorInstanceContext);
         //give the context a ConnectionInfo
         ConnectionInfo connectionInfo = newConnectionInfo();
         connectionTrackingCoordinator.handleObtained(key1, connectionInfo);
-        connectionTrackingCoordinator.exit(oldInstanceContext);
+        connectionTrackingCoordinator.exit(oldConnectorInstanceContext);
         Map connectionManagerMap = componentContext.getConnectionManagerMap();
         Set infos = (Set) connectionManagerMap.get(key1);
         assertEquals("Expected one connection for key1", 1, infos.size());
         assertTrue("Expected to get supplied ConnectionInfo from infos", connectionInfo == infos.iterator().next());
 
         //Enter again, and close the handle
-        oldInstanceContext = connectionTrackingCoordinator.enter(componentContext);
-        assertNull("Expected old instance context to be null", oldInstanceContext);
+        oldConnectorInstanceContext = connectionTrackingCoordinator.enter(componentContext);
+        assertNull("Expected old instance context to be null", oldConnectorInstanceContext);
         connectionTrackingCoordinator.handleReleased(key1, connectionInfo);
-        connectionTrackingCoordinator.exit(oldInstanceContext);
+        connectionTrackingCoordinator.exit(oldConnectorInstanceContext);
         connectionManagerMap = componentContext.getConnectionManagerMap();
         infos = (Set) connectionManagerMap.get(key1);
         assertEquals("Expected no connection set for key1", null, infos);
@@ -99,22 +99,22 @@
     }
 
     public void testNestedComponentContextLifecyle() throws Exception {
-        DefaultInstanceContext componentContext1 = new DefaultInstanceContext(unshareableResources, applicationManagedSecurityResources);
-        InstanceContext oldInstanceContext1 = connectionTrackingCoordinator.enter(componentContext1);
-        assertNull("Expected old component context to be null", oldInstanceContext1);
+        ConnectorInstanceContextImpl componentContext1 = new ConnectorInstanceContextImpl(unshareableResources, applicationManagedSecurityResources);
+        ConnectorInstanceContext oldConnectorInstanceContext1 = connectionTrackingCoordinator.enter(componentContext1);
+        assertNull("Expected old component context to be null", oldConnectorInstanceContext1);
         //give the context a ConnectionInfo
         ConnectionInfo connectionInfo1 = newConnectionInfo();
         connectionTrackingCoordinator.handleObtained(key1, connectionInfo1);
 
         //Simulate calling another component
-        DefaultInstanceContext componentContext2 = new DefaultInstanceContext(unshareableResources, applicationManagedSecurityResources);
-        InstanceContext oldInstanceContext2 = connectionTrackingCoordinator.enter(componentContext2);
-        assertTrue("Expected returned component context to be componentContext1", oldInstanceContext2 == componentContext1);
+        ConnectorInstanceContextImpl componentContext2 = new ConnectorInstanceContextImpl(unshareableResources, applicationManagedSecurityResources);
+        ConnectorInstanceContext oldConnectorInstanceContext2 = connectionTrackingCoordinator.enter(componentContext2);
+        assertTrue("Expected returned component context to be componentContext1", oldConnectorInstanceContext2 == componentContext1);
         //give the context a ConnectionInfo
         ConnectionInfo connectionInfo2 = newConnectionInfo();
         connectionTrackingCoordinator.handleObtained(key2, connectionInfo2);
 
-        connectionTrackingCoordinator.exit(oldInstanceContext2);
+        connectionTrackingCoordinator.exit(oldConnectorInstanceContext2);
         Map connectionManagerMap2 = componentContext2.getConnectionManagerMap();
         Set infos2 = (Set) connectionManagerMap2.get(key2);
         assertEquals("Expected one connection for key2", 1, infos2.size());
@@ -122,7 +122,7 @@
         assertEquals("Expected no connection for key1", null, connectionManagerMap2.get(key1));
 
 
-        connectionTrackingCoordinator.exit(oldInstanceContext1);
+        connectionTrackingCoordinator.exit(oldConnectorInstanceContext1);
         Map connectionManagerMap1 = componentContext1.getConnectionManagerMap();
         Set infos1 = (Set) connectionManagerMap1.get(key1);
         assertEquals("Expected one connection for key1", 1, infos1.size());
@@ -130,10 +130,10 @@
         assertEquals("Expected no connection for key2", null, connectionManagerMap1.get(key2));
 
         //Enter again, and close the handle
-        oldInstanceContext1 = connectionTrackingCoordinator.enter(componentContext1);
-        assertNull("Expected old component context to be null", oldInstanceContext1);
+        oldConnectorInstanceContext1 = connectionTrackingCoordinator.enter(componentContext1);
+        assertNull("Expected old component context to be null", oldConnectorInstanceContext1);
         connectionTrackingCoordinator.handleReleased(key1, connectionInfo1);
-        connectionTrackingCoordinator.exit(oldInstanceContext1);
+        connectionTrackingCoordinator.exit(oldConnectorInstanceContext1);
         connectionManagerMap1 = componentContext1.getConnectionManagerMap();
         infos1 = (Set) connectionManagerMap1.get(key1);
         assertEquals("Expected no connection set for key1", null, infos1);

Modified: geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/connectiontracking/DefaultComponentInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/connectiontracking/DefaultComponentInterceptor.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/connectiontracking/DefaultComponentInterceptor.java (original)
+++ geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/connectiontracking/DefaultComponentInterceptor.java Thu Aug 10 12:56:47 2006
@@ -17,10 +17,8 @@
 
 package org.apache.geronimo.connector.outbound.connectiontracking;
 
-import org.apache.geronimo.transaction.InstanceContext;
-import org.apache.geronimo.transaction.TrackedConnectionAssociator;
-import org.apache.geronimo.transaction.context.TransactionContext;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
+import org.apache.geronimo.connector.outbound.connectiontracking.ConnectorInstanceContext;
+import org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator;
 
 /**
  * Sample functionality for an interceptor that enables connection caching and obtaining
@@ -32,34 +30,18 @@
 
     private final DefaultInterceptor next;
     private final TrackedConnectionAssociator trackedConnectionAssociator;
-    private final TransactionContextManager transactionContextManager;
 
-    public DefaultComponentInterceptor(DefaultInterceptor next,
-                                       TrackedConnectionAssociator trackedConnectionAssociator,
-                                       TransactionContextManager transactionContextManager) {
+    public DefaultComponentInterceptor(DefaultInterceptor next, TrackedConnectionAssociator trackedConnectionAssociator) {
         this.next = next;
         this.trackedConnectionAssociator = trackedConnectionAssociator;
-        this.transactionContextManager = transactionContextManager;
     }
 
-    public Object invoke(InstanceContext newInstanceContext) throws Throwable {
-        TransactionContext transactionContext = transactionContextManager.getContext();
-        if (transactionContext == null) {
-            transactionContextManager.newUnspecifiedTransactionContext();
-        }
+    public Object invoke(ConnectorInstanceContext newConnectorInstanceContext) throws Throwable {
+        ConnectorInstanceContext oldConnectorInstanceContext = trackedConnectionAssociator.enter(newConnectorInstanceContext);
         try {
-            InstanceContext oldInstanceContext = trackedConnectionAssociator.enter(newInstanceContext);
-            try {
-                return next.invoke(newInstanceContext);
-            } finally {
-                trackedConnectionAssociator.exit(oldInstanceContext);
-            }
+            return next.invoke(newConnectorInstanceContext);
         } finally {
-            if (transactionContext == null) {
-                transactionContext = transactionContextManager.getContext();
-                transactionContext.commit();
-                transactionContextManager.setContext(null);
-            }
+            trackedConnectionAssociator.exit(oldConnectorInstanceContext);
         }
     }
 }

Modified: geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/connectiontracking/DefaultInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/connectiontracking/DefaultInterceptor.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/connectiontracking/DefaultInterceptor.java (original)
+++ geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/outbound/connectiontracking/DefaultInterceptor.java Thu Aug 10 12:56:47 2006
@@ -17,7 +17,7 @@
 
 package org.apache.geronimo.connector.outbound.connectiontracking;
 
-import org.apache.geronimo.transaction.InstanceContext;
+import org.apache.geronimo.connector.outbound.connectiontracking.ConnectorInstanceContext;
 
 
 /**
@@ -28,5 +28,5 @@
  * */
 public interface DefaultInterceptor {
 
-    Object invoke(InstanceContext newInstanceContext) throws Throwable;
+    Object invoke(ConnectorInstanceContext newConnectorInstanceContext) throws Throwable;
 }

Modified: geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/work/PooledWorkManagerTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/work/PooledWorkManagerTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/work/PooledWorkManagerTest.java (original)
+++ geronimo/trunk/modules/connector/src/test/org/apache/geronimo/connector/work/PooledWorkManagerTest.java Thu Aug 10 12:56:47 2006
@@ -25,8 +25,9 @@
 import javax.resource.spi.work.WorkListener;
 
 import junit.framework.TestCase;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
 import org.apache.geronimo.pool.ThreadPool;
+import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
+import org.apache.geronimo.transaction.manager.XAWork;
 
 /**
  * Timing is crucial for this test case, which focuses on the synchronization
@@ -39,10 +40,11 @@
     private GeronimoWorkManager workManager;
 
     protected void setUp() throws Exception {
-        TransactionContextManager transactionContextManager = new TransactionContextManager();
+        super.setUp();
+        XAWork xaWork = new GeronimoTransactionManager();
         ThreadPool pool = new ThreadPool(1, "Connector Test", 30000, ThreadPool.class.getClassLoader(), "foo:test=bar");
         pool.setWaitWhenBlocked(true);
-        workManager = new GeronimoWorkManager(pool, pool, pool, transactionContextManager);
+        workManager = new GeronimoWorkManager(pool, pool, pool, xaWork);
         workManager.doStart();
     }
 

Modified: geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java (original)
+++ geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java Thu Aug 10 12:56:47 2006
@@ -29,7 +29,7 @@
 import org.apache.xmlbeans.XmlObject;
 
 /**
- * @version $Rev: 385487 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class AppClientModule extends Module {
     private final Environment clientEnvironment;

Modified: geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java (original)
+++ geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java Thu Aug 10 12:56:47 2006
@@ -28,7 +28,7 @@
 import org.apache.xmlbeans.XmlObject;
 
 /**
- * @version $Rev: 385487 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class ConnectorModule extends Module {
     public ConnectorModule(boolean standAlone, AbstractName moduleName, Environment environment, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) {

Modified: geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java (original)
+++ geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java Thu Aug 10 12:56:47 2006
@@ -113,7 +113,6 @@
     private final Environment defaultEnvironment;
     private final AbstractNameQuery serverName;
     private final AbstractNameQuery transactionManagerObjectName;
-    private final AbstractNameQuery transactionContextManagerObjectName;
     private final AbstractNameQuery connectionTrackerObjectName;
     private final AbstractNameQuery transactionalTimerObjectName;
     private final AbstractNameQuery nonTransactionalTimerObjectName;
@@ -122,7 +121,6 @@
 
     public EARConfigBuilder(Environment defaultEnvironment,
             AbstractNameQuery transactionManagerAbstractName,
-            AbstractNameQuery transactionContextManagerAbstractName,
             AbstractNameQuery connectionTrackerAbstractName,
             AbstractNameQuery transactionalTimerAbstractName,
             AbstractNameQuery nonTransactionalTimerAbstractName,
@@ -139,7 +137,6 @@
             Kernel kernel) {
         this(defaultEnvironment,
                 transactionManagerAbstractName,
-                transactionContextManagerAbstractName,
                 connectionTrackerAbstractName,
                 transactionalTimerAbstractName,
                 nonTransactionalTimerAbstractName,
@@ -158,7 +155,6 @@
     }
     public EARConfigBuilder(Environment defaultEnvironment,
             AbstractNameQuery transactionManagerAbstractName,
-            AbstractNameQuery transactionContextManagerAbstractName,
             AbstractNameQuery connectionTrackerAbstractName,
             AbstractNameQuery transactionalTimerAbstractName,
             AbstractNameQuery nonTransactionalTimerAbstractName,
@@ -175,7 +171,6 @@
             Naming naming) {
         this(defaultEnvironment,
                 transactionManagerAbstractName,
-                transactionContextManagerAbstractName,
                 connectionTrackerAbstractName,
                 transactionalTimerAbstractName,
                 nonTransactionalTimerAbstractName,
@@ -195,7 +190,6 @@
 
     private EARConfigBuilder(Environment defaultEnvironment,
             AbstractNameQuery transactionManagerAbstractName,
-            AbstractNameQuery transactionContextManagerAbstractName,
             AbstractNameQuery connectionTrackerAbstractName,
             AbstractNameQuery transactionalTimerAbstractName,
             AbstractNameQuery nonTransactionalTimerAbstractName,
@@ -223,7 +217,6 @@
         this.appClientConfigBuilder = appClientConfigBuilder;
         this.serviceReferenceBuilder = serviceReferenceBuilder;
         this.transactionManagerObjectName = transactionManagerAbstractName;
-        this.transactionContextManagerObjectName = transactionContextManagerAbstractName;
         this.connectionTrackerObjectName = connectionTrackerAbstractName;
         this.transactionalTimerObjectName = transactionalTimerAbstractName;
         this.nonTransactionalTimerObjectName = nonTransactionalTimerAbstractName;
@@ -460,7 +453,6 @@
                     serverName,
                     applicationInfo.getBaseName(),
                     transactionManagerObjectName,
-                    transactionContextManagerObjectName,
                     connectionTrackerObjectName,
                     transactionalTimerObjectName,
                     nonTransactionalTimerObjectName,
@@ -921,7 +913,6 @@
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EARConfigBuilder.class, NameFactory.CONFIG_BUILDER);
         infoFactory.addAttribute("defaultEnvironment", Environment.class, true, true);
         infoFactory.addAttribute("transactionManagerAbstractName", AbstractNameQuery.class, true);
-        infoFactory.addAttribute("transactionContextManagerAbstractName", AbstractNameQuery.class, true);
         infoFactory.addAttribute("connectionTrackerAbstractName", AbstractNameQuery.class, true);
         infoFactory.addAttribute("transactionalTimerAbstractName", AbstractNameQuery.class, true);
         infoFactory.addAttribute("nonTransactionalTimerAbstractName", AbstractNameQuery.class, true);
@@ -944,7 +935,6 @@
         infoFactory.setConstructor(new String[]{
                 "defaultEnvironment",
                 "transactionManagerAbstractName",
-                "transactionContextManagerAbstractName",
                 "connectionTrackerAbstractName",
                 "transactionalTimerAbstractName",
                 "nonTransactionalTimerAbstractName",

Modified: geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java (original)
+++ geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java Thu Aug 10 12:56:47 2006
@@ -36,7 +36,6 @@
  */
 public class EARContext extends DeploymentContext {
     private final AbstractNameQuery transactionManagerObjectName;
-    private final AbstractNameQuery transactionContextManagerObjectName;
     private final AbstractNameQuery connectionTrackerObjectName;
 
     private final AbstractNameQuery transactedTimerName;
@@ -61,7 +60,6 @@
             AbstractNameQuery serverName,
             AbstractName baseName,
             AbstractNameQuery transactionManagerObjectName,
-            AbstractNameQuery transactionContextManagerObjectName,
             AbstractNameQuery connectionTrackerObjectName,
             AbstractNameQuery transactedTimerName,
             AbstractNameQuery nonTransactedTimerName,
@@ -72,7 +70,6 @@
         moduleName = baseName;
         this.serverName = serverName;
         this.transactionManagerObjectName = transactionManagerObjectName;
-        this.transactionContextManagerObjectName = transactionContextManagerObjectName;
         this.connectionTrackerObjectName = connectionTrackerObjectName;
         this.transactedTimerName = transactedTimerName;
         this.nonTransactedTimerName = nonTransactedTimerName;
@@ -89,7 +86,6 @@
             AbstractNameQuery serverName,
             AbstractName baseName,
             AbstractNameQuery transactionManagerObjectName,
-            AbstractNameQuery transactionContextManagerObjectName,
             AbstractNameQuery connectionTrackerObjectName,
             AbstractNameQuery transactedTimerName,
             AbstractNameQuery nonTransactedTimerName,
@@ -101,7 +97,6 @@
         this.serverName = serverName;
 
         this.transactionManagerObjectName = transactionManagerObjectName;
-        this.transactionContextManagerObjectName = transactionContextManagerObjectName;
         this.connectionTrackerObjectName = connectionTrackerObjectName;
         this.transactedTimerName = transactedTimerName;
         this.nonTransactedTimerName = nonTransactedTimerName;
@@ -115,7 +110,6 @@
         this.serverName = parent.getServerName();
 
         this.transactionManagerObjectName = parent.getTransactionManagerObjectName();
-        this.transactionContextManagerObjectName = parent.getTransactionContextManagerObjectName();
         this.connectionTrackerObjectName = parent.getConnectionTrackerObjectName();
         this.transactedTimerName = parent.getTransactedTimerName();
         this.nonTransactedTimerName = parent.getNonTransactedTimerName();
@@ -129,10 +123,6 @@
 
     public AbstractNameQuery getTransactionManagerObjectName() {
         return transactionManagerObjectName;
-    }
-
-    public AbstractNameQuery getTransactionContextManagerObjectName() {
-        return transactionContextManagerObjectName;
     }
 
     public AbstractNameQuery getConnectionTrackerObjectName() {

Modified: geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/WebModule.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/WebModule.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/WebModule.java (original)
+++ geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/WebModule.java Thu Aug 10 12:56:47 2006
@@ -29,7 +29,7 @@
 import org.apache.xmlbeans.XmlObject;
 
 /**
- * @version $Rev: 385487 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class WebModule extends Module {
     private final String contextRoot;

Modified: geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java (original)
+++ geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java Thu Aug 10 12:56:47 2006
@@ -101,7 +101,6 @@
     private static String contextRoot = "test";
     private static final Map portMap = null;
     private final AbstractNameQuery transactionManagerAbstractNameQuery = new AbstractNameQuery(transactionManagerObjectName, null);
-    private final AbstractNameQuery transactionContextManagerAbstractNameQuery = new AbstractNameQuery(transactionManagerObjectName, null);
     private final AbstractNameQuery connectionTrackerAbstractNameQuery = new AbstractNameQuery(connectionTrackerObjectName, null);
     private final AbstractNameQuery transactionalTimerAbstractNameQuery = new AbstractNameQuery(transactionalTimerObjectName, null);
     private final AbstractNameQuery nonTransactionalTimerAbstractNameQuery = new AbstractNameQuery(nonTransactionalTimerObjectName, null);
@@ -262,7 +261,6 @@
         try {
             EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
                     transactionManagerAbstractNameQuery,
-                    transactionContextManagerAbstractNameQuery,
                     connectionTrackerAbstractNameQuery,
                     transactionalTimerAbstractNameQuery,
                     nonTransactionalTimerAbstractNameQuery,
@@ -294,7 +292,6 @@
     public void testBadEJBJARConfiguration() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
                 transactionManagerAbstractNameQuery,
-                transactionContextManagerAbstractNameQuery,
                 connectionTrackerAbstractNameQuery,
                 transactionalTimerAbstractNameQuery,
                 nonTransactionalTimerAbstractNameQuery,
@@ -334,7 +331,6 @@
     public void testBadWARConfiguration() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
                 transactionManagerAbstractNameQuery,
-                transactionContextManagerAbstractNameQuery,
                 connectionTrackerAbstractNameQuery,
                 transactionalTimerAbstractNameQuery,
                 nonTransactionalTimerAbstractNameQuery,
@@ -374,7 +370,6 @@
     public void testBadRARConfiguration() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
                 transactionManagerAbstractNameQuery,
-                transactionContextManagerAbstractNameQuery,
                 connectionTrackerAbstractNameQuery,
                 transactionalTimerAbstractNameQuery,
                 nonTransactionalTimerAbstractNameQuery,
@@ -414,7 +409,6 @@
     public void testBadCARConfiguration() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
                 transactionManagerAbstractNameQuery,
-                transactionContextManagerAbstractNameQuery,
                 connectionTrackerAbstractNameQuery,
                 transactionalTimerAbstractNameQuery,
                 nonTransactionalTimerAbstractNameQuery,
@@ -454,7 +448,6 @@
     public void testNoEJBDeployer() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
                 transactionManagerAbstractNameQuery,
-                transactionContextManagerAbstractNameQuery,
                 connectionTrackerAbstractNameQuery,
                 transactionalTimerAbstractNameQuery,
                 nonTransactionalTimerAbstractNameQuery,
@@ -493,7 +486,6 @@
     public void testNoWARDeployer() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
                 transactionManagerAbstractNameQuery,
-                transactionContextManagerAbstractNameQuery,
                 connectionTrackerAbstractNameQuery,
                 transactionalTimerAbstractNameQuery,
                 nonTransactionalTimerAbstractNameQuery,
@@ -531,7 +523,6 @@
     public void testNoConnectorDeployer() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
                 transactionManagerAbstractNameQuery,
-                transactionContextManagerAbstractNameQuery,
                 connectionTrackerAbstractNameQuery,
                 transactionalTimerAbstractNameQuery,
                 nonTransactionalTimerAbstractNameQuery,

Modified: geronimo/trunk/modules/j2ee-schema/project.xml
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/j2ee-schema/project.xml?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee-schema/project.xml (original)
+++ geronimo/trunk/modules/j2ee-schema/project.xml Thu Aug 10 12:56:47 2006
@@ -50,6 +50,12 @@
 
         <!-- needed for xmlbeans runtime-->
         <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+            <version>${commons_logging_version}</version>
+        </dependency>
+
+        <dependency>
             <groupId>xmlbeans</groupId>
             <artifactId>xbean</artifactId>
             <version>${xmlbeans_version}</version>

Modified: geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java (original)
+++ geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java Thu Aug 10 12:56:47 2006
@@ -71,16 +71,17 @@
     public static final String SERVICE_MODULE = "ServiceModule";
     // todo should these really be j2eeType or should we have a Geronimo-specific property?
     public static final String TRANSACTION_MANAGER = "TransactionManager";
-    public static final String TRANSACTION_CONTEXT_MANAGER = "TransactionContextManager";
     public static final String TRANSACTION_LOG = "TransactionLog";
     public static final String XID_FACTORY = "XIDFactory";
     public static final String XID_IMPORTER = "XIDImporter";
+    public static final String JCA_BOOTSTRAP_CONTEXT = "JCABootstrapContext";
     public static final String JCA_CONNECTION_TRACKER = "JCAConnectionTracker";
     public static final String JCA_ADMIN_OBJECT = "JCAAdminObject";
     public static final String JCA_ACTIVATION_SPEC = "JCAActivationSpec";
     public static final String JCA_RESOURCE_ADAPTER = "JCAResourceAdapter";
     public static final String JCA_WORK_MANAGER = "JCAWorkManager";
     public static final String JCA_CONNECTION_MANAGER = "JCAConnectionManager";
+    public static final String JCA_XA_TERMINATOR = "JCAXATerminator";
     public static final String WEB_FILTER = "WebFilter";
     public static final String URL_WEB_FILTER_MAPPING = "URLWebFilterMapping";
     public static final String SERVLET_WEB_FILTER_MAPPING = "ServletWebFilterMapping";

Modified: geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java (original)
+++ geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java Thu Aug 10 12:56:47 2006
@@ -22,7 +22,7 @@
 import org.apache.geronimo.management.JVM;
 
 /**
- * @version $Rev: 383682 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class JVMTest extends Abstract77Test {
     private JVM jvm;

Modified: geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/ServerTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/ServerTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/ServerTest.java (original)
+++ geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/ServerTest.java Thu Aug 10 12:56:47 2006
@@ -21,7 +21,7 @@
 
 
 /**
- * @version $Rev: 383682 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class ServerTest extends Abstract77Test {
     private J2EEServer server;

Modified: geronimo/trunk/modules/jetty-builder/project.xml
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/jetty-builder/project.xml?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty-builder/project.xml (original)
+++ geronimo/trunk/modules/jetty-builder/project.xml Thu Aug 10 12:56:47 2006
@@ -41,7 +41,13 @@
     <!-- ============ -->
 
     <dependencies>
-
+        <dependency>
+            <groupId>backport-util-concurrent</groupId>
+            <artifactId>backport-util-concurrent</artifactId>
+            <version>${backport_util_concurrent_version}</version>
+            <type>test</type>
+        </dependency>
+        
         <dependency>
              <groupId>xmlbeans</groupId>
              <artifactId>xmlbeans-maven-plugin</artifactId>

Modified: geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java (original)
+++ geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java Thu Aug 10 12:56:47 2006
@@ -41,7 +41,6 @@
 
 import javax.management.ObjectName;
 import javax.servlet.Servlet;
-import javax.transaction.UserTransaction;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -85,7 +84,6 @@
 import org.apache.geronimo.security.deployment.SecurityBuilder;
 import org.apache.geronimo.security.deployment.SecurityConfiguration;
 import org.apache.geronimo.security.jacc.ComponentPermissions;
-import org.apache.geronimo.transaction.context.OnlineUserTransaction;
 import org.apache.geronimo.web.deployment.AbstractWebModuleBuilder;
 import org.apache.geronimo.web.deployment.GenericToSpecificPlanConverter;
 import org.apache.geronimo.xbeans.geronimo.naming.GerMessageDestinationType;
@@ -333,10 +331,9 @@
         GbeanType[] gbeans = jettyWebApp.getGbeanArray();
         ServiceConfigBuilder.addGBeans(gbeans, moduleClassLoader, moduleName, moduleContext);
 
-        UserTransaction userTransaction = new OnlineUserTransaction();
         //this may add to the web classpath with enhanced classes.
         //N.B. we use the ear context which has all the gbeans we could possibly be looking up from this ear.
-        Map compContext = buildComponentContext(earContext, webModule, webApp, jettyWebApp, userTransaction, moduleClassLoader);
+        Map compContext = buildComponentContext(earContext, webModule, webApp, jettyWebApp, moduleClassLoader);
 
         GBeanData webModuleData = new GBeanData(moduleName, JettyWebAppContext.GBEAN_INFO);
         try {
@@ -379,7 +376,6 @@
             webModuleData.addDependencies(dependencies);
 
             webModuleData.setAttribute("componentContext", compContext);
-            webModuleData.setAttribute("userTransaction", userTransaction);
             //classpath may have been augmented with enhanced classes
 //            webModuleData.setAttribute("webClassPath", webModule.getWebClasspath());
             // unsharableResources, applicationManagedSecurityResources
@@ -389,7 +385,7 @@
 
             webModuleData.setAttribute("contextPath", webModule.getContextRoot());
 
-            webModuleData.setReferencePattern("TransactionContextManager", moduleContext.getTransactionContextManagerObjectName());
+            webModuleData.setReferencePattern("TransactionManager", moduleContext.getTransactionManagerObjectName());
             webModuleData.setReferencePattern("TrackedConnectionAssociator", moduleContext.getConnectionTrackerObjectName());
             if (jettyWebApp.isSetWebContainer()) {
                 AbstractNameQuery webContainerName = ENCConfigBuilder.getGBeanQuery(NameFactory.GERONIMO_SERVICE, jettyWebApp.getWebContainer());
@@ -904,11 +900,11 @@
         return servletAbstractName;
     }
 
-    private Map buildComponentContext(EARContext earContext, Module webModule, WebAppType webApp, JettyWebAppType jettyWebApp, UserTransaction userTransaction, ClassLoader cl) throws DeploymentException {
+    private Map buildComponentContext(EARContext earContext, Module webModule, WebAppType webApp, JettyWebAppType jettyWebApp, ClassLoader cl) throws DeploymentException {
         return ENCConfigBuilder.buildComponentContext(earContext,
                 earContext.getConfiguration(),
                 webModule,
-                userTransaction,
+                null,
                 webApp.getEnvEntryArray(),
                 webApp.getEjbRefArray(), jettyWebApp.getEjbRefArray(),
                 webApp.getEjbLocalRefArray(), jettyWebApp.getEjbLocalRefArray(),

Modified: geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- 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 Aug 10 12:56:47 2006
@@ -81,8 +81,7 @@
 import org.apache.geronimo.kernel.repository.ArtifactManager;
 import org.apache.geronimo.kernel.repository.ArtifactResolver;
 import org.apache.geronimo.system.serverinfo.BasicServerInfo;
-import org.apache.geronimo.transaction.context.TransactionContextManagerGBean;
-import org.apache.geronimo.transaction.manager.TransactionManagerImplGBean;
+import org.apache.geronimo.transaction.manager.GeronimoTransactionManagerGBean;
 
 /**
  * @version $Rev:385232 $ $Date$
@@ -93,8 +92,8 @@
     private final AbstractName serverName = naming.createRootName(baseId, "Server", "J2EEServer");
 
     protected Kernel kernel;
+    private AbstractName tmName;
     private AbstractName ctcName;
-    private AbstractName tcmName;
     private ClassLoader cl;
     private JettyModuleBuilder builder;
     private File basedir = new File(System.getProperty("basedir", "."));
@@ -186,8 +185,7 @@
                 repositories,
                 new AbstractNameQuery(serverName),
                 moduleName,
-                null,
-                new AbstractNameQuery(tcmName),
+                new AbstractNameQuery(tmName),
                 new AbstractNameQuery(ctcName),
                 null,
                 null,
@@ -301,13 +299,13 @@
         connector.setAttribute("minThreads", new Integer(10));
         connector.setReferencePattern("JettyContainer", containerName);
 
-        GBeanData tm = bootstrap.addGBean("TransactionManager", TransactionManagerImplGBean.GBEAN_INFO);
+        GBeanData tm = bootstrap.addGBean("TransactionManager", GeronimoTransactionManagerGBean.GBEAN_INFO);
+        tmName = tm.getAbstractName();
         tm.setAttribute("defaultTransactionTimeoutSeconds", new Integer(10));
 
-        GBeanData tcm = bootstrap.addGBean("TransactionContextManager", TransactionContextManagerGBean.GBEAN_INFO);
-        tcm.setReferencePattern("TransactionManager", tm.getAbstractName());
-        tcmName = tcm.getAbstractName();
-        ctcName = bootstrap.addGBean("ConnectionTrackingCoordinator", ConnectionTrackingCoordinatorGBean.GBEAN_INFO).getAbstractName();
+        GBeanData ctc = bootstrap.addGBean("ConnectionTrackingCoordinator", ConnectionTrackingCoordinatorGBean.GBEAN_INFO);
+        ctcName = ctc.getAbstractName();
+        ctc.setReferencePattern("TransactionManager", tmName);
 
         ConfigurationUtil.loadBootstrapConfiguration(kernel, bootstrap, getClass().getClassLoader());
 

Modified: geronimo/trunk/modules/jetty/project.xml
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/jetty/project.xml?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/project.xml (original)
+++ geronimo/trunk/modules/jetty/project.xml Thu Aug 10 12:56:47 2006
@@ -42,6 +42,13 @@
 
     <dependencies>
         <dependency>
+            <groupId>backport-util-concurrent</groupId>
+            <artifactId>backport-util-concurrent</artifactId>
+            <version>${backport_util_concurrent_version}</version>
+            <type>test</type>
+        </dependency>
+
+        <dependency>
             <groupId>geronimo</groupId>
             <artifactId>geronimo-dependency-plugin</artifactId>
             <version>${geronimo_dependency_plugin_version}</version>

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyDefaultServletHolder.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyDefaultServletHolder.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyDefaultServletHolder.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyDefaultServletHolder.java Thu Aug 10 12:56:47 2006
@@ -26,7 +26,7 @@
 import org.mortbay.jetty.servlet.ServletHolder;
 
 /**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public class JettyDefaultServletHolder extends JettyServletHolder {
 

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyPOJOWebServiceHolder.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyPOJOWebServiceHolder.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyPOJOWebServiceHolder.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyPOJOWebServiceHolder.java Thu Aug 10 12:56:47 2006
@@ -43,7 +43,7 @@
  * This is intended to hold the web service stack for an axis POJO web service.
  * It is starting life as a copy of JettyServletHolder.
  *
- * @version $Rev: 385886 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class JettyPOJOWebServiceHolder extends ServletHolder implements GBeanLifecycle {
     private WebServiceContainer webServiceContainer;

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java Thu Aug 10 12:56:47 2006
@@ -33,6 +33,8 @@
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 import javax.naming.Context;
+import javax.transaction.TransactionManager;
+import javax.transaction.UserTransaction;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -47,7 +49,6 @@
 import org.apache.geronimo.jetty.interceptor.RequestWrappingBeforeAfter;
 import org.apache.geronimo.jetty.interceptor.SecurityContextBeforeAfter;
 import org.apache.geronimo.jetty.interceptor.ThreadClassloaderBeforeAfter;
-import org.apache.geronimo.jetty.interceptor.TransactionContextBeforeAfter;
 import org.apache.geronimo.jetty.interceptor.WebApplicationContextBeforeAfter;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.ObjectNameUtil;
@@ -57,13 +58,10 @@
 import org.apache.geronimo.management.geronimo.WebContainer;
 import org.apache.geronimo.management.geronimo.WebModule;
 import org.apache.geronimo.naming.enc.EnterpriseNamingContext;
-import org.apache.geronimo.naming.reference.ClassLoaderAwareReference;
-import org.apache.geronimo.naming.reference.KernelAwareReference;
 import org.apache.geronimo.security.deploy.DefaultPrincipal;
 import org.apache.geronimo.security.jacc.RoleDesignateSource;
-import org.apache.geronimo.transaction.TrackedConnectionAssociator;
-import org.apache.geronimo.transaction.context.OnlineUserTransaction;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
+import org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator;
+import org.apache.geronimo.transaction.GeronimoUserTransaction;
 import org.mortbay.http.Authenticator;
 import org.mortbay.http.HttpException;
 import org.mortbay.http.HttpRequest;
@@ -168,48 +166,46 @@
     }
 
     public JettyWebAppContext(String objectName,
-                              String originalSpecDD,
-                              String sessionManager,
-                              Map componentContext,
-                              OnlineUserTransaction userTransaction,
-                              ClassLoader classLoader,
-                              URL configurationBaseUrl,
-                              Set unshareableResources,
-                              Set applicationManagedSecurityResources,
-
-                              String displayName,
-                              Map contextParamMap,
-                              Collection listenerClassNames,
-                              boolean distributable,
-                              Map mimeMap,
-                              String[] welcomeFiles,
-                              Map localeEncodingMapping,
-                              Map errorPages,
-                              Authenticator authenticator,
-                              String realmName,
-                              Map tagLibMap,
-                              int sessionTimeoutSeconds,
-
-                              String policyContextID,
-                              String securityRealmName,
-                              DefaultPrincipal defaultPrincipal,
-                              PermissionCollection checkedPermissions,
-                              PermissionCollection excludedPermissions,
-
-                              Host host,
-                              TransactionContextManager transactionContextManager,
-                              TrackedConnectionAssociator trackedConnectionAssociator,
-                              JettyContainer jettyContainer,
-                              RoleDesignateSource roleDesignateSource,
-                              J2EEServer server,
-                              J2EEApplication application,
-                              Kernel kernel) throws Exception, IllegalAccessException, InstantiationException, ClassNotFoundException {
+            String originalSpecDD,
+            String sessionManager,
+            Map componentContext,
+            ClassLoader classLoader,
+            URL configurationBaseUrl,
+            Set unshareableResources,
+            Set applicationManagedSecurityResources,
+
+            String displayName,
+            Map contextParamMap,
+            Collection listenerClassNames,
+            boolean distributable,
+            Map mimeMap,
+            String[] welcomeFiles,
+            Map localeEncodingMapping,
+            Map errorPages,
+            Authenticator authenticator,
+            String realmName,
+            Map tagLibMap,
+            int sessionTimeoutSeconds,
+
+            String policyContextID,
+            String securityRealmName,
+            DefaultPrincipal defaultPrincipal,
+            PermissionCollection checkedPermissions,
+            PermissionCollection excludedPermissions,
+
+            Host host,
+            TransactionManager transactionManager,
+            TrackedConnectionAssociator trackedConnectionAssociator,
+            JettyContainer jettyContainer,
+            RoleDesignateSource roleDesignateSource,
+            J2EEServer server,
+            J2EEApplication application,
+            Kernel kernel) throws Exception, IllegalAccessException, InstantiationException, ClassNotFoundException {
 
         assert componentContext != null;
-        assert userTransaction != null;
         assert classLoader != null;
         assert configurationBaseUrl != null;
-        assert transactionContextManager != null;
+        assert transactionManager != null;
         assert trackedConnectionAssociator != null;
         assert jettyContainer != null;
 
@@ -241,8 +237,6 @@
         handler = new JettyWebApplicationHandler();
         addHandler(handler);
 
-        userTransaction.setUp(transactionContextManager, trackedConnectionAssociator);
-
         //stuff from spec dd
         setDisplayName(displayName);
         setContextParamMap(contextParamMap);
@@ -257,21 +251,11 @@
         setTagLibMap(tagLibMap);
         setSessionTimeoutSeconds(sessionTimeoutSeconds);
 
-        // create ReadOnlyContext
-        for (Iterator iterator = componentContext.values().iterator(); iterator.hasNext();) {
-            Object value = iterator.next();
-            if (value instanceof KernelAwareReference) {
-                ((KernelAwareReference) value).setKernel(kernel);
-            }
-            if (value instanceof ClassLoaderAwareReference) {
-                ((ClassLoaderAwareReference) value).setClassLoader(this.webClassLoader);
-            }
-        }
-        Context enc = EnterpriseNamingContext.createEnterpriseNamingContext(componentContext);
+        GeronimoUserTransaction userTransaction = new GeronimoUserTransaction(transactionManager);
+        Context enc = EnterpriseNamingContext.createEnterpriseNamingContext(componentContext, userTransaction, kernel, webClassLoader);
 
         int index = 0;
         BeforeAfter interceptor = new InstanceContextBeforeAfter(null, index++, unshareableResources, applicationManagedSecurityResources, trackedConnectionAssociator);
-        interceptor = new TransactionContextBeforeAfter(interceptor, index++, index++, transactionContextManager);
         interceptor = new ComponentContextBeforeAfter(interceptor, index++, enc);
         interceptor = new ThreadClassloaderBeforeAfter(interceptor, index++, index++, this.webClassLoader);
         interceptor = new WebApplicationContextBeforeAfter(interceptor, index++, this);
@@ -634,7 +618,6 @@
 
         infoBuilder.addAttribute("sessionManager", String.class, true);
         infoBuilder.addAttribute("componentContext", Map.class, true);
-        infoBuilder.addAttribute("userTransaction", OnlineUserTransaction.class, true);
         infoBuilder.addAttribute("classLoader", ClassLoader.class, false);
         infoBuilder.addAttribute("configurationBaseUrl", URL.class, true);
         infoBuilder.addAttribute("unshareableResources", Set.class, true);
@@ -643,7 +626,7 @@
         infoBuilder.addAttribute("contextPath", String.class, true);
 
         infoBuilder.addReference("Host", Host.class, "Host");
-        infoBuilder.addReference("TransactionContextManager", TransactionContextManager.class, NameFactory.TRANSACTION_CONTEXT_MANAGER);
+        infoBuilder.addReference("TransactionManager", TransactionManager.class, NameFactory.TRANSACTION_MANAGER);
         infoBuilder.addReference("TrackedConnectionAssociator", TrackedConnectionAssociator.class, NameFactory.JCA_CONNECTION_TRACKER);
         infoBuilder.addReference("JettyContainer", JettyContainer.class, NameFactory.GERONIMO_SERVICE);
         infoBuilder.addReference("RoleDesignateSource", RoleDesignateSource.class, NameFactory.JACC_MANAGER);
@@ -674,7 +657,6 @@
                 "deploymentDescriptor",
                 "sessionManager",
                 "componentContext",
-                "userTransaction",
                 "classLoader",
                 "configurationBaseUrl",
                 "unshareableResources",
@@ -701,7 +683,7 @@
                 "excludedPermissions",
 
                 "Host",
-                "TransactionContextManager",
+                "TransactionManager",
                 "TrackedConnectionAssociator",
                 "JettyContainer",
                 "RoleDesignateSource",

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebApplicationHandler.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebApplicationHandler.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebApplicationHandler.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebApplicationHandler.java Thu Aug 10 12:56:47 2006
@@ -30,7 +30,7 @@
 import org.apache.geronimo.security.ContextManager;
 
 /**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public class JettyWebApplicationHandler extends WebApplicationHandler {
 

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/InstanceContextBeforeAfter.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/InstanceContextBeforeAfter.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/InstanceContextBeforeAfter.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/InstanceContextBeforeAfter.java Thu Aug 10 12:56:47 2006
@@ -19,9 +19,9 @@
 import java.util.Set;
 import javax.resource.ResourceException;
 
-import org.apache.geronimo.transaction.DefaultInstanceContext;
-import org.apache.geronimo.transaction.InstanceContext;
-import org.apache.geronimo.transaction.TrackedConnectionAssociator;
+import org.apache.geronimo.connector.outbound.connectiontracking.ConnectorInstanceContextImpl;
+import org.apache.geronimo.connector.outbound.connectiontracking.ConnectorInstanceContext;
+import org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator;
 import org.mortbay.http.HttpRequest;
 import org.mortbay.http.HttpResponse;
 
@@ -46,7 +46,7 @@
 
     public void before(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse) {
         try {
-            context[index] = trackedConnectionAssociator.enter(new DefaultInstanceContext(unshareableResources, applicationManagedSecurityResources));
+            context[index] = trackedConnectionAssociator.enter(new ConnectorInstanceContextImpl(unshareableResources, applicationManagedSecurityResources));
         } catch (ResourceException e) {
             throw new RuntimeException(e);
         }
@@ -60,7 +60,7 @@
             next.after(context, httpRequest, httpResponse);
         }
         try {
-            trackedConnectionAssociator.exit((InstanceContext) context[index]);
+            trackedConnectionAssociator.exit((ConnectorInstanceContext) context[index]);
         } catch (ResourceException e) {
             throw new RuntimeException(e);
         }

Modified: geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- 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 Aug 10 12:56:47 2006
@@ -19,6 +19,7 @@
 import junit.framework.TestCase;
 
 import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator;
+import org.apache.geronimo.connector.outbound.connectiontracking.GeronimoTransactionListener;
 import org.apache.geronimo.jetty.connector.HTTPConnector;
 import org.apache.geronimo.security.SecurityServiceImpl;
 import org.apache.geronimo.security.deploy.DefaultPrincipal;
@@ -35,8 +36,6 @@
 import org.apache.geronimo.security.realm.GenericSecurityRealm;
 import org.apache.geronimo.system.serverinfo.BasicServerInfo;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
-import org.apache.geronimo.transaction.context.OnlineUserTransaction;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
 import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
 import org.mortbay.http.Authenticator;
 import org.mortbay.jetty.servlet.FormAuthenticator;
@@ -49,6 +48,7 @@
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
+import javax.transaction.TransactionManager;
 
 
 /**
@@ -61,7 +61,7 @@
     protected final static String securityRealmName = "demo-properties-realm";
     private HTTPConnector connector;
     protected JettyContainerImpl container;
-    private TransactionContextManager transactionContextManager;
+    private TransactionManager transactionManager;
     private ConnectionTrackingCoordinator connectionTrackingCoordinator;
     private URL configurationBaseURL;
 
@@ -95,7 +95,6 @@
                 null,
                 null,
                 Collections.EMPTY_MAP,
-                new OnlineUserTransaction(),
                 cl,
                 new URL(configurationBaseURL, uriString),
                 null,
@@ -118,7 +117,7 @@
                 checkedPermissions,
                 excludedPermissions,
                 null,
-                transactionContextManager,
+                transactionManager,
                 connectionTrackingCoordinator,
                 container,
                 roleDesignateSource,
@@ -200,10 +199,10 @@
         connector.setMinThreads(10);
         connector.doStart();
 
-        TransactionManagerImpl tm = new TransactionManagerImpl(10, null, null, Collections.EMPTY_LIST);
-        transactionContextManager = new TransactionContextManager(tm, tm);
+        TransactionManagerImpl transactionManager = new TransactionManagerImpl();
+        this.transactionManager = transactionManager;
         connectionTrackingCoordinator = new ConnectionTrackingCoordinator();
-
+        transactionManager.addTransactionAssociationListener(new GeronimoTransactionListener(connectionTrackingCoordinator));
     }
 
     protected void tearDown() throws Exception {

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java Thu Aug 10 12:56:47 2006
@@ -32,7 +32,7 @@
 import org.apache.geronimo.kernel.Jsr77Naming;
 
 /**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public class AbstractName implements Serializable {
     private static final long serialVersionUID = 3584199042821734754L;

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractNameQuery.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractNameQuery.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractNameQuery.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractNameQuery.java Thu Aug 10 12:56:47 2006
@@ -33,7 +33,7 @@
 import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public class AbstractNameQuery implements Serializable {
     private static final long serialVersionUID = 7444620122607155678L;

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfo.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfo.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfo.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfo.java Thu Aug 10 12:56:47 2006
@@ -62,7 +62,13 @@
         try {
             method = clazz.getDeclaredMethod("getGBeanInfo", new Class[]{});
         } catch (NoSuchMethodException e) {
-            throw new InvalidConfigurationException("Class does not have a getGBeanInfo() method: " + className);
+            try {
+                // try to get the info from ${className}GBean
+                clazz = classLoader.loadClass(className + "GBean");
+                method = clazz.getDeclaredMethod("getGBeanInfo", new Class[]{});
+            } catch (Exception ignored) {
+                throw new InvalidConfigurationException("Class does not have a getGBeanInfo() method: " + className);
+            }
         } catch (NoClassDefFoundError e) {
             throw new InvalidConfigurationException("Could not find getGBeanInfo method on " + className, e);
         }

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/ReferencePatterns.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/ReferencePatterns.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/ReferencePatterns.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/ReferencePatterns.java Thu Aug 10 12:56:47 2006
@@ -24,7 +24,7 @@
 import java.util.Set;
 
 /**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public class ReferencePatterns implements Serializable {
     private static final long serialVersionUID = 1888371271299507818L;

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanDependency.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanDependency.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanDependency.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanDependency.java Thu Aug 10 12:56:47 2006
@@ -28,7 +28,7 @@
 import org.apache.geronimo.kernel.management.State;
 
 /**
- * @version $Rev: 386907 $ $Date$
+ * @version $Rev$ $Date$
  */
 public final class GBeanDependency {
 

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstanceState.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstanceState.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstanceState.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstanceState.java Thu Aug 10 12:56:47 2006
@@ -28,7 +28,7 @@
 import java.util.Set;
 
 /**
- * @version $Rev: 386907 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class GBeanInstanceState {
     private static final Log log = LogFactory.getLog(GBeanInstanceState.class);

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanReference.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanReference.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanReference.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanReference.java Thu Aug 10 12:56:47 2006
@@ -19,7 +19,7 @@
 import org.apache.geronimo.gbean.GReferenceInfo;
 
 /**
- * @version $Rev: 384141 $ $Date$
+ * @version $Rev$ $Date$
  */
 public interface GBeanReference {
     String getName();

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanSingleReference.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanSingleReference.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanSingleReference.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanSingleReference.java Thu Aug 10 12:56:47 2006
@@ -27,7 +27,7 @@
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 
 /**
- * @version $Rev: 384141 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class GBeanSingleReference extends AbstractGBeanReference {
     private static final Log log = LogFactory.getLog(GBeanSingleReference.class);

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/ProxyCollection.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/ProxyCollection.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/ProxyCollection.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/ProxyCollection.java Thu Aug 10 12:56:47 2006
@@ -36,7 +36,7 @@
 import java.util.Set;
 
 /**
- * @version $Rev: 383682 $ $Date$
+ * @version $Rev$ $Date$
  */
 class ProxyCollection implements ReferenceCollection {
     private static final Log log = LogFactory.getLog(ProxyCollection.class);

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicLifecycleMonitor.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicLifecycleMonitor.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicLifecycleMonitor.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicLifecycleMonitor.java Thu Aug 10 12:56:47 2006
@@ -36,7 +36,7 @@
 import org.apache.geronimo.gbean.GBeanData;
 
 /**
- * @version $Rev: 386505 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class BasicLifecycleMonitor implements LifecycleMonitor {
     private static final Log log = LogFactory.getLog(BasicLifecycleMonitor.class);

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicRegistry.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicRegistry.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicRegistry.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicRegistry.java Thu Aug 10 12:56:47 2006
@@ -35,7 +35,7 @@
 import org.apache.geronimo.kernel.Kernel;
 
 /**
- * @version $Rev: 386505 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class BasicRegistry implements InstanceRegistry {
     private final Map objectNameRegistry = new HashMap();

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/basic/ProxyMethodInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/basic/ProxyMethodInterceptor.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/basic/ProxyMethodInterceptor.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/basic/ProxyMethodInterceptor.java Thu Aug 10 12:56:47 2006
@@ -42,7 +42,7 @@
 import java.util.Set;
 
 /**
- * @version $Rev: 385487 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class ProxyMethodInterceptor implements MethodInterceptor {
     /**

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManager.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManager.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManager.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManager.java Thu Aug 10 12:56:47 2006
@@ -25,7 +25,7 @@
  * A specialized ConfigurationManager that can change the set of GBeans
  * included in the configuration at runtime.
  *
- * @version $Rev: 384351 $ $Date$
+ * @version $Rev$ $Date$
  */
 public interface EditableConfigurationManager extends ConfigurationManager {
     /**

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/proxy/ProxyFactory.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/proxy/ProxyFactory.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/proxy/ProxyFactory.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/proxy/ProxyFactory.java Thu Aug 10 12:56:47 2006
@@ -23,7 +23,7 @@
 
 
 /**
- * @version $Rev: 383682 $ $Date$
+ * @version $Rev$ $Date$
  */
 public interface ProxyFactory {
     Object createProxy(AbstractName target);

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Artifact.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Artifact.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Artifact.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Artifact.java Thu Aug 10 12:56:47 2006
@@ -20,7 +20,7 @@
 import java.io.Serializable;
 
 /**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public class Artifact implements Comparable, Serializable {
     private static final long serialVersionUID = -3459638899709893444L;



Mime
View raw message