[jboss-jira] [JBoss JIRA] Created: (JGRP-264) Multiplexer: reconnect fails

Bela Ban (JIRA) jira-events at jboss.com
Fri Jul 28 04:27:11 EDT 2006


Multiplexer: reconnect fails
----------------------------

                 Key: JGRP-264
                 URL: http://jira.jboss.com/jira/browse/JGRP-264
             Project: JGroups
          Issue Type: Bug
    Affects Versions: 2.3 SP1, 2.3, 2.2.9 SP3 (2.2.9.3), 2.2.9.2, 2.2.9.1, 2.2.9, 2.2.8
            Reporter: Bela Ban
         Assigned To: Bela Ban
             Fix For: 2.4


[Brian Stansberry]

AS test o.j.t.c.partition.test.PartitionRestartUnitTestCase surfaced an
issue with the multiplexer and a disconnect followed by a reconnect (w/o
close()).

Problem is basically the Map<String, Channel> service field in
Multiplexer. A service gets added to this map when a MuxChannel is
created.  It currently gets removed as part of
Multiplexer.handleServiceDown(), which gets called as part of
disconnect().

Problem is once its removed, it doesn't get added again as part of
connect() processing, so thereafter things fail. I think it should be
removed as part of close(), but haven't looked carefully enough to see
if would have side effects.

I've added a couple tests to MultiplexerTest to ensure things work with
a disconnect() followed by a new connect().

I looked at it a little bit and it seemed an easy solution was to move
the call to Multiplexer.unregister() from
Multiplexer.handleServiceDown() to JChannelFactory.close().

Index: JChannelFactory.java
===================================================================
RCS file:
/cvsroot/javagroups/JGroups/src/org/jgroups/JChannelFactory.java,v
retrieving revision 1.29
diff -u -r1.29 JChannelFactory.java
--- JChannelFactory.java	14 Jul 2006 12:17:24 -0000	1.29
+++ JChannelFactory.java	26 Jul 2006 21:35:24 -0000
@@ -389,6 +389,7 @@
                     if(addr != null) {
                         try {
                             mux.sendServiceDownMessage(ch.getId(),
addr);
+                            mux.unregister(ch.getId());
                         }
                         catch(Exception e) {
                             if(log.isErrorEnabled())
Index: mux/Multiplexer.java
===================================================================
RCS file:
/cvsroot/javagroups/JGroups/src/org/jgroups/mux/Multiplexer.java,v
retrieving revision 1.17
diff -u -r1.17 Multiplexer.java
--- mux/Multiplexer.java	14 Jul 2006 13:09:25 -0000	1.17
+++ mux/Multiplexer.java	26 Jul 2006 21:35:26 -0000
@@ -599,9 +599,9 @@
             }
         }
 
-        Address local_address=getLocalAddress();
-        if(local_address != null && host != null &&
host.equals(local_address))
-            unregister(service);
+//        Address local_address=getLocalAddress();
+//        if(local_address != null && host != null &&
host.equals(local_address))
+//            unregister(service);
     }


With this, as the MultiplexerTest cases pass, as does the AS integration
test. 
 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list