[jboss-cvs] JBossAS SVN: r67031 - in branches/Branch_4_2/cluster/src/main/org/jboss/invocation/unified: server and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 13 13:11:55 EST 2007


Author: galder.zamarreno at jboss.com
Date: 2007-11-13 13:11:55 -0500 (Tue, 13 Nov 2007)
New Revision: 67031

Modified:
   branches/Branch_4_2/cluster/src/main/org/jboss/invocation/unified/interfaces/UnifiedInvokerHAProxy.java
   branches/Branch_4_2/cluster/src/main/org/jboss/invocation/unified/server/UnifiedInvokerHA.java
Log:
[JBAS-4950] invocationHasReachedAServer now called after every succesful invocation, plus added a convenience factory method in unified invoker proxy for testing purposes.

Modified: branches/Branch_4_2/cluster/src/main/org/jboss/invocation/unified/interfaces/UnifiedInvokerHAProxy.java
===================================================================
--- branches/Branch_4_2/cluster/src/main/org/jboss/invocation/unified/interfaces/UnifiedInvokerHAProxy.java	2007-11-13 18:10:55 UTC (rev 67030)
+++ branches/Branch_4_2/cluster/src/main/org/jboss/invocation/unified/interfaces/UnifiedInvokerHAProxy.java	2007-11-13 18:11:55 UTC (rev 67031)
@@ -48,7 +48,10 @@
 
 
 /**
+ * Unified invoker implementation for InvokerProxyHA
+ * 
  * @author <a href="mailto:tom.elrod at jboss.com">Tom Elrod</a>
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  */
 public class UnifiedInvokerHAProxy 
    extends UnifiedInvokerProxy
@@ -256,6 +259,8 @@
             {
                updateClusterInfo(haResponse.newReplicants, haResponse.currentViewId);
             }
+            
+            invocationHasReachedAServer(invocation);
 
             response = haResponse.response;
             return response;

Modified: branches/Branch_4_2/cluster/src/main/org/jboss/invocation/unified/server/UnifiedInvokerHA.java
===================================================================
--- branches/Branch_4_2/cluster/src/main/org/jboss/invocation/unified/server/UnifiedInvokerHA.java	2007-11-13 18:10:55 UTC (rev 67030)
+++ branches/Branch_4_2/cluster/src/main/org/jboss/invocation/unified/server/UnifiedInvokerHA.java	2007-11-13 18:11:55 UTC (rev 67031)
@@ -21,6 +21,7 @@
  */
 package org.jboss.invocation.unified.server;
 
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import javax.management.ObjectName;
@@ -34,11 +35,15 @@
 import org.jboss.invocation.unified.interfaces.UnifiedInvokerHAProxy;
 import org.jboss.mx.util.JMXExceptionDecoder;
 import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.serialization.SerializationManager;
 import org.jboss.remoting.serialization.SerializationStreamFactory;
 import org.jboss.system.Registry;
 
 /**
+ * Unified invoker implementation for InvokerHA
+ * 
  * @author <a href="mailto:tom.elrod at jboss.com">Tom Elrod</a>
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  */
 public class UnifiedInvokerHA extends UnifiedInvoker implements InvokerHA
 {
@@ -87,11 +92,8 @@
          familyName = target.getAssociatedPartition().getPartitionName() + "/" + beanName;
       }
 
-      UnifiedInvokerHAProxy proxy = new UnifiedInvokerHAProxy(getInvoker().getLocator(), getStrictRMIException(),
-                                                              target.getReplicants(),
-                                                              policy, proxyFamilyName, target.getCurrentViewId());
-      return proxy;
-
+      return createProxy(getStrictRMIException(),
+            target.getReplicants(), policy, proxyFamilyName, target.getCurrentViewId());
    }
 
    public void unregisterBean(ObjectName beanName) throws Exception
@@ -161,7 +163,7 @@
 
          /** End Clustering **/
 
-         return SerializationStreamFactory.getManagerInstance(getInvoker().getLocator().findSerializationType()).createdMarshalledValue(haResponse);
+         return getSerializationManager().createdMarshalledValue(haResponse);
       }
       catch(Exception e)
       {
@@ -186,4 +188,16 @@
 
    }
 
+   protected Invoker createProxy(boolean isStrictRMIException,
+       ArrayList targets, LoadBalancePolicy policy,
+       String proxyFamilyName, long viewId)
+   {
+      return new UnifiedInvokerHAProxy(getInvoker().getLocator(), isStrictRMIException,
+          targets, policy, proxyFamilyName, viewId);
+   }
+   
+   protected SerializationManager getSerializationManager() throws IOException
+   {
+      return SerializationStreamFactory.getManagerInstance(getInvoker().getLocator().findSerializationType());
+   }
 }
\ No newline at end of file




More information about the jboss-cvs-commits mailing list