org.ow2.jonas.lib.management.reconfig.actuator
Class XMLConfigurationActuator

java.lang.Object
  extended by org.ow2.jonas.lib.management.reconfig.actuator.BaseConfigurationActuator
      extended by org.ow2.jonas.lib.management.reconfig.actuator.XMLConfigurationActuator
All Implemented Interfaces:
IConfigurationActuator

public class XMLConfigurationActuator
extends BaseConfigurationActuator

This class allows for persistent reconfiguration of a JOnAS service or of a JOnAS resource being configured by a .xml file.


Field Summary
 
Fields inherited from class org.ow2.jonas.lib.management.reconfig.actuator.BaseConfigurationActuator
configFileName, lastSequence, logger, name
 
Constructor Summary
XMLConfigurationActuator(String name, String configFileName, String xml)
          Construct an IConfigurationActuator for a JOnAS service or a JOnAS resource
 
Method Summary
 void saveConfig(long sequence)
          Saves the updated configuration
 void updateConfig(String xml, long sequence)
          Updates the configuration file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLConfigurationActuator

public XMLConfigurationActuator(String name,
                                String configFileName,
                                String xml)
Construct an IConfigurationActuator for a JOnAS service or a JOnAS resource

Parameters:
name - Name of the JOnAS service or JOnAS resource to which this object is associated
configFileName - name of the config file
xml - XML content of the file
Method Detail

updateConfig

public void updateConfig(String xml,
                         long sequence)
Updates the configuration file

Parameters:
xml - The new configuration
sequence - the sequence number of management notification producing the update

saveConfig

public void saveConfig(long sequence)
                throws ReconfigException
Saves the updated configuration

Parameters:
sequence - the sequence number of management notification producing the save (in fact store) operation
Throws:
ReconfigException - if the saveConfig could not be done


Copyright © 2010 OW2 Consortium. All Rights Reserved.