Examples of ClusteringAgent


Examples of org.apache.axis2.clustering.ClusteringAgent

    public void endClusterMaintenance() throws Exception {
        sendToCluster(new EndMaintenanceCommand());
    }

    private void sendToCluster(GroupManagementCommand cmd) throws AxisFault {
        ClusteringAgent clusteringAgent = getClusteringAgent();
        Set<String> groupNames = clusteringAgent.getDomains();
        for (String groupName : groupNames) {
            GroupManagementAgent managementAgent =
                    clusteringAgent.getGroupManagementAgent(groupName);
            managementAgent.send(cmd);
        }
    }
View Full Code Here

Examples of org.apache.axis2.clustering.ClusteringAgent

            managementAgent.send(cmd);
        }
    }

    private GroupManagementAgent getGroupManagementAgent(String groupName) throws AxisFault {
        ClusteringAgent clusteringAgent = getClusteringAgent();
        GroupManagementAgent groupManagementAgent =
                clusteringAgent.getGroupManagementAgent(groupName);
        if (groupManagementAgent == null) {
            handleException("No GroupManagementAgent defined for domain " + groupName);
        }
        return groupManagementAgent;
    }
View Full Code Here

Examples of org.apache.axis2.clustering.ClusteringAgent

    private ClusteringAgent getClusteringAgent() throws AxisFault {
        AxisConfiguration axisConfig =
                MessageContext.getCurrentMessageContext().
                        getConfigurationContext().getAxisConfiguration();
        ClusteringAgent clusterManager = axisConfig.getClusteringAgent();
        if (clusterManager == null) {
            handleException("ClusteringAgent not enabled in axis2.xml file");
        }
        return clusterManager;
    }
View Full Code Here

Examples of org.apache.axis2.clustering.ClusteringAgent

        return clusterManager;
    }

    private NodeManager getNodeManager() throws AxisFault {
        NodeManager nodeManager;
        ClusteringAgent clusteringAgent = getClusteringAgent();
        nodeManager = clusteringAgent.getNodeManager();
        if (nodeManager == null) {
            handleException("Cluster NodeManager not enabled in axis2.xml file");
        }
        return nodeManager;
    }
View Full Code Here

Examples of org.apache.axis2.clustering.ClusteringAgent

     * Initializes the ClusterManager for this ConfigurationContext
     *
     * @throws AxisFault
     */
    public void initCluster() throws AxisFault {
        ClusteringAgent clusteringAgent = axisConfiguration.getClusteringAgent();
        if (clusteringAgent != null) {
            StateManager stateManaget = clusteringAgent.getStateManager();
            if (stateManaget != null) {
                stateManaget.setConfigurationContext(this);
            }
            NodeManager nodeManager = clusteringAgent.getNodeManager();
            if (nodeManager != null) {
                nodeManager.setConfigurationContext(this);
            }
            if (shouldClusterBeInitiated(clusteringAgent)) {
                clusteringAgent.setConfigurationContext(this);
                clusteringAgent.init();
            }
        }
    }
View Full Code Here

Examples of org.apache.axis2.clustering.ClusteringAgent

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

Examples of org.apache.axis2.clustering.ClusteringAgent

        if (configContext == null) {
            configContext = getConfigurationContext();
        }
        if (!started) {

            ClusteringAgent clusteringAgent =
                    configContext.getAxisConfiguration().getClusteringAgent();
            String avoidInit = ClusteringConstants.Parameters.AVOID_INITIATION;
            if (clusteringAgent != null &&
                clusteringAgent.getParameter(avoidInit) != null &&
                ((String) clusteringAgent.getParameter(avoidInit).getValue()).equalsIgnoreCase("true")) {
                clusteringAgent.setConfigurationContext(configContext);
                clusteringAgent.init();
            }

            listenerManager.startSystem(configContext);
            started = true;
        }
View Full Code Here

Examples of org.apache.axis2.clustering.ClusteringAgent

     * Initializes the ClusterManager for this ConfigurationContext
     *
     * @throws AxisFault
     */
    public void initCluster() throws AxisFault {
        ClusteringAgent clusteringAgent = axisConfiguration.getClusteringAgent();
        if (clusteringAgent != null) {
            StateManager stateManaget = clusteringAgent.getStateManager();
            if (stateManaget != null) {
                stateManaget.setConfigurationContext(this);
            }
            NodeManager nodeManager = clusteringAgent.getNodeManager();
            if (nodeManager != null) {
                nodeManager.setConfigurationContext(this);
            }
            if (shouldClusterBeInitiated(clusteringAgent)) {
                clusteringAgent.setConfigurationContext(this);
                clusteringAgent.init();
            }
        }
    }
View Full Code Here

Examples of org.apache.axis2.clustering.ClusteringAgent

            throw new DeploymentException(Messages.getMessage("classAttributeNotFound",
                                                              TAG_CLUSTER));
        }

        String className = classNameAttr.getAttributeValue();
        ClusteringAgent clusteringAgent;
        try {
            Class clazz;
            try {
                clazz = Class.forName(className);
            } catch (ClassNotFoundException e) {
                throw new DeploymentException(Messages.getMessage("clusterImplNotFound",
                                                                  className));
            }
            clusteringAgent = (ClusteringAgent) clazz.newInstance();

            clusteringAgent.setConfigurationContext(configCtx);

            //loading the parameters.
            processParameters(clusterElement.getChildrenWithName(new QName(TAG_PARAMETER)),
                              clusteringAgent,
                              null);
View Full Code Here

Examples of org.apache.axis2.clustering.ClusteringAgent

public class GetStateCommand extends ControlCommand {

    private StateClusteringCommand[] commands;

    public void execute(ConfigurationContext configCtx) throws ClusteringFault {
        ClusteringAgent clusteringAgent = configCtx.getAxisConfiguration().getClusteringAgent();
        if(clusteringAgent == null){
            return;
        }
        StateManager stateManager = clusteringAgent.getStateManager();
        if (stateManager != null) {
            Map excludedPropPatterns = stateManager.getReplicationExcludePatterns();
            List<StateClusteringCommand> cmdList = new ArrayList<StateClusteringCommand>();

            // Add the service group contexts, service contexts & their respective properties
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.