You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by da...@apache.org on 2006/08/10 21:56:58 UTC

svn commit: r430508 [4/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/...

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Environment.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Environment.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Environment.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Environment.java Thu Aug 10 12:56:47 2006
@@ -30,7 +30,7 @@
 /**
  * holds the data from the EnvironmentType xml while it is being resolved, transitively closed, etc.
  *
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public class Environment implements Serializable {
     private static final long serialVersionUID = 7075760873629376317L;

Modified: geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/Speed.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/Speed.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/Speed.java (original)
+++ geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/Speed.java Thu Aug 10 12:56:47 2006
@@ -26,7 +26,7 @@
 import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
- * @version $Rev: 384141 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class Speed {
     private static final Object[] NO_ARGS = new Object[0];

Modified: geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/runtime/GBeanAttributeTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/runtime/GBeanAttributeTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/runtime/GBeanAttributeTest.java (original)
+++ geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/runtime/GBeanAttributeTest.java Thu Aug 10 12:56:47 2006
@@ -27,7 +27,7 @@
 import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
- * @version $Rev: 383682 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class GBeanAttributeTest extends TestCase {
 

Modified: geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/runtime/GBeanDependencyTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/runtime/GBeanDependencyTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/runtime/GBeanDependencyTest.java (original)
+++ geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/runtime/GBeanDependencyTest.java Thu Aug 10 12:56:47 2006
@@ -27,7 +27,7 @@
 import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
- * @version $Rev: 384351 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class GBeanDependencyTest extends TestCase {
     private Kernel kernel;

Modified: geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/ConfigTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/ConfigTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/ConfigTest.java (original)
+++ geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/ConfigTest.java Thu Aug 10 12:56:47 2006
@@ -32,7 +32,7 @@
 import org.apache.geronimo.kernel.repository.DefaultArtifactResolver;
 
 /**
- * @version $Rev: 386505 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class ConfigTest extends TestCase {
     private Kernel kernel;

Modified: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JCAConnectionFactory.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JCAConnectionFactory.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JCAConnectionFactory.java (original)
+++ geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JCAConnectionFactory.java Thu Aug 10 12:56:47 2006
@@ -18,7 +18,7 @@
 package org.apache.geronimo.management.geronimo;
 
 /**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public interface JCAConnectionFactory extends org.apache.geronimo.management.JCAConnectionFactory {
     JCAManagedConnectionFactory getManagedConnectionFactoryInstance();

Modified: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/ResourceAdapter.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/ResourceAdapter.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/ResourceAdapter.java (original)
+++ geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/ResourceAdapter.java Thu Aug 10 12:56:47 2006
@@ -18,7 +18,7 @@
 package org.apache.geronimo.management.geronimo;
 
 /**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public interface ResourceAdapter extends org.apache.geronimo.management.ResourceAdapter {
     JCAResource[] getJCAResourceImplementations();

Modified: geronimo/trunk/modules/naming-builder/project.xml
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/naming-builder/project.xml?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/naming-builder/project.xml (original)
+++ geronimo/trunk/modules/naming-builder/project.xml Thu Aug 10 12:56:47 2006
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<!-- $Rev: 385372 $ $Date$ -->
+<!-- $Rev$ $Date$ -->
 
 <project>
     <pomVersion>3</pomVersion>

Modified: geronimo/trunk/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java (original)
+++ geronimo/trunk/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java Thu Aug 10 12:56:47 2006
@@ -31,7 +31,7 @@
 import org.apache.geronimo.naming.enc.EnterpriseNamingContext;
 
 /**
- * @version $Rev: 385372 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class ContextBuilderTest extends TestCase {
     private ComponentContextBuilder builder;

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/client/JaasLoginCoordinator.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/client/JaasLoginCoordinator.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/client/JaasLoginCoordinator.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/client/JaasLoginCoordinator.java Thu Aug 10 12:56:47 2006
@@ -48,7 +48,7 @@
  * case the client/server distinction is somewhat less important, and the
  * communication is optimized by avoiding network traffic.
  *
- * @version $Rev: 386763 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class JaasLoginCoordinator implements LoginModule {
     public final static String OPTION_HOST = "host";

Modified: geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java (original)
+++ geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java Thu Aug 10 12:56:47 2006
@@ -45,7 +45,7 @@
 import org.apache.xmlbeans.XmlOptions;
 
 /**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public class EnvironmentBuilder extends PropertyEditorSupport implements XmlAttributeBuilder {
     private final static QName QNAME = EnvironmentDocument.type.getDocumentElementName();

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/JMXProxyManager.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/JMXProxyManager.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/JMXProxyManager.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/JMXProxyManager.java Thu Aug 10 12:56:47 2006
@@ -26,7 +26,7 @@
  * Pretty much the same as the BasicProxyManager, but it has a different way
  * of handling the actual invocations.
  *
- * @version $Rev: 383682 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class JMXProxyManager extends BasicProxyManager {
     public JMXProxyManager(Kernel kernel) {

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

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/JMXUtil.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/JMXUtil.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/JMXUtil.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/JMXUtil.java Thu Aug 10 12:56:47 2006
@@ -36,7 +36,7 @@
 /**
  * Helper class for JMX Operations
  *
- * @version $Rev: 383682 $ $Date$
+ * @version $Rev$ $Date$
  */
 public final class JMXUtil {
     private JMXUtil() {

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/MBeanGBeanBridge.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/MBeanGBeanBridge.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/MBeanGBeanBridge.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/MBeanGBeanBridge.java Thu Aug 10 12:56:47 2006
@@ -48,7 +48,7 @@
 import org.apache.geronimo.kernel.management.NotificationType;
 
 /**
- * @version $Rev: 383682 $ $Date$
+ * @version $Rev$ $Date$
  */
 public final class MBeanGBeanBridge implements MBeanRegistration, DynamicMBean, NotificationEmitter {
     private static final Log log = LogFactory.getLog(MBeanGBeanBridge.class);

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/MBeanServerKernelBridge.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/MBeanServerKernelBridge.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/MBeanServerKernelBridge.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/MBeanServerKernelBridge.java Thu Aug 10 12:56:47 2006
@@ -41,7 +41,7 @@
 import org.apache.geronimo.kernel.lifecycle.LifecycleAdapter;
 
 /**
- * @version $Rev: 384351 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class MBeanServerKernelBridge implements GBeanLifecycle {
     private static final Log log = LogFactory.getLog(MBeanServerKernelBridge.class);

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

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/resolver/ExplicitDefaultArtifactResolver.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/resolver/ExplicitDefaultArtifactResolver.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/resolver/ExplicitDefaultArtifactResolver.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/resolver/ExplicitDefaultArtifactResolver.java Thu Aug 10 12:56:47 2006
@@ -37,7 +37,7 @@
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 
 /**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public class ExplicitDefaultArtifactResolver extends DefaultArtifactResolver {
 

Modified: geronimo/trunk/modules/timer/project.xml
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/timer/project.xml?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/timer/project.xml (original)
+++ geronimo/trunk/modules/timer/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>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-j2ee-management_1.0_spec</artifactId>
             <version>${geronimo_spec_j2ee_management_version}</version>

Modified: geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/NontransactionalExecutorTask.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/NontransactionalExecutorTask.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/NontransactionalExecutorTask.java (original)
+++ geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/NontransactionalExecutorTask.java Thu Aug 10 12:56:47 2006
@@ -19,8 +19,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.geronimo.transaction.context.TransactionContext;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
 
 /**
  * @version $Rev$ $Date$
@@ -32,40 +30,26 @@
     private final Runnable userTask;
     private final WorkInfo workInfo;
     private final ThreadPooledTimer threadPooledTimer;
-    private final TransactionContextManager transactionContextManager;
 
-    public NontransactionalExecutorTask(Runnable userTask, WorkInfo workInfo, ThreadPooledTimer threadPooledTimer, TransactionContextManager transactionContextManager) {
+    public NontransactionalExecutorTask(Runnable userTask, WorkInfo workInfo, ThreadPooledTimer threadPooledTimer) {
         this.userTask = userTask;
         this.workInfo = workInfo;
         this.threadPooledTimer = threadPooledTimer;
-        this.transactionContextManager = transactionContextManager;
     }
 
     public void run() {
-        TransactionContext oldTransactionContext = transactionContextManager.getContext();
-        TransactionContext transactionContext = transactionContextManager.newUnspecifiedTransactionContext();
         try {
-            try {
-                userTask.run();
-            } catch (Exception e) {
-                log.warn("Exception running task", e);
-            }
-            try {
-                threadPooledTimer.workPerformed(workInfo);
-            } catch (PersistenceException e) {
-                log.warn("Exception completing task", e);
-            }
-            if (workInfo.isOneTime()) {
-                threadPooledTimer.removeWorkInfo(workInfo);
-            }
-        } finally {
-            try {
-                transactionContext.commit();
-            } catch (Exception e) {
-                log.error("Unable to commit transaction context", e);
-            }
-            transactionContextManager.setContext(oldTransactionContext);
+            userTask.run();
+        } catch (Exception e) {
+            log.warn("Exception running task", e);
+        }
+        try {
+            threadPooledTimer.workPerformed(workInfo);
+        } catch (PersistenceException e) {
+            log.warn("Exception completing task", e);
+        }
+        if (workInfo.isOneTime()) {
+            threadPooledTimer.removeWorkInfo(workInfo);
         }
     }
-
 }

Modified: geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/NontransactionalExecutorTaskFactory.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/NontransactionalExecutorTaskFactory.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/NontransactionalExecutorTaskFactory.java (original)
+++ geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/NontransactionalExecutorTaskFactory.java Thu Aug 10 12:56:47 2006
@@ -17,12 +17,6 @@
 
 package org.apache.geronimo.timer;
 
-import org.apache.geronimo.timer.ExecutorTask;
-import org.apache.geronimo.timer.ExecutorTaskFactory;
-import org.apache.geronimo.timer.NontransactionalExecutorTask;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
-
-
 /**
  *
  *
@@ -30,14 +24,11 @@
  *
  * */
 public class NontransactionalExecutorTaskFactory implements ExecutorTaskFactory {
-    private final TransactionContextManager transactionContextManager;
-
-    public NontransactionalExecutorTaskFactory(TransactionContextManager transactionContextManager) {
-        this.transactionContextManager = transactionContextManager;
+    public NontransactionalExecutorTaskFactory() {
     }
 
     public ExecutorTask createExecutorTask(Runnable userTask, WorkInfo workInfo, ThreadPooledTimer threadPooledTimer) {
-        return new NontransactionalExecutorTask(userTask, workInfo, threadPooledTimer, transactionContextManager);
+        return new NontransactionalExecutorTask(userTask, workInfo, threadPooledTimer);
     }
 
 }

Modified: geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/ThreadPooledTimer.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/ThreadPooledTimer.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/ThreadPooledTimer.java (original)
+++ geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/ThreadPooledTimer.java Thu Aug 10 12:56:47 2006
@@ -30,13 +30,13 @@
 import javax.transaction.Status;
 import javax.transaction.Synchronization;
 import javax.transaction.SystemException;
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
 
 import EDU.oswego.cs.dl.util.concurrent.Executor;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.gbean.GBeanLifecycle;
-import org.apache.geronimo.transaction.context.TransactionContext;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
 
 /**
  *
@@ -51,7 +51,7 @@
     private final ExecutorTaskFactory executorTaskFactory;
     private final WorkerPersistence workerPersistence;
     private final Executor executor;
-    private final TransactionContextManager transactionContextManager;
+    private final TransactionManager transactionManager;
 
     private Timer delegate;
 
@@ -62,11 +62,11 @@
         this(null, null, null, null);
     }
 
-    public ThreadPooledTimer(ExecutorTaskFactory executorTaskFactory, WorkerPersistence workerPersistence, Executor executor, TransactionContextManager transactionContextManager) {
+    public ThreadPooledTimer(ExecutorTaskFactory executorTaskFactory, WorkerPersistence workerPersistence, Executor executor, TransactionManager transactionManager) {
         this.executorTaskFactory = executorTaskFactory;
         this.workerPersistence = workerPersistence;
         this.executor = executor;
-        this.transactionContextManager = transactionContextManager;
+        this.transactionManager = transactionManager;
     }
 
     public void doStart() throws Exception {
@@ -240,9 +240,11 @@
     }
 
     void registerSynchronization(Synchronization sync) throws RollbackException, SystemException {
-        TransactionContext transactionContext = transactionContextManager.getContext();
-        if (transactionContext != null && transactionContext.isInheritable() && transactionContext.isActive()) {
-            transactionContext.registerSynchronization(sync);
+        Transaction transaction = transactionManager.getTransaction();
+        int status = transaction == null ? Status.STATUS_NO_TRANSACTION : transaction.getStatus();
+
+        if (transaction != null && status == Status.STATUS_ACTIVE || status == Status.STATUS_MARKED_ROLLBACK) {
+            transaction.registerSynchronization(sync);
         } else {
             sync.beforeCompletion();
             sync.afterCompletion(Status.STATUS_COMMITTED);

Modified: geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/TransactionalExecutorTask.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/TransactionalExecutorTask.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/TransactionalExecutorTask.java (original)
+++ geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/TransactionalExecutorTask.java Thu Aug 10 12:56:47 2006
@@ -17,10 +17,10 @@
 
 package org.apache.geronimo.timer;
 
+import javax.transaction.TransactionManager;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
-import org.apache.geronimo.transaction.context.TransactionContext;
 
 /**
  * @version $Rev$ $Date$
@@ -32,22 +32,21 @@
     private final WorkInfo workInfo;
     private final ThreadPooledTimer threadPooledTimer;
 
-    private final TransactionContextManager transactionContextManager;
+    private final TransactionManager transactionManager;
     private final int repeatCount;
 
-    public TransactionalExecutorTask(Runnable userTask, WorkInfo workInfo, ThreadPooledTimer threadPooledTimer, TransactionContextManager transactionContextManager, int repeatCount) {
+    public TransactionalExecutorTask(Runnable userTask, WorkInfo workInfo, ThreadPooledTimer threadPooledTimer, TransactionManager transactionManager, int repeatCount) {
         this.userTask = userTask;
         this.workInfo = workInfo;
         this.threadPooledTimer = threadPooledTimer;
-        this.transactionContextManager = transactionContextManager;
+        this.transactionManager = transactionManager;
         this.repeatCount = repeatCount;
     }
-    
+
     public void run() {
-        TransactionContext transactionContext = null;
         for (int tries = 0; tries < repeatCount; tries++) {
             try {
-                transactionContext = transactionContextManager.newContainerTransactionContext();
+                transactionManager.begin();
             } catch (Exception e) {
                 log.warn("Exception occured while starting container transaction", e);
                 break;
@@ -65,14 +64,12 @@
                 }
             } finally {
                 try {
-                    transactionContextManager.setContext(null);
-                    if (transactionContext.commit()) {
-                        if (workInfo.isOneTime()) {
-                            threadPooledTimer.removeWorkInfo(workInfo);
-                        }
-                        // todo this is a very weird code structure.... returning from a finally is very confusing
-                        return;
+                    transactionManager.commit();
+                    if (workInfo.isOneTime()) {
+                        threadPooledTimer.removeWorkInfo(workInfo);
                     }
+                    // todo this is a very weird code structure.... returning from a finally is very confusing
+                    return;
                 } catch (Exception e) {
                     log.warn("Exception occured while completing container transaction", e);
                 }

Modified: geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/TransactionalExecutorTaskFactory.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/TransactionalExecutorTaskFactory.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/TransactionalExecutorTaskFactory.java (original)
+++ geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/TransactionalExecutorTaskFactory.java Thu Aug 10 12:56:47 2006
@@ -17,11 +17,7 @@
 
 package org.apache.geronimo.timer;
 
-import org.apache.geronimo.transaction.context.TransactionContextManager;
-import org.apache.geronimo.timer.ExecutorTask;
-import org.apache.geronimo.timer.ExecutorTaskFactory;
-import org.apache.geronimo.timer.ThreadPooledTimer;
-import org.apache.geronimo.timer.TransactionalExecutorTask;
+import javax.transaction.TransactionManager;
 
 /**
  *
@@ -31,24 +27,20 @@
  * */
 public class TransactionalExecutorTaskFactory implements ExecutorTaskFactory {
 
-    private final TransactionContextManager transactionContextManager;
+    private final TransactionManager transactionManager;
     private int repeatCount;
 
-    public TransactionalExecutorTaskFactory(TransactionContextManager transactionContextManager, int repeatCount) {
-        this.transactionContextManager = transactionContextManager;
+    public TransactionalExecutorTaskFactory(TransactionManager transactionManager, int repeatCount) {
+        this.transactionManager = transactionManager;
         this.repeatCount = repeatCount;
     }
 
-    public TransactionContextManager getTransactionContextManager() {
-        return transactionContextManager;
-    }
-
     public int getRepeatCount() {
         return repeatCount;
     }
 
     public ExecutorTask createExecutorTask(Runnable userTask, WorkInfo workInfo, ThreadPooledTimer threadPooledTimer) {
-        return new TransactionalExecutorTask(userTask, workInfo, threadPooledTimer, transactionContextManager, repeatCount);
+        return new TransactionalExecutorTask(userTask, workInfo, threadPooledTimer, transactionManager, repeatCount);
     }
 
 }

Modified: geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledNonTransactionalTimer.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledNonTransactionalTimer.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledNonTransactionalTimer.java (original)
+++ geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledNonTransactionalTimer.java Thu Aug 10 12:56:47 2006
@@ -17,10 +17,9 @@
 
 package org.apache.geronimo.timer.jdbc;
 
-import java.io.Serializable;
 import java.sql.SQLException;
-
 import javax.sql.DataSource;
+import javax.transaction.TransactionManager;
 
 import EDU.oswego.cs.dl.util.concurrent.Executor;
 import org.apache.geronimo.connector.outbound.ConnectionFactorySource;
@@ -31,7 +30,6 @@
 import org.apache.geronimo.timer.NontransactionalExecutorTaskFactory;
 import org.apache.geronimo.timer.PersistentTimer;
 import org.apache.geronimo.timer.ThreadPooledTimer;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
 
 /**
  * @version $Rev$ $Date$
@@ -39,11 +37,11 @@
 public class JDBCStoreThreadPooledNonTransactionalTimer extends ThreadPooledTimer {
 
     public JDBCStoreThreadPooledNonTransactionalTimer(ConnectionFactorySource managedConnectionFactoryWrapper,
-                                                      TransactionContextManager transactionContextManager,
+                                                      TransactionManager transactionManager,
                                                       Executor threadPool,
                                                       Kernel kernel) throws SQLException {
-        super(new NontransactionalExecutorTaskFactory(transactionContextManager),
-                new JDBCWorkerPersistence(kernel.getKernelName(), (DataSource)managedConnectionFactoryWrapper.$getResource(), false), threadPool, transactionContextManager);
+        super(new NontransactionalExecutorTaskFactory(),
+                new JDBCWorkerPersistence(kernel.getKernelName(), (DataSource)managedConnectionFactoryWrapper.$getResource(), false), threadPool, transactionManager);
     }
 
 
@@ -55,11 +53,11 @@
 
         infoFactory.addReference("ManagedConnectionFactoryWrapper", ConnectionFactorySource.class, NameFactory.JCA_MANAGED_CONNECTION_FACTORY);
         infoFactory.addReference("ThreadPool", Executor.class, NameFactory.GERONIMO_SERVICE);
-        infoFactory.addReference("TransactionContextManager", TransactionContextManager.class, NameFactory.TRANSACTION_CONTEXT_MANAGER);
+        infoFactory.addReference("TransactionManager", TransactionManager.class, NameFactory.TRANSACTION_MANAGER);
 
         infoFactory.addAttribute("kernel", Kernel.class, false);
 
-        infoFactory.setConstructor(new String[]{"ManagedConnectionFactoryWrapper", "TransactionContextManager", "ThreadPool", "kernel"});
+        infoFactory.setConstructor(new String[]{"ManagedConnectionFactoryWrapper", "TransactionManager", "ThreadPool", "kernel"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 

Modified: geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledTransactionalTimer.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledTransactionalTimer.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledTransactionalTimer.java (original)
+++ geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledTransactionalTimer.java Thu Aug 10 12:56:47 2006
@@ -17,10 +17,9 @@
 
 package org.apache.geronimo.timer.jdbc;
 
-import java.io.Serializable;
 import java.sql.SQLException;
-
 import javax.sql.DataSource;
+import javax.transaction.TransactionManager;
 
 import EDU.oswego.cs.dl.util.concurrent.Executor;
 import org.apache.geronimo.connector.outbound.ConnectionFactorySource;
@@ -31,7 +30,6 @@
 import org.apache.geronimo.timer.PersistentTimer;
 import org.apache.geronimo.timer.ThreadPooledTimer;
 import org.apache.geronimo.timer.TransactionalExecutorTaskFactory;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
 
 /**
  *
@@ -42,12 +40,12 @@
 public class JDBCStoreThreadPooledTransactionalTimer extends ThreadPooledTimer {
 
     public JDBCStoreThreadPooledTransactionalTimer(int repeatCount,
-            TransactionContextManager transactionContextManager,
+            TransactionManager transactionManager,
             ConnectionFactorySource managedConnectionFactoryWrapper,
             Executor threadPool,
             Kernel kernel) throws SQLException {
-        super(new TransactionalExecutorTaskFactory(transactionContextManager, repeatCount),
-                new JDBCWorkerPersistence(kernel.getKernelName(), (DataSource)managedConnectionFactoryWrapper.$getResource(), false), threadPool, transactionContextManager);
+        super(new TransactionalExecutorTaskFactory(transactionManager, repeatCount),
+                new JDBCWorkerPersistence(kernel.getKernelName(), (DataSource)managedConnectionFactoryWrapper.$getResource(), false), threadPool, transactionManager);
     }
 
 
@@ -58,12 +56,12 @@
         infoFactory.addInterface(PersistentTimer.class);
 
         infoFactory.addAttribute("repeatCount", int.class, true);
-        infoFactory.addReference("TransactionContextManager", TransactionContextManager.class, NameFactory.TRANSACTION_CONTEXT_MANAGER);
+        infoFactory.addReference("TransactionManager", TransactionManager.class, NameFactory.TRANSACTION_MANAGER);
         infoFactory.addReference("ManagedConnectionFactoryWrapper", ConnectionFactorySource.class, NameFactory.JCA_MANAGED_CONNECTION_FACTORY);
         infoFactory.addReference("ThreadPool", Executor.class, NameFactory.GERONIMO_SERVICE);
         infoFactory.addAttribute("kernel", Kernel.class, false);
 
-        infoFactory.setConstructor(new String[] {"repeatCount", "TransactionContextManager", "ManagedConnectionFactoryWrapper", "ThreadPool", "kernel"});
+        infoFactory.setConstructor(new String[] {"repeatCount", "TransactionManager", "ManagedConnectionFactoryWrapper", "ThreadPool", "kernel"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 

Modified: geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/vm/VMStoreThreadPooledNonTransactionalTimer.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/vm/VMStoreThreadPooledNonTransactionalTimer.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/vm/VMStoreThreadPooledNonTransactionalTimer.java (original)
+++ geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/vm/VMStoreThreadPooledNonTransactionalTimer.java Thu Aug 10 12:56:47 2006
@@ -17,14 +17,15 @@
 
 package org.apache.geronimo.timer.vm;
 
+import javax.transaction.TransactionManager;
+
 import EDU.oswego.cs.dl.util.concurrent.Executor;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.timer.NontransactionalExecutorTaskFactory;
 import org.apache.geronimo.timer.PersistentTimer;
 import org.apache.geronimo.timer.ThreadPooledTimer;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 /**
  *
@@ -34,9 +35,9 @@
  * */
 public class VMStoreThreadPooledNonTransactionalTimer extends ThreadPooledTimer {
 
-    public VMStoreThreadPooledNonTransactionalTimer(TransactionContextManager transactionContextManager, Executor threadPool) {
-        super(new NontransactionalExecutorTaskFactory(transactionContextManager),
-                new VMWorkerPersistence(), threadPool, transactionContextManager);
+    public VMStoreThreadPooledNonTransactionalTimer(TransactionManager transactionManager, Executor threadPool) {
+        super(new NontransactionalExecutorTaskFactory(),
+                new VMWorkerPersistence(), threadPool, transactionManager);
     }
 
 
@@ -47,9 +48,9 @@
         infoFactory.addInterface(PersistentTimer.class);
 
         infoFactory.addReference("ThreadPool", Executor.class, NameFactory.GERONIMO_SERVICE);
-        infoFactory.addReference("TransactionContextManager", TransactionContextManager.class, NameFactory.TRANSACTION_CONTEXT_MANAGER);
+        infoFactory.addReference("TransactionManager", TransactionManager.class, NameFactory.TRANSACTION_MANAGER);
 
-        infoFactory.setConstructor(new String[] {"TransactionContextManager", "ThreadPool"});
+        infoFactory.setConstructor(new String[] {"TransactionManager", "ThreadPool"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 

Modified: geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/vm/VMStoreThreadPooledTransactionalTimer.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/vm/VMStoreThreadPooledTransactionalTimer.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/vm/VMStoreThreadPooledTransactionalTimer.java (original)
+++ geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/vm/VMStoreThreadPooledTransactionalTimer.java Thu Aug 10 12:56:47 2006
@@ -17,28 +17,26 @@
 
 package org.apache.geronimo.timer.vm;
 
+import javax.transaction.TransactionManager;
+
 import EDU.oswego.cs.dl.util.concurrent.Executor;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.timer.PersistentTimer;
 import org.apache.geronimo.timer.ThreadPooledTimer;
 import org.apache.geronimo.timer.TransactionalExecutorTaskFactory;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 /**
- *
- *
  * @version $Rev$ $Date$
- *
- * */
+ */
 public class VMStoreThreadPooledTransactionalTimer extends ThreadPooledTimer {
 
     public VMStoreThreadPooledTransactionalTimer(int repeatCount,
-            TransactionContextManager transactionContextManager,
+            TransactionManager transactionManager,
             Executor threadPool) {
-        super(new TransactionalExecutorTaskFactory(transactionContextManager, repeatCount),
-                new VMWorkerPersistence(), threadPool, transactionContextManager);
+        super(new TransactionalExecutorTaskFactory(transactionManager, repeatCount),
+                new VMWorkerPersistence(), threadPool, transactionManager);
     }
 
 
@@ -49,10 +47,10 @@
         infoFactory.addInterface(PersistentTimer.class);
 
         infoFactory.addAttribute("repeatCount", int.class, true);
-        infoFactory.addReference("TransactionContextManager", TransactionContextManager.class, NameFactory.TRANSACTION_CONTEXT_MANAGER);
+        infoFactory.addReference("TransactionManager", TransactionManager.class, NameFactory.TRANSACTION_MANAGER);
         infoFactory.addReference("ThreadPool", Executor.class, NameFactory.GERONIMO_SERVICE);
 
-        infoFactory.setConstructor(new String[] {"repeatCount", "TransactionContextManager", "ThreadPool"});
+        infoFactory.setConstructor(new String[] {"repeatCount", "TransactionManager", "ThreadPool"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 

Modified: geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/AbstractThreadPooledTimerTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/AbstractThreadPooledTimerTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/AbstractThreadPooledTimerTest.java (original)
+++ geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/AbstractThreadPooledTimerTest.java Thu Aug 10 12:56:47 2006
@@ -17,11 +17,11 @@
 
 package org.apache.geronimo.timer;
 
+import javax.transaction.TransactionManager;
+
 import EDU.oswego.cs.dl.util.concurrent.SynchronizedInt;
 import junit.framework.TestCase;
 import org.apache.geronimo.pool.ThreadPool;
-import org.apache.geronimo.transaction.context.TransactionContext;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
 import org.apache.geronimo.timer.vm.VMWorkerPersistence;
 
 /**
@@ -42,7 +42,7 @@
     private ThreadPooledTimer timer;
 
     private SynchronizedInt counter = new SynchronizedInt(0);
-    protected TransactionContextManager transactionContextManager;
+    protected TransactionManager transactionManager;
     protected ExecutorTaskFactory executableWorkFactory;
     protected UserTaskFactory userTaskFactory;
 
@@ -52,11 +52,10 @@
         userTaskFactory = new MockUserTaskFactory();
         threadPool = new ThreadPool(30, "TestPool", 10000, this.getClass().getClassLoader(), "foo:bar=baz");
         WorkerPersistence workerPersistence = new VMWorkerPersistence();
-        timer = new ThreadPooledTimer(executableWorkFactory, workerPersistence, threadPool, transactionContextManager);
+        timer = new ThreadPooledTimer(executableWorkFactory, workerPersistence, threadPool, transactionManager);
         timer.doStart();
 
         counter.set(0);
-        transactionContextManager.setContext(null);
     }
 
     protected void tearDown() throws Exception {
@@ -98,40 +97,25 @@
     }
 
     public void testTasksInUnspecifiedTxContext() throws Exception {
-        transactionContextManager.newUnspecifiedTransactionContext();
-        try {
-            testTasks();
-        } finally {
-            transactionContextManager.setContext(null);
-        }
+        testTasks();
     }
 
     public void testCancelInUnspecifiedTxContext() throws Exception {
-        transactionContextManager.newUnspecifiedTransactionContext();
-        try {
-            testCancel();
-        } finally {
-            transactionContextManager.setContext(null);
-        }
+        testCancel();
     }
 
     public void testPersistenceInUnspecifiedTxContext() throws Exception {
-        transactionContextManager.newUnspecifiedTransactionContext();
-        try {
-            testPersistence();
-        } finally {
-            transactionContextManager.setContext(null);
-        }
+        testPersistence();
     }
 
     public void testTasksInTransaction() throws Exception {
-        TransactionContext transactionContext = transactionContextManager.newContainerTransactionContext();
+        transactionManager.begin();
         for (long i = 0; i < COUNT; i++) {
             timer.schedule(userTaskFactory, key, userId, userKey, i);
         }
         Thread.sleep(COUNT + SLOP);
         assertEquals(0, counter.get());
-        transactionContext.commit();
+        transactionManager.commit();
         Thread.sleep(COUNT + SLOP);
         assertEquals(COUNT, counter.get());
     }
@@ -144,13 +128,13 @@
         }
         Thread.sleep(SLOP + DELAY);
         assertEquals(COUNT, counter.get());
-        TransactionContext transactionContext = transactionContextManager.newContainerTransactionContext();
+        transactionManager.begin();
         for (int i = 0; i < workInfos.length; i++) {
             workInfos[i].getExecutorFeedingTimerTask().cancel();
         }
         Thread.sleep(SLOP + DELAY);
         assertEquals(COUNT, counter.get());
-        transactionContext.commit();
+        transactionManager.commit();
         Thread.sleep(SLOP + DELAY);
         assertEquals(COUNT, counter.get());
     }
@@ -163,13 +147,13 @@
         }
         Thread.sleep(SLOP + DELAY);
         assertEquals(COUNT, counter.get());
-        TransactionContext transactionContext = transactionContextManager.newContainerTransactionContext();
+        transactionManager.begin();
         for (int i = 0; i < workInfos.length; i++) {
             workInfos[i].getExecutorFeedingTimerTask().cancel();
         }
         Thread.sleep(SLOP + DELAY);
         assertEquals(COUNT, counter.get());
-        transactionContext.rollback();
+        transactionManager.rollback();
         Thread.sleep(SLOP + DELAY);
         // Catches up with two periods.
         assertEquals(3 * COUNT, counter.get());

Modified: geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/NontransactionalThreadPooledTimerTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/NontransactionalThreadPooledTimerTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- 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 Aug 10 12:56:47 2006
@@ -17,23 +17,16 @@
 
 package org.apache.geronimo.timer;
 
-import org.apache.geronimo.transaction.context.TransactionContextManager;
-import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
-import org.apache.geronimo.transaction.manager.XidFactoryImpl;
+import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 
 /**
- *
- *
  * @version $Rev$ $Date$
- *
- * */
+ */
 public class NontransactionalThreadPooledTimerTest extends AbstractThreadPooledTimerTest {
 
     protected void setUp() throws Exception {
-        TransactionManagerImpl transactionManager = new TransactionManagerImpl(10 * 1000, 
-                new XidFactoryImpl("WHAT DO WE CALL IT?".getBytes()), null, null);
-        transactionContextManager = new TransactionContextManager(transactionManager, transactionManager);
-        executableWorkFactory = new NontransactionalExecutorTaskFactory(transactionContextManager);
+        this.transactionManager = new GeronimoTransactionManager();
+        executableWorkFactory = new NontransactionalExecutorTaskFactory();
         super.setUp();
     }
 }

Modified: geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/TransactionalThreadPooledTimerTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/timer/src/test/org/apache/geronimo/timer/TransactionalThreadPooledTimerTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- 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 Aug 10 12:56:47 2006
@@ -17,23 +17,15 @@
 
 package org.apache.geronimo.timer;
 
-import org.apache.geronimo.transaction.context.TransactionContextManager;
-import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
-import org.apache.geronimo.transaction.manager.XidFactoryImpl;
+import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 
 /**
- *
- *
  * @version $Rev$ $Date$
- *
- * */
+ */
 public class TransactionalThreadPooledTimerTest extends AbstractThreadPooledTimerTest {
-
     protected void setUp() throws Exception {
-        TransactionManagerImpl transactionManager = new TransactionManagerImpl(10 * 1000, 
-                new XidFactoryImpl("WHAT DO WE CALL IT?".getBytes()), null, null);
-        transactionContextManager = new TransactionContextManager(transactionManager, transactionManager);
-        executableWorkFactory = new TransactionalExecutorTaskFactory(transactionContextManager, 1);
+        this.transactionManager = new GeronimoTransactionManager();
+        executableWorkFactory = new TransactionalExecutorTaskFactory(this.transactionManager, 1);
         super.setUp();
     }
 }

Modified: geronimo/trunk/modules/tomcat-builder/project.xml
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/tomcat-builder/project.xml?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat-builder/project.xml (original)
+++ geronimo/trunk/modules/tomcat-builder/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>xmlbeans</groupId>
             <artifactId>xmlbeans-maven-plugin</artifactId>
             <version>${xmlbeans_maven_plugin_version}</version>

Modified: geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java (original)
+++ geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java Thu Aug 10 12:56:47 2006
@@ -34,8 +34,6 @@
 import java.util.Collection;
 import java.util.jar.JarFile;
 
-import javax.transaction.UserTransaction;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.common.DeploymentException;
@@ -75,7 +73,6 @@
 import org.apache.geronimo.tomcat.ValveGBean;
 import org.apache.geronimo.tomcat.cluster.CatalinaClusterGBean;
 import org.apache.geronimo.tomcat.util.SecurityHolder;
-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;
@@ -282,10 +279,9 @@
         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, tomcatWebApp, userTransaction, moduleClassLoader);
+        Map compContext = buildComponentContext(earContext, webModule, webApp, tomcatWebApp, moduleClassLoader);
 
         GBeanData webModuleData = new GBeanData(moduleName, TomcatWebAppContext.GBEAN_INFO);
         try {
@@ -307,13 +303,12 @@
             webModuleData.addDependencies(dependencies);
 
             webModuleData.setAttribute("componentContext", compContext);
-            webModuleData.setAttribute("userTransaction", userTransaction);
             // unsharableResources, applicationManagedSecurityResources
             GBeanResourceEnvironmentBuilder rebuilder = new GBeanResourceEnvironmentBuilder(webModuleData);
             //N.B. use earContext not moduleContext
             ENCConfigBuilder.setResourceEnvironment(rebuilder, webApp.getResourceRefArray(), tomcatWebApp.getResourceRefArray());
 
-            webModuleData.setReferencePattern("TransactionContextManager", earContext.getTransactionContextManagerObjectName());
+            webModuleData.setReferencePattern("TransactionManager", earContext.getTransactionManagerObjectName());
             webModuleData.setReferencePattern("TrackedConnectionAssociator", earContext.getConnectionTrackerObjectName());
 
             if (tomcatWebApp.isSetWebContainer()) {
@@ -454,11 +449,11 @@
     }
 
 
-    private Map buildComponentContext(EARContext earContext, Module webModule, WebAppType webApp, TomcatWebAppType tomcatWebApp, UserTransaction userTransaction, ClassLoader cl) throws DeploymentException {
+    private Map buildComponentContext(EARContext earContext, Module webModule, WebAppType webApp, TomcatWebAppType tomcatWebApp, ClassLoader cl) throws DeploymentException {
         return ENCConfigBuilder.buildComponentContext(earContext,
                 earContext.getConfiguration(),
                 webModule,
-                userTransaction,
+                null,
                 webApp.getEnvEntryArray(),
                 webApp.getEjbRefArray(), tomcatWebApp.getEjbRefArray(),
                 webApp.getEjbLocalRefArray(), tomcatWebApp.getEjbLocalRefArray(),

Modified: geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java (original)
+++ geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java Thu Aug 10 12:56:47 2006
@@ -88,8 +88,7 @@
 import org.apache.geronimo.tomcat.HostGBean;
 import org.apache.geronimo.tomcat.RealmGBean;
 import org.apache.geronimo.tomcat.TomcatContainer;
-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$
@@ -100,8 +99,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 TomcatModuleBuilder builder;
     private File basedir = new File(System.getProperty("basedir", "."));
@@ -197,8 +196,7 @@
                 repositories,
                 new AbstractNameQuery(serverName),
                 moduleName,
-                null,
-                new AbstractNameQuery(tcmName),
+                new AbstractNameQuery(tmName),
                 new AbstractNameQuery(ctcName),
                 null,
                 null,
@@ -360,13 +358,13 @@
         connector.setAttribute("port", new Integer(8181));
         connector.setReferencePattern("TomcatContainer", 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/tomcat/project.xml
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/tomcat/project.xml?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/project.xml (original)
+++ geronimo/trunk/modules/tomcat/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>geronimo</groupId>
             <artifactId>geronimo-dependency-plugin</artifactId>

Modified: geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java (original)
+++ geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java Thu Aug 10 12:56:47 2006
@@ -21,7 +21,6 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-
 import javax.naming.NamingException;
 import javax.security.auth.Subject;
 import javax.security.jacc.PolicyContext;
@@ -43,8 +42,6 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.common.DeploymentException;
 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.ContextManager;
 import org.apache.geronimo.security.IdentificationPrincipal;
 import org.apache.geronimo.security.SubjectId;
@@ -54,11 +51,9 @@
 import org.apache.geronimo.tomcat.interceptor.ComponentContextBeforeAfter;
 import org.apache.geronimo.tomcat.interceptor.InstanceContextBeforeAfter;
 import org.apache.geronimo.tomcat.interceptor.PolicyContextBeforeAfter;
-import org.apache.geronimo.tomcat.interceptor.TransactionContextBeforeAfter;
 import org.apache.geronimo.tomcat.util.SecurityHolder;
 import org.apache.geronimo.tomcat.valve.DefaultSubjectValve;
 import org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
 import org.apache.geronimo.webservices.POJOWebServiceServlet;
 import org.apache.geronimo.webservices.WebServiceContainer;
 import org.apache.geronimo.webservices.WebServiceContainerInvoker;
@@ -91,16 +86,7 @@
         Map componentContext = ctx.getComponentContext();
         try {
             if (componentContext != null) {
-                for (Iterator iterator = componentContext.values().iterator(); iterator.hasNext();) {
-                    Object value = iterator.next();
-                    if (value instanceof KernelAwareReference) {
-                        ((KernelAwareReference) value).setKernel(ctx.getKernel());
-                    }
-                    if (value instanceof ClassLoaderAwareReference) {
-                        ((ClassLoaderAwareReference) value).setClassLoader(ctx.getClassLoader());
-                    }
-                }
-                enc = EnterpriseNamingContext.createEnterpriseNamingContext(componentContext);
+                enc = EnterpriseNamingContext.createEnterpriseNamingContext(componentContext, ctx.getUserTransaction(), ctx.getKernel(), ctx.getClassLoader());
             }
         } catch (NamingException ne) {
             log.error(ne);
@@ -115,12 +101,6 @@
         // Set ComponentContext BeforeAfter
         if (enc != null) {
             interceptor = new ComponentContextBeforeAfter(interceptor, index++, enc);
-        }
-
-        // Set TransactionContext BeforeAfter
-        TransactionContextManager transactionContextManager = ctx.getTransactionContextManager();
-        if (transactionContextManager != null) {
-            interceptor = new TransactionContextBeforeAfter(interceptor, index++, transactionContextManager);
         }
 
         //Set a PolicyContext BeforeAfter

Modified: geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContext.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContext.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContext.java (original)
+++ geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContext.java Thu Aug 10 12:56:47 2006
@@ -20,14 +20,15 @@
 import java.util.Map;
 import java.util.Set;
 
+import javax.transaction.UserTransaction;
+
 import org.apache.catalina.Context;
 import org.apache.catalina.Manager;
 import org.apache.catalina.Realm;
 import org.apache.catalina.cluster.CatalinaCluster;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.tomcat.util.SecurityHolder;
-import org.apache.geronimo.transaction.TrackedConnectionAssociator;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
+import org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator;
 
 /**
  * @version $Rev$ $Date$
@@ -41,36 +42,36 @@
     public Context getContext();
 
     public String getDocBase();
-    
+
     public SecurityHolder getSecurityHolder();
-    
+
     public String getVirtualServer();
-    
+
     public ClassLoader getClassLoader();
-    
+
+    public UserTransaction getUserTransaction();
+
     public Map getComponentContext();
 
     public Kernel getKernel();
-    
-    public TransactionContextManager getTransactionContextManager();
-    
+
     public Set getApplicationManagedSecurityResources();
 
     public TrackedConnectionAssociator getTrackedConnectionAssociator();
 
     public Set getUnshareableResources();
-    
+
     public Realm getRealm();
-    
-    public List getValveChain();    
-    
+
+    public List getValveChain();
+
     public CatalinaCluster getCluster();
-    
+
     public Manager getManager();
-    
+
     public boolean isCrossContext();
 
     public boolean isDisableCookies();
-    
+
     public Map getWebServices();
 }

Modified: geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java (original)
+++ geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java Thu Aug 10 12:56:47 2006
@@ -40,14 +40,15 @@
 import org.apache.geronimo.security.jacc.RoleDesignateSource;
 import org.apache.geronimo.tomcat.cluster.CatalinaClusterGBean;
 import org.apache.geronimo.tomcat.util.SecurityHolder;
-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.apache.naming.resources.DirContextURLStreamHandler;
 
 import javax.management.ObjectName;
 import javax.management.MalformedObjectNameException;
 import javax.naming.directory.DirContext;
+import javax.transaction.TransactionManager;
+import javax.transaction.UserTransaction;
 
 import java.net.URI;
 import java.net.URL;
@@ -92,6 +93,8 @@
 
     private final boolean disableCookies;
 
+    private final UserTransaction userTransaction;
+
     private final Map componentContext;
 
     private final Kernel kernel;
@@ -102,8 +105,6 @@
 
     private final TrackedConnectionAssociator trackedConnectionAssociator;
 
-    private final TransactionContextManager transactionContextManager;
-
     private final RoleDesignateSource roleDesignateSource;
 
     private final SecurityHolder securityHolder;
@@ -130,8 +131,7 @@
             Map componentContext,
             Set unshareableResources,
             Set applicationManagedSecurityResources,
-            OnlineUserTransaction userTransaction,
-            TransactionContextManager transactionContextManager,
+            TransactionManager transactionManager,
             TrackedConnectionAssociator trackedConnectionAssociator,
             TomcatContainer container,
             RoleDesignateSource roleDesignateSource,
@@ -149,7 +149,7 @@
 
         assert classLoader != null;
         assert configurationBaseUrl != null;
-        assert transactionContextManager != null;
+        assert transactionManager != null;
         assert trackedConnectionAssociator != null;
         assert componentContext != null;
         assert container != null;
@@ -170,8 +170,8 @@
         this.virtualServer = virtualServer;
         this.securityHolder = securityHolder;
 
+        this.userTransaction = new GeronimoUserTransaction(transactionManager);
         this.componentContext = componentContext;
-        this.transactionContextManager = transactionContextManager;
         this.unshareableResources = unshareableResources;
         this.applicationManagedSecurityResources = applicationManagedSecurityResources;
         this.trackedConnectionAssociator = trackedConnectionAssociator;
@@ -205,16 +205,18 @@
         }
 
         //Add the cluster
-        if (cluster != null)
-           catalinaCluster = (CatalinaCluster)cluster.getInternalObject();
-        else
+        if (cluster != null) {
+            catalinaCluster = (CatalinaCluster) cluster.getInternalObject();
+        } else {
             catalinaCluster = null;
+        }
 
         //Add the manager
-        if (manager != null)
-           this.manager = (Manager)manager.getInternalObject();
-        else
+        if (manager != null) {
+            this.manager = (Manager) manager.getInternalObject();
+        } else {
             this.manager = null;
+        }
 
         this.crossContext = crossContext;
 
@@ -235,9 +237,6 @@
                 throw new IllegalArgumentException("RoleDesignateSource must be supplied for a secure web app");
             }
         }
-        userTransaction.setUp(transactionContextManager,
-                trackedConnectionAssociator);
-
     }
 
     public String getObjectName() {
@@ -285,6 +284,10 @@
         this.docBase = docBase;
     }
 
+    public UserTransaction getUserTransaction() {
+        return userTransaction;
+    }
+
     public Map getComponentContext() {
         return componentContext;
     }
@@ -305,10 +308,6 @@
         return disableCookies;
     }
 
-    public TransactionContextManager getTransactionContextManager() {
-        return transactionContextManager;
-    }
-
     public Context getContext() {
         return context;
     }
@@ -392,8 +391,9 @@
 
     public String[] getServlets(){
         String[] result = null;
-        if ((context != null) && (context instanceof StandardContext))
-            result = ((StandardContext)context).getServlets();
+        if ((context != null) && (context instanceof StandardContext)) {
+            result = ((StandardContext) context).getServlets();
+        }
 
         return result;
     }
@@ -491,8 +491,7 @@
         infoBuilder.addAttribute("componentContext", Map.class, true);
         infoBuilder.addAttribute("unshareableResources", Set.class, true);
         infoBuilder.addAttribute("applicationManagedSecurityResources", Set.class, true);
-        infoBuilder.addAttribute("userTransaction", OnlineUserTransaction.class, true);
-        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("Container", TomcatContainer.class, NameFactory.GERONIMO_SERVICE);
@@ -520,8 +519,7 @@
                 "componentContext",
                 "unshareableResources",
                 "applicationManagedSecurityResources",
-                "userTransaction",
-                "TransactionContextManager",
+                "TransactionManager",
                 "TrackedConnectionAssociator",
                 "Container",
                 "RoleDesignateSource",

Modified: geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/interceptor/InstanceContextBeforeAfter.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/interceptor/InstanceContextBeforeAfter.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/interceptor/InstanceContextBeforeAfter.java (original)
+++ geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/interceptor/InstanceContextBeforeAfter.java Thu Aug 10 12:56:47 2006
@@ -22,12 +22,12 @@
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 
-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;
 
 public class InstanceContextBeforeAfter implements BeforeAfter{
-    
+
     private final BeforeAfter next;
     private final int index;
     private final Set unshareableResources;
@@ -44,7 +44,7 @@
 
     public void before(Object[] context, ServletRequest httpRequest, ServletResponse 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);
         }
@@ -58,7 +58,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/tomcat/src/test/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/AbstractWebModuleTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/AbstractWebModuleTest.java (original)
+++ geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/AbstractWebModuleTest.java Thu Aug 10 12:56:47 2006
@@ -24,8 +24,11 @@
 import java.util.Map;
 import java.util.Properties;
 
+import javax.transaction.TransactionManager;
+
 import junit.framework.TestCase;
 import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator;
+import org.apache.geronimo.connector.outbound.connectiontracking.GeronimoTransactionListener;
 import org.apache.geronimo.security.SecurityServiceImpl;
 import org.apache.geronimo.security.deploy.PrincipalInfo;
 import org.apache.geronimo.security.jaas.GeronimoLoginConfiguration;
@@ -41,8 +44,6 @@
 import org.apache.geronimo.system.serverinfo.BasicServerInfo;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.tomcat.util.SecurityHolder;
-import org.apache.geronimo.transaction.context.OnlineUserTransaction;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
 import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
 
 
@@ -56,7 +57,7 @@
     protected final static String securityRealmName = "demo-properties-realm";
     private ConnectorGBean connector;
     protected TomcatContainer container;
-    private TransactionContextManager transactionContextManager;
+    private TransactionManager transactionManager;
     private ConnectionTrackingCoordinator connectionTrackingCoordinator;
 
     protected static final String POLICY_CONTEXT_ID = "securetest";
@@ -73,8 +74,7 @@
                 Collections.EMPTY_MAP,
                 null,
                 null,
-                new OnlineUserTransaction(),
-                transactionContextManager,
+                transactionManager,
                 connectionTrackingCoordinator,
                 container,
                 roleDesignateSource,
@@ -184,9 +184,10 @@
         connector = new ConnectorGBean("HTTP", null, "localhost", 8181, container);
         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/tomcat/src/test/org/apache/geronimo/tomcat/ContainerTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/ContainerTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/ContainerTest.java (original)
+++ geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/ContainerTest.java Thu Aug 10 12:56:47 2006
@@ -27,7 +27,7 @@
 
 
 /**
- * @version $Rev: 387050 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class ContainerTest extends AbstractWebModuleTest {
 

Modified: geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/JAASSecurityTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/JAASSecurityTest.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/JAASSecurityTest.java (original)
+++ geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/JAASSecurityTest.java Thu Aug 10 12:56:47 2006
@@ -33,7 +33,7 @@
 /**
  * Tests the JAAS security for Tomcat
  *
- * @version $Revision: 387050 $ $Date$
+ * @version $Revision$ $Date$
  */
 public class JAASSecurityTest extends AbstractWebModuleTest {
 

Modified: geronimo/trunk/modules/transaction/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/transaction/pom.xml?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/transaction/pom.xml (original)
+++ geronimo/trunk/modules/transaction/pom.xml Thu Aug 10 12:56:47 2006
@@ -88,6 +88,11 @@
         </dependency>
 
         <dependency>
+            <groupId>backport-util-concurrent</groupId>
+            <artifactId>backport-util-concurrent</artifactId>
+        </dependency>
+
+        <dependency>
             <groupId>concurrent</groupId>
             <artifactId>concurrent</artifactId>
         </dependency>

Modified: geronimo/trunk/modules/transaction/project.xml
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/transaction/project.xml?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/transaction/project.xml (original)
+++ geronimo/trunk/modules/transaction/project.xml Thu Aug 10 12:56:47 2006
@@ -42,32 +42,11 @@
 
     <dependencies>
         <!-- Module Dependencies -->
-        <!-- temp, for ServerInfo. Remove when it is moved to Kernel-->
-        <dependency>
-            <groupId>geronimo</groupId>
-            <artifactId>geronimo-system</artifactId>
-            <version>${pom.currentVersion}</version>
-        </dependency>
 
-        <!-- thread pool, for timer -->
-        <dependency>
-            <groupId>geronimo</groupId>
-            <artifactId>geronimo-core</artifactId>
-            <version>${pom.currentVersion}</version>
-        </dependency>
-
-
-        <!-- actual tx dependencies -->
         <dependency>
              <groupId>geronimo</groupId>
              <artifactId>geronimo-j2ee</artifactId>
              <version>${pom.currentVersion}</version>
-         </dependency>
-
-        <dependency>
-            <groupId>geronimo</groupId>
-            <artifactId>geronimo-kernel</artifactId>
-            <version>${pom.currentVersion}</version>
         </dependency>
 
         <dependency>
@@ -91,9 +70,9 @@
         <!-- Thirdparty -->
 
         <dependency>
-            <groupId>concurrent</groupId>
-            <artifactId>concurrent</artifactId>
-            <version>${concurrent_version}</version>
+            <groupId>backport-util-concurrent</groupId>
+            <artifactId>backport-util-concurrent</artifactId>
+            <version>${backport_util_concurrent_version}</version>
         </dependency>
 
         <dependency>
@@ -103,18 +82,39 @@
             <url>http://jakarta.apache.org/commons/logging/</url>
         </dependency>
 
-        <!--compiled by David Jencks, but tagged version-->
+        <!-- Optional -->
+
+        <!-- Only for *GBean classes -->
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-system</artifactId>
+            <version>${pom.currentVersion}</version>
+            <!--<optional>true</optional>-->
+        </dependency>
+
+        <!-- Only for *GBean classes -->
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-kernel</artifactId>
+            <version>${pom.currentVersion}</version>
+            <!--<optional>true</optional>-->
+        </dependency>
+
         <dependency>
             <groupId>org.objectweb.howl</groupId>
             <artifactId>howl</artifactId>
             <version>${howl_version}</version>
             <url>http://forge.objectweb.org/projects/howl</url>
+            <!--<optional>true</optional>-->
         </dependency>
 
+        <!-- Test -->
+
         <dependency>
             <groupId>mx4j</groupId>
             <artifactId>mx4j</artifactId>
             <version>${mx4j_version}</version>
+            <type>test</type>
         </dependency>
     </dependencies>
 </project>

Modified: geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/log/HOWLLog.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/log/HOWLLog.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/log/HOWLLog.java (original)
+++ geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/log/HOWLLog.java Thu Aug 10 12:56:47 2006
@@ -18,6 +18,7 @@
 package org.apache.geronimo.transaction.log;
 
 import java.io.IOException;
+import java.io.File;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -27,17 +28,12 @@
 
 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.GBeanLifecycle;
-import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.transaction.manager.LogException;
 import org.apache.geronimo.transaction.manager.Recovery;
 import org.apache.geronimo.transaction.manager.TransactionBranchInfo;
 import org.apache.geronimo.transaction.manager.TransactionBranchInfoImpl;
 import org.apache.geronimo.transaction.manager.TransactionLog;
 import org.apache.geronimo.transaction.manager.XidFactory;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.objectweb.howl.log.Configuration;
 import org.objectweb.howl.log.LogClosedException;
 import org.objectweb.howl.log.LogConfigurationException;
@@ -53,7 +49,7 @@
 /**
  * @version $Rev$ $Date$
  */
-public class HOWLLog implements TransactionLog, GBeanLifecycle {
+public class HOWLLog implements TransactionLog {
 //    static final byte PREPARE = 1;
     //these are used as debugging aids only
     private static final byte COMMIT = 2;
@@ -63,7 +59,7 @@
 
     private static final Log log = LogFactory.getLog(HOWLLog.class);
 
-    private final ServerInfo serverInfo;
+    private File serverBaseDir;
     private String logFileDir;
 
     private final XidFactory xidFactory;
@@ -86,8 +82,8 @@
                    int minBuffers,
                    int threadsWaitingForceThreshold,
                    XidFactory xidFactory,
-                   ServerInfo serverInfo) throws IOException, LogConfigurationException {
-        this.serverInfo = serverInfo;
+                   File serverBaseDir) throws IOException, LogConfigurationException {
+        this.serverBaseDir = serverBaseDir;
         setBufferClassName(bufferClassName);
         setBufferSizeKBytes(bufferSize);
         setChecksumEnabled(checksumEnabled);
@@ -109,10 +105,15 @@
         return logFileDir;
     }
 
-    public void setLogFileDir(String logDir) {
-        this.logFileDir = logDir;
+    public void setLogFileDir(String logDirName) {
+        File logDir = new File(logDirName);
+        if (!logDir.isAbsolute()) {
+            logDir = new File(serverBaseDir, logDirName);
+        }
+
+        this.logFileDir = logDirName;
         if (started) {
-            configuration.setLogFileDir(serverInfo.resolveServerPath(logDir));
+            configuration.setLogFileDir(logDir.getAbsolutePath());
         }
     }
 
@@ -204,10 +205,6 @@
         configuration.setMaxLogFiles(maxLogFiles);
     }
 
-    public ServerInfo getServerInfo() {
-        return serverInfo;
-    }
-
     public void doStart() throws Exception {
         started = true;
         setLogFileDir(logFileDir);
@@ -395,49 +392,4 @@
         }
 
     }
-
-    public static final GBeanInfo GBEAN_INFO;
-
-    static {
-        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(HOWLLog.class, NameFactory.TRANSACTION_LOG);
-        infoFactory.addAttribute("bufferClassName", String.class, true);
-        infoFactory.addAttribute("bufferSizeKBytes", Integer.TYPE, true);
-        infoFactory.addAttribute("checksumEnabled", Boolean.TYPE, true);
-        infoFactory.addAttribute("flushSleepTimeMilliseconds", Integer.TYPE, true);
-        infoFactory.addAttribute("logFileDir", String.class, true);
-        infoFactory.addAttribute("logFileExt", String.class, true);
-        infoFactory.addAttribute("logFileName", String.class, true);
-        infoFactory.addAttribute("maxBlocksPerFile", Integer.TYPE, true);
-        infoFactory.addAttribute("maxBuffers", Integer.TYPE, true);
-        infoFactory.addAttribute("maxLogFiles", Integer.TYPE, true);
-        infoFactory.addAttribute("minBuffers", Integer.TYPE, true);
-        infoFactory.addAttribute("threadsWaitingForceThreshold", Integer.TYPE, true);
-
-        infoFactory.addReference("XidFactory", XidFactory.class, NameFactory.XID_FACTORY);
-        infoFactory.addReference("ServerInfo", ServerInfo.class, NameFactory.GERONIMO_SERVICE);
-
-        infoFactory.addInterface(TransactionLog.class);
-
-        infoFactory.setConstructor(new String[]{
-            "bufferClassName",
-            "bufferSizeKBytes",
-            "checksumEnabled",
-            "flushSleepTimeMilliseconds",
-            "logFileDir",
-            "logFileExt",
-            "logFileName",
-            "maxBlocksPerFile",
-            "maxBuffers",
-            "maxLogFiles",
-            "minBuffers",
-            "threadsWaitingForceThreshold",
-            "XidFactory",
-            "ServerInfo"});
-        GBEAN_INFO = infoFactory.getBeanInfo();
-    }
-
-    public static GBeanInfo getGBeanInfo() {
-        return GBEAN_INFO;
-    }
-
 }

Modified: geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java?rev=430508&r1=430507&r2=430508&view=diff
==============================================================================
--- geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java (original)
+++ geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java Thu Aug 10 12:56:47 2006
@@ -237,7 +237,7 @@
                               }
                               else
                               {
-                                  throw new RollbackException("Unable to commit");
+                                  throw new RollbackException("Unable to commit: transaction marked for rollback");
                               }
             }
             synchronized (this) {