Re: [JBoss-dev] CVS update: jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java
What do you mean "this morning"... =P --jason marc fleury wrote: >ok sorry for freaking out, man I am prissy this morning. > >in a general bad mood, > >marcf > > >|-Original Message- >|From: Sacha Labourey [mailto:[EMAIL PROTECTED]] >|Sent: Friday, March 01, 2002 7:32 AM >|To: marc fleury; [EMAIL PROTECTED] >|Subject: RE: [JBoss-dev] CVS update: >|jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java >| >| >|No ;) >| >|No sub-partitions ;) >| >|cluster <=> partition != sub-partition >| >|Partitions have always be in. What you don't get are *sub*-partitions. But >|this CVS log doesn't concern sub-partition at all. >| >|sky is blue. >| >|> -Message d'origine- >|> De : marc fleury [mailto:[EMAIL PROTECTED]] >|> Envoyé : vendredi, 1 mars 2002 19:27 >|> À : Sacha Labourey; [EMAIL PROTECTED] >|> Objet : RE: [JBoss-dev] CVS update: >|> jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java >|> >|> >|> oh no, complexity creeping back in??? >|> >|> no sub partitions, please, I still don't get what they do. >|> >|> marcf > > >___ >Jboss-development mailing list >[EMAIL PROTECTED] >https://lists.sourceforge.net/lists/listinfo/jboss-development > ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] CVS update: jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java
ok sorry for freaking out, man I am prissy this morning. in a general bad mood, marcf |-Original Message- |From: Sacha Labourey [mailto:[EMAIL PROTECTED]] |Sent: Friday, March 01, 2002 7:32 AM |To: marc fleury; [EMAIL PROTECTED] |Subject: RE: [JBoss-dev] CVS update: |jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java | | |No ;) | |No sub-partitions ;) | |cluster <=> partition != sub-partition | |Partitions have always be in. What you don't get are *sub*-partitions. But |this CVS log doesn't concern sub-partition at all. | |sky is blue. | |> -Message d'origine- |> De : marc fleury [mailto:[EMAIL PROTECTED]] |> Envoyé : vendredi, 1 mars 2002 19:27 |> À : Sacha Labourey; [EMAIL PROTECTED] |> Objet : RE: [JBoss-dev] CVS update: |> jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java |> |> |> oh no, complexity creeping back in??? |> |> no sub partitions, please, I still don't get what they do. |> |> marcf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] CVS update: jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java
oh no, complexity creeping back in??? no sub partitions, please, I still don't get what they do. marcf |-Original Message- |From: [EMAIL PROTECTED] |[mailto:[EMAIL PROTECTED]]On Behalf Of Sacha |Labourey |Sent: Friday, March 01, 2002 4:36 AM |To: [EMAIL PROTECTED] |Subject: [JBoss-dev] CVS update: |jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java | | | User: slaboure | Date: 02/03/01 04:35:30 | | Modified:src/main/org/jboss/ha/framework/server HAPartitionImpl.java | Log: | Unbind in NonSerializableFactory was not performed at service shutdown | | Revision ChangesPath | 1.17 +6 -2 |jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java | | Index: HAPartitionImpl.java | === | RCS file: |/cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HAPar |titionImpl.java,v | retrieving revision 1.16 | retrieving revision 1.17 | diff -u -r1.16 -r1.17 | --- HAPartitionImpl.java 17 Feb 2002 03:34:27 - 1.16 | +++ HAPartitionImpl.java 1 Mar 2002 12:35:29 - 1.17 | @@ -33,7 +33,7 @@ |* |* @author mailto:[EMAIL PROTECTED]";>Sacha |Labourey. |* @author mailto:[EMAIL PROTECTED]";>Bill Burke. | - * @version $Revision: 1.16 $ | + * @version $Revision: 1.17 $ |* |* Revisions: |*/ | @@ -179,13 +179,17 @@ |log.error("operation failed", e); | } | | + String boundName = "/HAPartition/" + partitionName; | + | InitialContext ctx = new InitialContext(); | try { | - ctx.unbind("/HAPartition/" + partitionName); | + | + ctx.unbind(boundName); | } | finally { |ctx.close(); | } | + NonSerializableFactory.unbind (boundName); | | log.info("Partition " + partitionName + " closed."); | } | | | | |___ |Jboss-development mailing list |[EMAIL PROTECTED] |https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] CVS update: jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java
No ;) No sub-partitions ;) cluster <=> partition != sub-partition Partitions have always be in. What you don't get are *sub*-partitions. But this CVS log doesn't concern sub-partition at all. sky is blue. > -Message d'origine- > De : marc fleury [mailto:[EMAIL PROTECTED]] > Envoyé : vendredi, 1 mars 2002 19:27 > À : Sacha Labourey; [EMAIL PROTECTED] > Objet : RE: [JBoss-dev] CVS update: > jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java > > > oh no, complexity creeping back in??? > > no sub partitions, please, I still don't get what they do. > > marcf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java
User: slaboure Date: 02/03/01 04:35:30 Modified:src/main/org/jboss/ha/framework/server HAPartitionImpl.java Log: Unbind in NonSerializableFactory was not performed at service shutdown Revision ChangesPath 1.17 +6 -2 jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java Index: HAPartitionImpl.java === RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- HAPartitionImpl.java 17 Feb 2002 03:34:27 - 1.16 +++ HAPartitionImpl.java 1 Mar 2002 12:35:29 - 1.17 @@ -33,7 +33,7 @@ * * @author mailto:[EMAIL PROTECTED]";>Sacha Labourey. * @author mailto:[EMAIL PROTECTED]";>Bill Burke. - * @version $Revision: 1.16 $ + * @version $Revision: 1.17 $ * * Revisions: */ @@ -179,13 +179,17 @@ log.error("operation failed", e); } + String boundName = "/HAPartition/" + partitionName; + InitialContext ctx = new InitialContext(); try { - ctx.unbind("/HAPartition/" + partitionName); + + ctx.unbind(boundName); } finally { ctx.close(); } + NonSerializableFactory.unbind (boundName); log.info("Partition " + partitionName + " closed."); } ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java
User: slaboure Date: 02/01/12 08:53:38 Modified:src/main/org/jboss/ha/framework/server HAPartitionImpl.java Log: When creating the DRM, gives it its MBeanServer reference Revision ChangesPath 1.14 +2 -2 jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java Index: HAPartitionImpl.java === RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- HAPartitionImpl.java 2002/01/05 01:12:46 1.13 +++ HAPartitionImpl.java 2002/01/12 16:53:38 1.14 @@ -33,7 +33,7 @@ * * @author mailto:[EMAIL PROTECTED]";>Sacha Labourey. * @author mailto:[EMAIL PROTECTED]";>Bill Burke. - * @version $Revision: 1.13 $ + * @version $Revision: 1.14 $ * * Revisions: */ @@ -100,7 +100,7 @@ // Create the DRM and link it to this HAPartition // log.debug("create replicant manager"); - this.replicantManager = new DistributedReplicantManagerImpl(this); + this.replicantManager = new DistributedReplicantManagerImpl(this, this.server); log.debug("init replicant manager"); this.replicantManager.init(); log.debug("bind replicant manager"); ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java
User: patriot1burke Date: 01/12/31 12:40:50 Modified:src/main/org/jboss/ha/framework/server HAPartitionImpl.java Log: MarshalledInvocation used now Revision ChangesPath 1.12 +127 -127 jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java Index: HAPartitionImpl.java === RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- HAPartitionImpl.java 2001/12/29 16:20:13 1.11 +++ HAPartitionImpl.java 2001/12/31 20:40:50 1.12 @@ -33,7 +33,7 @@ * * @author mailto:[EMAIL PROTECTED]";>Sacha Labourey. * @author mailto:[EMAIL PROTECTED]";>Bill Burke. - * @version $Revision: 1.11 $ + * @version $Revision: 1.12 $ * * Revisions: */ @@ -44,13 +44,13 @@ { // Constants - - final JavaGroups.MethodLookup method_lookup_clos=new JavaGroups.MethodLookupClos (); + final JavaGroups.MethodLookup method_lookup_clos=new JavaGroups.MethodLookupClos(); // Attributes - protected HashMap rpcHandlers = new HashMap (); - protected HashMap stateHandlers = new HashMap (); - protected ArrayList listeners = new ArrayList (); + protected HashMap rpcHandlers = new HashMap(); + protected HashMap stateHandlers = new HashMap(); + protected ArrayList listeners = new ArrayList(); protected Vector members = null; protected String partitionName; @@ -72,15 +72,15 @@ // Constructors -- - public HAPartitionImpl (String partitionName, JavaGroups.JChannel channel, boolean deadlock_detection, MBeanServer server) throws Exception + public HAPartitionImpl(String partitionName, JavaGroups.JChannel channel, boolean deadlock_detection, MBeanServer server) throws Exception { - this (partitionName, channel, deadlock_detection); + this(partitionName, channel, deadlock_detection); this.server = server; } - public HAPartitionImpl (String partitionName, JavaGroups.JChannel channel, boolean deadlock_detection) throws Exception + public HAPartitionImpl(String partitionName, JavaGroups.JChannel channel, boolean deadlock_detection) throws Exception { - super(channel, null, null, new Object (), false); // init RpcDispatcher with a fake target object + super(channel, null, null, new Object(), false); // init RpcDispatcher with a fake target object this.log = Logger.getLogger("HAPartition:" + partitionName); this.channel = channel; this.partitionName = partitionName; @@ -88,50 +88,50 @@ // Public - public void init () throws Exception + public void init() throws Exception { // Subscribe to dHA events comming generated by the JavaGroups protocol stack // - log.debug ("SetMembershipListener"); - SetMembershipListener (this); - log.debug ("SetMessageListener"); - SetMessageListener (this); + log.debug("SetMembershipListener"); + SetMembershipListener(this); + log.debug("SetMessageListener"); + SetMessageListener(this); // Create the DRM and link it to this HAPartition // - log.debug ("create replicant manager"); - this.replicantManager = new DistributedReplicantManagerImpl (this); - log.debug ("init replicant manager"); - this.replicantManager.init (); - log.debug ("bind replicant manager"); + log.debug("create replicant manager"); + this.replicantManager = new DistributedReplicantManagerImpl(this); + log.debug("init replicant manager"); + this.replicantManager.init(); + log.debug("bind replicant manager"); // Create the DS and link it to this HAPartition // - log.debug ("create distributed state"); - this.dsManager = new DistributedStateImpl (this, this.server); - log.debug ("init distributed state service"); - this.dsManager.init (); - log.debug ("bind distributed state service"); + log.debug("create distributed state"); + this.dsManager = new DistributedStateImpl(this, this.server); + log.debug("init distributed state service"); + this.dsManager.init(); + log.debug("bind distributed state service"); // Bind ourself in the public JNDI space // - Context ctx = new InitialContext (); - this.bind ("/HAPartition/" + partitionName, this, HAPartitionImpl.class, ctx); + Context ctx = new InitialContext(); +
[JBoss-dev] CVS update: jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java
User: slaboure Date: 01/11/26 06:20:01 Modified:src/main/org/jboss/ha/framework/server HAPartitionImpl.java Log: Added javadoc comments. Reorganized code to JBoss coding conventions. Revision ChangesPath 1.10 +256 -239 jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java Index: HAPartitionImpl.java === RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- HAPartitionImpl.java 2001/11/26 03:24:51 1.9 +++ HAPartitionImpl.java 2001/11/26 14:20:01 1.10 @@ -7,61 +7,46 @@ package org.jboss.ha.framework.server; - -import JavaGroups.MethodLookup; -import JavaGroups.MethodLookupClos; -import JavaGroups.MethodLookupJava; -import JavaGroups.MembershipListener; -import JavaGroups.MessageListener; -import JavaGroups.JChannel; -import JavaGroups.Channel; -import JavaGroups.Message; -import JavaGroups.MethodCall; -import JavaGroups.RpcDispatcher; -import JavaGroups.RspList; -import JavaGroups.Rsp; -import JavaGroups.GroupRequest; -import JavaGroups.View; -import JavaGroups.Address; -import JavaGroups.Util; - import java.util.Vector; import java.util.ArrayList; import java.util.HashMap; -import java.util.Iterator; -import java.io.Serializable; - -import javax.naming.InitialContext; -import javax.naming.Reference; -import javax.naming.StringRefAddr; -import javax.naming.Name; import javax.naming.Context; -import javax.naming.NamingException; -import javax.naming.NameNotFoundException; - -import org.jboss.naming.NonSerializableFactory; - -import java.lang.reflect.Method; +import javax.naming.StringRefAddr; +import javax.naming.InitialContext; -import org.jboss.logging.Logger; +import JavaGroups.MethodCall; -import org.jboss.ha.framework.interfaces.HAPartition; import org.jboss.ha.framework.interfaces.DistributedReplicantManager; import org.jboss.ha.framework.interfaces.DistributedState; +import org.jboss.ha.framework.interfaces.HAPartition; +import org.jboss.ha.framework.interfaces.HAPartition.HAPartitionStateTransfer; +import org.jboss.ha.framework.interfaces.HAPartition.HAMembershipListener; +import org.jboss.naming.NonSerializableFactory; +import org.jboss.logging.Logger; -/** - * This class is an abstraction class for a JavaGroups RPCDispatch and JChannel. +/** + * This class is an abstraction class for a JavaGroups RPCDispatch and JChannel. + * It is a default implementation of HAPartition for the http://www.javagroups.com/";>JavaGroups framework * - * @author [EMAIL PROTECTED] - * @author [EMAIL PROTECTED] - * @version $Revision: 1.9 $ + * @author mailto:[EMAIL PROTECTED]";>Sacha Labourey. + * @author mailto:[EMAIL PROTECTED]";>Bill Burke. + * @version $Revision: 1.10 $ * * Revisions: -*/ -public class HAPartitionImpl extends RpcDispatcher implements HAPartition, MembershipListener, MessageListener + */ + +public class HAPartitionImpl + extends JavaGroups.RpcDispatcher + implements JavaGroups.MessageListener, JavaGroups.MembershipListener, HAPartition { + // Constants - + + final JavaGroups.MethodLookup method_lookup_clos=new JavaGroups.MethodLookupClos (); + + // Attributes + protected HashMap rpcHandlers = new HashMap (); protected HashMap stateHandlers = new HashMap (); protected ArrayList listeners = new ArrayList (); @@ -71,7 +56,7 @@ protected String nodeName; protected int timeout = 500; - protected JChannel channel = null; + protected JavaGroups.JChannel channel = null; protected DistributedReplicantManagerImpl replicantManager = null; protected DistributedStateImpl dsManager = null; @@ -80,9 +65,11 @@ protected long currentViewId = -1; - final MethodLookup method_lookup_clos=new MethodLookupClos (); + // Static - public HAPartitionImpl (String partitionName, JChannel channel, boolean deadlock_detection) throws Exception + // Constructors -- + + public HAPartitionImpl (String partitionName, JavaGroups.JChannel channel, boolean deadlock_detection) throws Exception { super(channel, null, null, new Object (), false); // init RpcDispatcher with a fake target object this.log = Logger.getLogger("HAPartition:" + partitionName); @@ -90,6 +77,8 @@ this.partitionName = partitionName; } +// Public
[JBoss-dev] CVS update: jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java
User: slaboure Date: 01/11/23 06:37:38 Modified:src/main/org/jboss/ha/framework/server HAPartitionImpl.java Log: Added asynchronous calls and removed unnecessary throws declaration Revision ChangesPath 1.8 +16 -1 jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java Index: HAPartitionImpl.java === RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- HAPartitionImpl.java 2001/11/09 22:43:28 1.7 +++ HAPartitionImpl.java 2001/11/23 14:37:38 1.8 @@ -56,7 +56,7 @@ * * @author [EMAIL PROTECTED] * @author [EMAIL PROTECTED] - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ * * Revisions: */ @@ -274,6 +274,21 @@ return rtn; } + /** +* This function is an abstraction of RpcDispatcher for asynchronous messages +*/ + public void callAsynchMethodOnCluster (String objName, String methodName, Object[] args, boolean excludeSelf) throws Exception + { + MethodCall m = new MethodCall (objName + "." + methodName, args); + this.CallRemoteMethods (null, m, GroupRequest.GET_NONE, timeout); + + if (!excludeSelf) + { + m.SetName (methodName); + Object handler = rpcHandlers.get (objName); + m.Invoke (handler, method_lookup_clos); + } + } // * // * // State transfer management ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java
User: slaboure Date: 01/11/09 14:43:28 Modified:src/main/org/jboss/ha/framework/server HAPartitionImpl.java Log: Added some basic methods used for SFSB support: - allow to get the current view - rebind instead of bind to JNDI Revision ChangesPath 1.7 +11 -4 jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java Index: HAPartitionImpl.java === RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- HAPartitionImpl.java 2001/10/20 20:51:33 1.6 +++ HAPartitionImpl.java 2001/11/09 22:43:28 1.7 @@ -56,10 +56,10 @@ * * @author [EMAIL PROTECTED] * @author [EMAIL PROTECTED] - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * * Revisions: - */ +*/ public class HAPartitionImpl extends RpcDispatcher implements HAPartition, MembershipListener, MessageListener { protected HashMap rpcHandlers = new HashMap (); @@ -150,7 +150,7 @@ // StringRefAddr addr = new StringRefAddr ("nns", jndiName); Reference ref = new Reference ( classType.getName (), addr, NonSerializableFactory.class.getName (), null); - ctx.bind (n.get (0), ref); + ctx.rebind (n.get (0), ref); } public void start () throws Exception @@ -184,6 +184,7 @@ public void close () throws Exception { + log.info ("Closing partition " + partitionName); // Stop the DRM and DS services // try {this.replicantManager.stop ();} catch (Exception printed) {printed.printStackTrace ();} @@ -192,6 +193,7 @@ try {channel.Close ();} catch (Exception printed) {printed.printStackTrace ();} new InitialContext ().unbind ("/HAPartition/" + partitionName); + log.info ("Partition " + partitionName + " closed."); } public String getNodeName () @@ -218,6 +220,11 @@ { return this.currentViewId; } + + public Vector getCurrentView () + { + return this.members; + } // *** // *** @@ -388,7 +395,7 @@ // we update the view id // this.currentViewId = newView.GetVid().GetId(); - log.info("new view accepted: " + currentViewId); + log.info("new view accepted: " + currentViewId + " (" + newView.GetMembers () + ")"); if (this.members == null) { ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java
User: patriot1burke Date: 01/10/20 13:51:33 Modified:src/main/org/jboss/ha/framework/server HAPartitionImpl.java Log: added timeout to rpcs Revision ChangesPath 1.6 +2 -2 jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java Index: HAPartitionImpl.java === RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- HAPartitionImpl.java 2001/10/10 20:02:05 1.5 +++ HAPartitionImpl.java 2001/10/20 20:51:33 1.6 @@ -56,7 +56,7 @@ * * @author [EMAIL PROTECTED] * @author [EMAIL PROTECTED] - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ * * Revisions: */ @@ -69,7 +69,7 @@ protected String partitionName; protected String nodeName; - protected int timeout = 0; + protected int timeout = 500; protected JChannel channel = null; ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java
User: slaboure Date: 01/10/02 00:17:07 Modified:src/main/org/jboss/ha/framework/server HAPartitionImpl.java Log: Optimization: we save three methods calls for each method invocation. We could further improve this (one call) by using the same scheme in HARMIServerImpl. Revision ChangesPath 1.3 +11 -1 jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java Index: HAPartitionImpl.java === RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- HAPartitionImpl.java 2001/10/02 04:06:47 1.2 +++ HAPartitionImpl.java 2001/10/02 07:17:07 1.3 @@ -69,6 +69,8 @@ protected Logger log = null; + protected long currentViewId = -1; + final MethodLookup method_lookup_clos=new MethodLookupClos (); public HAPartitionImpl (String partitionName, JChannel channel, boolean deadlock_detection) throws Exception @@ -153,6 +155,10 @@ this.members = view.GetMembers (); log.info ("Num cluster members: " + members.size ()); + // Update the initial view id + // + this.currentViewId = view.GetVid().GetId(); + // We must now syncrhonize new state transfer subscriber // boolean rc = channel.GetState (null, 8000); @@ -201,7 +207,7 @@ public long getCurrentViewId() { - return channel.GetView().GetVid().GetId(); + return this.currentViewId; } // *** @@ -370,6 +376,10 @@ { try { + // we update the view id + // + this.currentViewId = newView.GetVid().GetId(); + if (this.members == null) { // Initial viewAccepted ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jbossmx/src/main/org/jboss/ha/framework/server HAPartitionImpl.java HARMIServerImpl.java
User: vlada Date: 01/10/01 21:06:47 Modified:src/main/org/jboss/ha/framework/server HAPartitionImpl.java HARMIServerImpl.java Log: rather than using machine dependent system time to track if client's view of cluster has changed use logical viewID from cluster Revision ChangesPath 1.2 +10 -3 jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java Index: HAPartitionImpl.java === RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HAPartitionImpl.java 2001/09/30 15:20:58 1.1 +++ HAPartitionImpl.java 2001/10/02 04:06:47 1.2 @@ -198,7 +198,12 @@ { return this.dsManager; } - + + public long getCurrentViewId() + { + return channel.GetView().GetVid().GetId(); + } + // *** // *** // RPC multicast communication @@ -424,8 +429,10 @@ newMembers.add (allMembers.elementAt (i)); return newMembers; } - - + + + + /// /** 1.2 +5 -10 jbossmx/src/main/org/jboss/ha/framework/server/HARMIServerImpl.java Index: HARMIServerImpl.java === RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HARMIServerImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HARMIServerImpl.java 2001/09/30 15:20:58 1.1 +++ HARMIServerImpl.java 2001/10/02 04:06:47 1.2 @@ -40,7 +40,6 @@ DistributedReplicantManager.ReplicantListener { protected String replicantName; - protected long lastSet = System.currentTimeMillis (); protected ArrayList replicants = new ArrayList (); protected Object handler; protected HashMap invokerMap = new HashMap (); @@ -100,12 +99,8 @@ e.printStackTrace (); } } + - public long getTag () - { - return lastSet; - } - public Object getLocal () throws Exception { return handler; @@ -121,10 +116,9 @@ replicants.clear (); replicants.addAll (newReplicants); } - lastSet = System.currentTimeMillis (); } - public HARMIResponse invoke (long tag, MarshalledObject mimo) throws Exception + public HARMIResponse invoke (long clientViewId, MarshalledObject mimo) throws Exception { RemoteMethodInvocation rmi = (RemoteMethodInvocation)mimo.get (); rmi.setMethodMap (invokerMap); @@ -133,10 +127,11 @@ try { HARMIResponse rsp = new HARMIResponse (); - if (tag < lastSet) + long clusterViewId = partition.getCurrentViewId(); + if (clientViewId != clusterViewId) { rsp.newReplicants = new ArrayList (replicants); -rsp.tag = lastSet; +rsp.currentViewId = clusterViewId; } rsp.response = method.invoke (handler, rmi.getArguments ()); ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development