[infinispan-dev] XSite route status listener in server - ISPN-7230/ISPN-7231

Galder Zamarreño galder at redhat.com
Thu Jan 12 06:10:44 EST 2017


Hi Paul,

Sorry to bother you again :)

Re: https://issues.jboss.org/browse/ISPN-7230 & https://issues.jboss.org/browse/ISPN-7231

The aim of these JIRAs is to have a x-site view exposed as an INFO message as well as JMX and DMR operation.

To do that, following Bela's advice, I've extracted RELAY2 protocol of the stack and on Infinispan's JGroupsTransport start() method, call setRouteStatusListener() with a relay RouteStatusListener implementation that allows the x-site view to be tracked [1].

This works fine in library mode, but in server, on startup setRouteStatusListener() sometimes gets called after the Relayer's viewAccepted() method has been already called (which is the one that calls into RouteStatusListener). These means that the inital x-site view might not be registered.

So, what would be the correct place to add the setRouteStatusListener() call so that all views are captured? Or given how the server works, do I need to avoid using setRouteStatusListener() and use my own, Infinispan level, listener for tracking somehow?

Cheers,

[1] https://github.com/galderz/infinispan/blob/t_7230/core/src/main/java/org/infinispan/remoting/transport/jgroups/JGroupsTransport.java#L926
--
Galder Zamarreño
Infinispan, Red Hat




More information about the infinispan-dev mailing list