[jboss-cvs] JBossAS SVN: r72184 - trunk/server/src/main/org/jboss/invocation/pooled/interfaces.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Apr 14 11:40:12 EDT 2008


Author: adrian at jboss.org
Date: 2008-04-14 11:40:11 -0400 (Mon, 14 Apr 2008)
New Revision: 72184

Modified:
   trunk/server/src/main/org/jboss/invocation/pooled/interfaces/PooledInvokerProxy.java
Log:
[JBAS-5431] - Use the TransactionPropagationContextUtil to get the correct TPCFactory

Modified: trunk/server/src/main/org/jboss/invocation/pooled/interfaces/PooledInvokerProxy.java
===================================================================
--- trunk/server/src/main/org/jboss/invocation/pooled/interfaces/PooledInvokerProxy.java	2008-04-14 15:40:07 UTC (rev 72183)
+++ trunk/server/src/main/org/jboss/invocation/pooled/interfaces/PooledInvokerProxy.java	2008-04-14 15:40:11 UTC (rev 72184)
@@ -54,6 +54,7 @@
 import org.jboss.invocation.Invocation;
 import org.jboss.invocation.Invoker;
 import org.jboss.tm.TransactionPropagationContextFactory;
+import org.jboss.tm.TransactionPropagationContextUtil;
 import org.jboss.logging.Logger;
 import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
 
@@ -77,25 +78,6 @@
    /** The current wire format we write */
    private static final int WIRE_VERSION = 1;
 
-   /**
-    * Factory for transaction propagation contexts.
-    *
-    * @todo marcf remove all transaction spill from here
-    * 
-    * When set to a non-null value, it is used to get transaction
-    * propagation contexts for remote method invocations.
-    * If <code>null</code>, transactions are not propagated on
-    * remote method invocations.
-    */
-   protected static TransactionPropagationContextFactory tpcFactory = null;
-
-   //  @todo: MOVE TO TRANSACTION
-   // 
-   // TPC factory
-   public static void setTPCFactory(TransactionPropagationContextFactory tpcf) {
-      tpcFactory = tpcf;
-   }
-
    // Simple performance measurements, not thread safe
    public static long getSocketTime = 0;
    public static long readTime = 0;
@@ -607,6 +589,7 @@
    public Object getTransactionPropagationContext()
       throws SystemException
    {
+      TransactionPropagationContextFactory tpcFactory = TransactionPropagationContextUtil.getTPCFactoryClientSide();
       return (tpcFactory == null) ? null : tpcFactory.getTransactionPropagationContext();
    }
 
@@ -625,7 +608,7 @@
       // Set the transaction propagation context
       //  @todo: MOVE TO TRANSACTION
       mi.setTransactionPropagationContext(getTransactionPropagationContext());
-
+      
       Object response = null;
       long start = System.currentTimeMillis();
       ClientSocket socket = getConnection();




More information about the jboss-cvs-commits mailing list