org.ow2.jonas.lib.management.reconfig
Class ReconfigManager

java.lang.Object
  extended by org.ow2.jonas.lib.management.javaee.ManagedObject
      extended by org.ow2.jonas.lib.management.javaee.J2EEManagedObject
          extended by org.ow2.jonas.lib.management.reconfig.ReconfigManager
All Implemented Interfaces:
EventListener, NotificationListener

public class ReconfigManager
extends J2EEManagedObject
implements NotificationListener

This MBean allows persistent reconfiguration of a JOnAS server, all together with its embedded services, and possibly used resources like Data Sources and Mail Factories. This class implements NotificationListener interface. The ReconfigManager adds itself as Listener to the following JMX Notification types (JAVA types):

Author:
Adriana Danes

Field Summary
 
Fields inherited from class org.ow2.jonas.lib.management.javaee.J2EEManagedObject
J2EE_TYPE_APPLICATION, J2EE_TYPE_SERVER, NAME
 
Fields inherited from class org.ow2.jonas.lib.management.javaee.ManagedObject
logger
 
Constructor Summary
ReconfigManager(ObjectName objectName, ServerProperties props)
          ReconfigManager constructor.
 
Method Summary
 void addMBeanServerDelegateListener()
          Allow for this MBean to receive REGISTRATION_NOTIFICATION/UNREGISTRATION_NOTIFICATION emitted by the JMX server.
 void handleNotification(Notification notification, Object handback)
          Treat the notifications emitted by those MBeans having the ReconfigManager added as listener.
 void setJmxService(JmxService jmxService)
           
 void setLogConfigFileName(String logConfigFileName)
           
 void setServerConfigFileName(String serverConfigFileName)
           
 
Methods inherited from class org.ow2.jonas.lib.management.javaee.J2EEManagedObject
getObjectName, isEventProvider, isStateManageable, isStatisticsProvider, setEventProvider, setObjectName, setStateManageable, setStatisticsProvider
 
Methods inherited from class org.ow2.jonas.lib.management.javaee.ManagedObject
sendNotification, sendReconfigNotification, sendSaveNotification, setModelMBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReconfigManager

public ReconfigManager(ObjectName objectName,
                       ServerProperties props)
ReconfigManager constructor.

Parameters:
objectName - Associated MBean's OBJECT_NAME
props - JOnAS server configuration and environment properties
Method Detail

addMBeanServerDelegateListener

public void addMBeanServerDelegateListener()
                                    throws JMException
Allow for this MBean to receive REGISTRATION_NOTIFICATION/UNREGISTRATION_NOTIFICATION emitted by the JMX server.

Throws:
JMException - Could not register listener. The ReconfigManager is not working.

handleNotification

public void handleNotification(Notification notification,
                               Object handback)
Treat the notifications emitted by those MBeans having the ReconfigManager added as listener. This method determines the type of the notification and calls the specific treatment.

Specified by:
handleNotification in interface NotificationListener
Parameters:
notification - received notification
handback - received hand-back object

setJmxService

public void setJmxService(JmxService jmxService)
Parameters:
jmxService - the jmxService to set

setLogConfigFileName

public void setLogConfigFileName(String logConfigFileName)
Parameters:
logConfigFileName - file name for the log configuration.

setServerConfigFileName

public void setServerConfigFileName(String serverConfigFileName)


Copyright © 2010 OW2 Consortium. All Rights Reserved.