org.apache.axis2.clustering.configuration
Interface ConfigurationManager

All Superinterfaces:
ParameterInclude
All Known Implementing Classes:
DefaultConfigurationManager

public interface ConfigurationManager
extends ParameterInclude

This interface is responsible for handling configuration management. Configuraion changes include

It is not mandatory to have a ConfigurationManager in a node. In which case the cluster may be used only for High Availability through context replication. However, it is difficult to imagine that a cluster will be deployed in production with only context replication but without cluster configuration management.

The implementation of this interface is set by the ClusterBuilder, by reading the "configurationManager" element in the axis2.xml

e.g.


Method Summary
 void applyPolicy(java.lang.String serviceName, java.lang.String policy)
          Apply a policy to a service
 void commit()
          Second phase of the 2-phase commit protocol.
 void exceptionOccurred(java.lang.Throwable throwable)
          To notify other nodes that an Exception occurred, during the processing of a ConfigurationClusteringCommand
 void loadServiceGroups(java.lang.String[] serviceGroupNames)
          Load a set of service groups
 void prepare()
          First phase of the 2-phase commit protocol.
 void reloadConfiguration()
          Reload the entire configuration of an Axis2 Node
 void rollback()
          Rollback whatever was done
 void setConfigurationContext(ConfigurationContext configurationContext)
          Set the system's configuration context.
 void setConfigurationManagerListener(ConfigurationManagerListener listener)
          For registering a configuration event listener.
 void unloadServiceGroups(java.lang.String[] serviceGroupNames)
          Unload a set of service groups
 
Methods inherited from interface org.apache.axis2.description.ParameterInclude
addParameter, deserializeParameters, getParameter, getParameters, isParameterLocked, removeParameter
 

Method Detail

loadServiceGroups

void loadServiceGroups(java.lang.String[] serviceGroupNames)
                       throws ClusteringFault
Load a set of service groups

Parameters:
serviceGroupNames - The set of service groups to be loaded
Throws:
ClusteringFault - If an error occurs while loading service groups

unloadServiceGroups

void unloadServiceGroups(java.lang.String[] serviceGroupNames)
                         throws ClusteringFault
Unload a set of service groups

Parameters:
serviceGroupNames - The set of service groups to be unloaded
Throws:
ClusteringFault - If an error occurs while unloading service groups

applyPolicy

void applyPolicy(java.lang.String serviceName,
                 java.lang.String policy)
                 throws ClusteringFault
Apply a policy to a service

Parameters:
serviceName - The name of the service to which this policy needs to be applied
policy - The serialized policy to be applied to the service
Throws:
ClusteringFault - If an error occurs while applying service policies

reloadConfiguration

void reloadConfiguration()
                         throws ClusteringFault
Reload the entire configuration of an Axis2 Node

Throws:
ClusteringFault - If an error occurs while reinitializing Axis2

prepare

void prepare()
             throws ClusteringFault
First phase of the 2-phase commit protocol. Notifies a node that it needs to prepare to switch to a new configuration.

Throws:
ClusteringFault - If an error occurs while preparing to commit

rollback

void rollback()
              throws ClusteringFault
Rollback whatever was done

Throws:
ClusteringFault - If an error occurs while rolling back a cluster configuration transaction

commit

void commit()
            throws ClusteringFault
Second phase of the 2-phase commit protocol. Notifies a node that it needs to switch to a new configuration.

Throws:
ClusteringFault - If an error occurs while committing a cluster configuration transaction

exceptionOccurred

void exceptionOccurred(java.lang.Throwable throwable)
                       throws ClusteringFault
To notify other nodes that an Exception occurred, during the processing of a ConfigurationClusteringCommand

Parameters:
throwable - The throwable which has to be propogated to other nodes
Throws:
ClusteringFault - If an error occurs while processing the exception message

setConfigurationManagerListener

void setConfigurationManagerListener(ConfigurationManagerListener listener)
For registering a configuration event listener.

Parameters:
listener - The ConfigurationManagerListener instance

setConfigurationContext

void setConfigurationContext(ConfigurationContext configurationContext)
Set the system's configuration context. This will be used by the clustering implementations to get information about the Axis2 environment and to correspond with the Axis2 environment

Parameters:
configurationContext - The configuration context


Copyright © 2007 Apache Web Services Project. All Rights Reserved.