Package org.apache.axis2.clustering

Examples of org.apache.axis2.clustering.ClusterManager


public class GetStateCommand extends ControlCommand {

    private ContextClusteringCommand[] commands;

    public void execute(ConfigurationContext configCtx) throws ClusteringFault {
        ClusterManager clusterManager = configCtx.getAxisConfiguration().getClusterManager();
        if(clusterManager == null){
            return;
        }
        ContextManager contextManager = clusterManager.getContextManager();
        if (contextManager != null) {
            Map excludedPropPatterns = contextManager.getReplicationExcludePatterns();
            List cmdList = new ArrayList();

            // Add the service group contexts, service contexts & their respective properties
View Full Code Here


     * @param abstractContext
     * @return true - State needs to be replicated
     *         false - otherwise
     */
    private static boolean doReplication(AbstractContext abstractContext) {
        ClusterManager clusterManager =
                abstractContext.getRootContext().getAxisConfiguration().getClusterManager();
        return clusterManager != null &&
               clusterManager.getContextManager() != null;
    }
View Full Code Here

        return clusterManager != null &&
               clusterManager.getContextManager() != null;
    }

    private static void replicateState(AbstractContext abstractContext) throws ClusteringFault {
        ClusterManager clusterManager =
                abstractContext.getRootContext().getAxisConfiguration().getClusterManager();
        if (clusterManager != null) {
            ContextManager contextManager = clusterManager.getContextManager();
            if (contextManager == null) {
                String msg = "Cannot replicate contexts since " +
                             "ContextManager is not specified in the axis2.xml file.";
                throw new ClusteringFault(msg);
            }
View Full Code Here

    }

    private static void replicateState(MessageContext msgContext) throws ClusteringFault {
        ConfigurationContext configurationContext = msgContext.getConfigurationContext();
        AxisConfiguration axisConfiguration = configurationContext.getAxisConfiguration();
        ClusterManager clusterManager = axisConfiguration.getClusterManager();

        if (clusterManager != null) {

            ContextManager contextManager = clusterManager.getContextManager();
            if (contextManager == null) {
                String msg = "Cannot replicate contexts since " +
                             "ContextManager is not specified in the axis2.xml file.";
                throw new ClusteringFault(msg);
            }
View Full Code Here

            cc = axisMC.getConfigurationContext();

            //To ensure check for clustering environment only happens one time
            if ((throttle == null && !isResponse) || (isResponse
                && concurrentAccessController == null)) {
                ClusterManager clusterManager = cc.getAxisConfiguration().getClusterManager();
                if (clusterManager != null &&
                    clusterManager.getContextManager() != null) {
                    isClusteringEnable = true;
                }
            }

            // Throttle only will be created ,if the massage flow is IN
View Full Code Here

public class GetStateCommand extends ControlCommand {

    private ContextClusteringCommand[] commands;

    public void execute(ConfigurationContext configCtx) throws ClusteringFault {
        ClusterManager clusterManager = configCtx.getAxisConfiguration().getClusterManager();
        if(clusterManager == null){
            return;
        }
        ContextManager contextManager = clusterManager.getContextManager();
        if (contextManager != null) {
            Map excludedPropPatterns = contextManager.getReplicationExcludePatterns();
            List<ContextClusteringCommand> cmdList = new ArrayList<ContextClusteringCommand>();

            // Add the service group contexts, service contexts & their respective properties
View Full Code Here

     * Initializes the ClusterManager for this ConfigurationContext
     *
     * @throws AxisFault
     */
    public void initCluster() throws AxisFault {
        ClusterManager clusterManager = axisConfiguration.getClusterManager();
        if (clusterManager != null) {
            ContextManager contextManager = clusterManager.getContextManager();
            if (contextManager != null) {
                contextManager.setConfigurationContext(this);
            }
            ConfigurationManager configManager = clusterManager.getConfigurationManager();
            if (configManager != null) {
                configManager.setConfigurationContext(this);
            }
            if (shouldClusterBeInitiated(clusterManager)) {
                clusterManager.setConfigurationContext(this);
                clusterManager.init();
            }
        }
    }
View Full Code Here

        if (cc == null) {
            return false;
        }
        // Add the property differences only if Context replication is enabled,
        // and there are members in the cluster
        ClusterManager clusterManager = cc.getAxisConfiguration().getClusterManager();
        if (clusterManager == null ||
            clusterManager.getContextManager() == null) {
            return false;
        }
        return true;
    }
View Full Code Here

     * @param abstractContext The context to be subjected to this test
     * @return true - State needs to be replicated
     *         false - otherwise
     */
    private static boolean canReplicate(AbstractContext abstractContext) {
        ClusterManager clusterManager =
                abstractContext.getRootContext().getAxisConfiguration().getClusterManager();
        boolean canReplicate = false;
        if (clusterManager != null && clusterManager.getContextManager() != null) {
            canReplicate =
                    clusterManager.getContextManager().isContextClusterable(abstractContext);
        }
        return canReplicate;
    }
View Full Code Here

     * @param messageContext The MessageContext to be subjected to this test
     * @return true - State needs to be replicated
     *         false - otherwise
     */
    private static boolean canReplicate(MessageContext messageContext) {
        ClusterManager clusterManager =
                messageContext.getRootContext().getAxisConfiguration().getClusterManager();
        return clusterManager != null && clusterManager.getContextManager() != null;
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.clustering.ClusterManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.