private static StateManager getStateManager(AxisConfiguration axisConfiguration) { ClusteringAgent clusteringAgent = axisConfiguration.getClusteringAgent(); if (clusteringAgent != null) { return clusteringAgent.getStateManager(); } return null; }
private static StateManager getStateManager(AxisConfiguration axisConfiguration) { ClusteringAgent clusteringAgent = axisConfiguration.getClusteringAgent(); if (clusteringAgent != null) { return clusteringAgent.getStateManager(); } return null; }
public void setConfigurationContext(ConfigurationContext configCtx) { this.configCtx = configCtx; // The following code does the bridging between Axis2 and Synapse load balancing clusteringAgent = configCtx.getAxisConfiguration().getClusteringAgent(); if(clusteringAgent == null){ String msg = "In order to enable load balancing across an Axis2 cluster, " + "the cluster entry should be enabled in the axis2.xml file"; log.error(msg); throw new SynapseException(msg); } }
public void setConfigurationContext(ConfigurationContext configCtx) { this.configCtx = configCtx; // The following code does the bridging between Axis2 and Synapse load balancing clusteringAgent = configCtx.getAxisConfiguration().getClusteringAgent(); if (clusteringAgent == null) { String msg = "In order to enable load balancing across an Axis2 cluster, " + "the cluster entry should be enabled in the axis2.xml file"; log.error(msg); throw new SynapseException(msg); } }
public void setConfigurationContext(ConfigurationContext configCtx) { this.configCtx = configCtx; // The following code does the bridging between Axis2 and Synapse load balancing clusteringAgent = configCtx.getAxisConfiguration().getClusteringAgent(); if(clusteringAgent == null){ String msg = "In order to enable load balancing across an Axis2 cluster, " + "the cluster entry should be enabled in the axis2.xml file"; log.error(msg); throw new SynapseException(msg); } }
private static ClusteringAgent getClusterManager(AbstractContext abstractContext) { return abstractContext.getRootContext().getAxisConfiguration().getClusteringAgent(); }
private static ClusteringAgent getClusterManager(AbstractContext abstractContext) { return abstractContext.getRootContext().getAxisConfiguration().getClusteringAgent(); }
private static List<Member> getMemberInstances(String domain, String subDomain) { ClusteringAgent clusteringAgent = DataHolder.getServerConfigContext() .getAxisConfiguration().getClusteringAgent(); GroupManagementAgent groupMgtAgent = clusteringAgent.getGroupManagementAgent(domain, subDomain); if (groupMgtAgent == null) { log.warn("Group Management Agent not found for domain : " + domain + ", sub domain : " + subDomain); return null; } List<Member> members = groupMgtAgent.getMembers(); if (members == null || members.isEmpty()) { return null; } return members; }
public static boolean isClusteringEnabled() { ClusteringAgent agent = ServiceReferenceHolder.getInstance().getServerConfigurationContext(). getAxisConfiguration().getClusteringAgent(); if (agent != null) { return true; } return false; }
private static ClusteringAgent getClusteringAgent() throws AxisFault { AxisConfiguration axisConfig = Util.getConfigurationContextService().getServerConfigContext().getAxisConfiguration(); return axisConfig.getClusteringAgent(); }
/** * Check whether the state store in the specified <code>messageContext</code> can be replicated. * Also note that if there are no members, we need not do any replication * * @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) { ClusteringAgent clusteringAgent = messageContext.getRootContext().getAxisConfiguration().getClusteringAgent(); return clusteringAgent != null && clusteringAgent.getStateManager() != null; } }
/** * Check whether the state store in the specified <code>messageContext</code> can be replicated. * Also note that if there are no members, we need not do any replication * * @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) { ClusteringAgent clusteringAgent = messageContext.getRootContext().getAxisConfiguration().getClusteringAgent(); return clusteringAgent != null && clusteringAgent.getStateManager() != null; } }
/** * Check whether clustering is enabled. * * @return boolean returns true if clustering enabled, false otherwise. */ private boolean isClusteringEnabled() { return EntitlementConfigHolder.getInstance().getConfigurationContextService() .getServerConfigContext().getAxisConfiguration().getClusteringAgent() != null; }
private static ClusteringAgent getClusteringAgent() throws AxisFault { AxisConfiguration axisConfig = DataHolder.getInstance().getConfigurationContextService().getServerConfigContext().getAxisConfiguration(); return axisConfig.getClusteringAgent(); }
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; }
/** * creates an empty configuration context. * * @return Returns ConfigurationContext. */ public static ConfigurationContext createEmptyConfigurationContext() throws AxisFault { AxisConfiguration axisConfiguration = new AxisConfiguration(); ConfigurationContext configContext = new ConfigurationContext(axisConfiguration); if (axisConfiguration.getClusteringAgent() != null) { configContext.initCluster(); } setContextPaths(axisConfiguration, configContext); return configContext; }
/** * Check whether clustering is enabled. * * @return boolean returns true if clustering enabled, false otherwise. */ private boolean isClusteringEnabled() { return EntitlementConfigHolder.getInstance().getConfigurationContextService() .getServerConfigContext().getAxisConfiguration().getClusteringAgent() != null; }
/** * creates an empty configuration context. * * @return Returns ConfigurationContext. */ public static ConfigurationContext createEmptyConfigurationContext() throws AxisFault { AxisConfiguration axisConfiguration = new AxisConfiguration(); ConfigurationContext configContext = new ConfigurationContext(axisConfiguration); if (axisConfiguration.getClusteringAgent() != null) { configContext.initCluster(); } setContextPaths(axisConfiguration, configContext); return configContext; }
public CacheInvalidationSubscriber(){ if(CacheInvalidationDataHolder.getConfigContext() != null) { boolean isCoordinator = CacheInvalidationDataHolder.getConfigContext().getAxisConfiguration() .getClusteringAgent().isCoordinator(); if (isCoordinator && !ConfigurationManager.isSubscribed()) { subscribe(); ConfigurationManager.setSubscribed(true); } } }
@Override public void execute() { if(ConfigurationManager.init() && CacheInvalidationDataHolder.getConfigContext() != null) { boolean isCoordinator = CacheInvalidationDataHolder.getConfigContext().getAxisConfiguration() .getClusteringAgent().isCoordinator(); if (isCoordinator && !ConfigurationManager.isSubscribed()) { subscribe(); ConfigurationManager.setSubscribed(true); } if (!isCoordinator && ConfigurationManager.isSubscribed()) { ConfigurationManager.setSubscribed(false); } } }