[jboss-cvs] JBossAS SVN: r72185 - branches/Branch_4_2/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:41:21 EDT 2008
Author: adrian at jboss.org
Date: 2008-04-14 11:41:21 -0400 (Mon, 14 Apr 2008)
New Revision: 72185
Modified:
branches/Branch_4_2/server/src/main/org/jboss/invocation/pooled/interfaces/PooledInvokerProxy.java
Log:
Port [JBAS-5431] from head
Modified: branches/Branch_4_2/server/src/main/org/jboss/invocation/pooled/interfaces/PooledInvokerProxy.java
===================================================================
--- branches/Branch_4_2/server/src/main/org/jboss/invocation/pooled/interfaces/PooledInvokerProxy.java 2008-04-14 15:40:11 UTC (rev 72184)
+++ branches/Branch_4_2/server/src/main/org/jboss/invocation/pooled/interfaces/PooledInvokerProxy.java 2008-04-14 15:41:21 UTC (rev 72185)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
package org.jboss.invocation.pooled.interfaces;
import java.io.IOException;
@@ -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;
@@ -507,11 +489,11 @@
protected ClientSocket firstConnection()
{
- synchronized (pool)
- {
- if(pool.size() > 0)
+ synchronized (pool)
+ {
+ if(pool.size() > 0)
return (ClientSocket)pool.removeFirst();
- }
+ }
return null;
}
@@ -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