[jboss-user] [JBoss Cache: Core Edition] - Re: How to listen to network connected and disconnected even

bstansberry@jboss.com do-not-reply at jboss.com
Mon Dec 15 12:55:19 EST 2008

You can implement the org.jgroups.ChannelListener interface (http://www.jgroups.org/javagroupsnew/docs/javadoc/org/jgroups/ChannelListener.html ).  You register your impl with the org.jgroups.Channel used by the cache via the Channel.add/removeChannelListener(ChannelListener listener) methods. You get a ref to the channel from a started cache via cache.getConfiguration().getRuntimeConfig().getChannel().

As with all JGroups callbacks, be careful not to execute long running tasks in the thread that invokes the listener callbacks. And don't try to use that thread to do anything that results in sending messages to the cluster.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4196658#4196658

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4196658

More information about the jboss-user mailing list