Permalink
Browse files

registering ProbeHandler in ReqCorrelator

  • Loading branch information...
1 parent 2f580ec commit 71d281de204dc3098f0c594ffdbba68e28923e0d Bela Ban committed Nov 14, 2008
Showing with 12 additions and 1 deletion.
  1. +12 −1 src/org/jgroups/blocks/MessageDispatcher.java
@@ -4,6 +4,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jgroups.*;
+import org.jgroups.protocols.TP;
import org.jgroups.stack.Protocol;
import org.jgroups.stack.StateTransferInfo;
import org.jgroups.util.Rsp;
@@ -37,7 +38,7 @@
* the application instead of protocol level.
*
* @author Bela Ban
- * @version $Id: MessageDispatcher.java,v 1.74.2.3 2008/05/30 11:36:53 belaban Exp $
+ * @version $Id: MessageDispatcher.java,v 1.74.2.4 2008/11/14 15:16:41 belaban Exp $
*/
public class MessageDispatcher implements RequestHandler {
protected Channel channel=null;
@@ -287,9 +288,14 @@ public final void start() {
}
correlatorStarted();
corr.start();
+
if(channel != null) {
Vector tmp_mbrs=channel.getView() != null ? channel.getView().getMembers() : null;
setMembers(tmp_mbrs);
+ if(channel instanceof JChannel) {
+ TP transport=((JChannel)channel).getProtocolStack().getTransport();
+ corr.registerProbeHandler(transport);
+ }
}
}
@@ -303,6 +309,11 @@ public void stop() {
corr.stop();
}
+ if(channel instanceof JChannel) {
+ TP transport=((JChannel)channel).getProtocolStack().getTransport();
+ corr.unregisterProbeHandler(transport);
+ }
+
// fixes leaks of MembershipListeners (http://jira.jboss.com/jira/browse/JGRP-160)
if(adapter != null && handler != null) {
adapter.removeMembershipListener(handler);

0 comments on commit 71d281d

Please sign in to comment.