FileDocCategorySizeDatePackage
HASingletonMBeanExample.javaAPI DocJBoss 4.2.11850Fri Jul 13 20:52:42 BST 2007org.jboss.ha.singleton.examples

HASingletonMBeanExample

public class HASingletonMBeanExample extends Object implements HASingletonMBeanExampleMBean

An sample singleton MBean.

author
Ivelin Ivanov
author
Scott.Stark@jboss.org
version
$Revision: 57188 $

Fields Summary
private static Logger
log
private boolean
isMasterNode
Constructors Summary
Methods Summary
public booleanisMasterNode()

      return isMasterNode;
   
public voidstartSingleton()


     
   
      isMasterNode = true;
      log.info("Notified to start as singleton");
   
public voidstopSingleton(java.lang.String gracefulShutdown)

      isMasterNode = false;
      log.info("Notified to stop as singleton with argument: " + gracefulShutdown);