org.jboss.seam.jmx
Class JBossClusterMonitor

java.lang.Object
  extended by org.jboss.seam.jmx.JBossClusterMonitor

@Name(value="org.jboss.seam.jmx.jbossClusterMonitor")
@BypassInterceptors
@Scope(value=APPLICATION)
@Startup
@Install(precedence=0,
         classDependencies="org.jgroups.MembershipListener")
public class JBossClusterMonitor
extends Object

The purpose of this component is to detect a clustered environment and to inform the HttpSessionListener whether the origin of a session destroyed event is the failover of a session from one node to the next. If a node is failing over, we don't want the SFSBs referenced by the session to be destroyed.

Author:
Dan Allen

Constructor Summary
JBossClusterMonitor()
           
 
Method Summary
 void create()
           
 boolean failover()
           
static JBossClusterMonitor getInstance(javax.servlet.ServletContext ctx)
           
 boolean isClustered()
           
 boolean isJBoss()
           
 boolean isLastNode()
           
protected  MBeanServer locateJBoss()
           
 boolean nodeIsShuttingDown()
          Consults the jboss.system:type=Server MBean to determine if this instance of JBoss AS is currently being shutdown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBossClusterMonitor

public JBossClusterMonitor()
Method Detail

create

@Create
public void create()

isClustered

public boolean isClustered()

nodeIsShuttingDown

public boolean nodeIsShuttingDown()
Consults the jboss.system:type=Server MBean to determine if this instance of JBoss AS is currently being shutdown. Note that the flag only returns true if the shutdown() method on this MBean is used. It does not detect a force halt via a process signal (i.e., CTRL-C).


isLastNode

public boolean isLastNode()

failover

public boolean failover()

isJBoss

public boolean isJBoss()

locateJBoss

protected MBeanServer locateJBoss()

getInstance

public static JBossClusterMonitor getInstance(javax.servlet.ServletContext ctx)


Copyright © 2011 Seam Framework. All Rights Reserved.