User: patriot1burke Date: 01/09/18 14:56:49 Modified: src/main/org/jboss/ha HAPartitionImpl.java Log: work in progress Revision Changes Path 1.5 +17 -28 jbossmx/src/main/org/jboss/ha/HAPartitionImpl.java Index: HAPartitionImpl.java =================================================================== RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/HAPartitionImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- HAPartitionImpl.java 2001/09/18 04:15:10 1.4 +++ HAPartitionImpl.java 2001/09/18 21:56:49 1.5 @@ -51,33 +51,6 @@ protected DistributedReplicantManagerImpl replicantManager; protected String nodeName; protected Logger log = null; - - /* - protected class PIMethodLookup implements JavaGroups.MethodLookup - { - public Method FindMethod(Class target_class, String method_name, Vector args) throws Exception - { - System.out.println("looking for method: " + method_name + " Class name: " + target_class.getName()); - Method retval=null, method; - Method[] methods=target_class.getMethods(); - int num_args=args.size(); - - // FIXME: Get funkier later. - for(int i=0; i < methods.length; i++) { - method=methods[i]; - System.out.println("does method match? " + method.getName()); - if(method.getName().equals(method_name) && - method.getParameterTypes().length == num_args) { - return method; - } - } - System.out.println("method not found!"); - throw new NoSuchMethodException(); - } - - } - */ - final MethodLookup method_lookup_clos=new MethodLookupClos(); public HAPartitionImpl(String partitionName, JChannel channel, @@ -91,6 +64,10 @@ public void init() throws Exception { + log.info("Get current members"); + View view = channel.GetView(); + this.members = view.GetMembers(); + log.info("Num cluster members: " + members.size()); log.info("SetMembershipListener"); SetMembershipListener(this); log.info("SetMessageListener"); @@ -219,6 +196,7 @@ // MessageLister methods public Object GetState() { + log.info("GetState called."); try { HashMap state = new HashMap(); @@ -226,6 +204,7 @@ while (keys.hasNext()) { String key = (String)keys.next(); + log.info("GetState for " + key); HAPartition.HAPartitionStateTransfer subscriber = (HAPartition.HAPartitionStateTransfer)stateHandlers.get(key); state.put(key, subscriber.getCurrentState()); } @@ -242,6 +221,7 @@ { try { + log.info("SetState called"); if (obj == null) { log.info("state is null"); @@ -252,9 +232,17 @@ while (keys.hasNext()) { String key = (String)keys.next(); + log.info("SetState for " + key); Object someState = state.get(key); HAPartition.HAPartitionStateTransfer subscriber = (HAPartition.HAPartitionStateTransfer)stateHandlers.get(key); - subscriber.setCurrentState((Serializable)someState); + if (subscriber != null) + { + subscriber.setCurrentState((Serializable)someState); + } + else + { + log.info("There is no stateHandler for: " + key); + } } } catch (Exception ex) @@ -308,6 +296,7 @@ Vector deadMembers = getDeadMembers(oldMembers, allMembers); Vector newMembers = getNewMembers(oldMembers, allMembers); this.members = allMembers; + log.info("membership changed from " + oldMembers.size() + " to " + allMembers.size()); synchronized(this.listeners) { for (int i = 0; i < listeners.size(); i++) _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development