Package org.apache.axis2.cluster.context

Examples of org.apache.axis2.cluster.context.ContextManager


                    applicationSessionServiceGroupContextTable
                            .put(serviceGroupName, serviceGroupContext);

                    ClusterManager clusterManager = this.getAxisConfiguration().getClusterManager();
                    if (clusterManager != null) {
                        ContextManager contextManager = clusterManager.getContextManager();
                        if (contextManager != null) {
                            contextManager.addContext(serviceGroupContext);
                        }
                    }
                }
                messageContext.setServiceGroupContext(serviceGroupContext);
                messageContext.setServiceContext(ContextFactory.createServiceContext(
                        serviceGroupContext, axisService));
            } else if (Constants.SCOPE_SOAP_SESSION.equals(scope)) {
                String serviceGroupContextId = messageContext.getServiceGroupContextId();
                if (serviceGroupContextId != null) {
                    serviceGroupContext = getServiceGroupContextFromSoapSessionTable(
                            serviceGroupContextId, messageContext);
                    if (serviceGroupContext == null) {
                        throw new AxisFault("Unable to find corresponding context" +
                                            " for the serviceGroupId: " + serviceGroupContextId);
                    }
                } else {
                    AxisServiceGroup axisServiceGroup = (AxisServiceGroup) axisService.getParent();
                    serviceGroupContext =
                            ContextFactory.createServiceGroupContext(this, axisServiceGroup);
                    serviceContext =
                            ContextFactory.createServiceContext(serviceGroupContext, axisService);
                    // set the serviceGroupContextID
                    serviceGroupContextId = UUIDGenerator.getUUID();
                    serviceGroupContext.setId(serviceGroupContextId);

                    ClusterManager clusterManager = this.getAxisConfiguration().getClusterManager();
                    if (clusterManager != null) {
                        ContextManager contextManager = clusterManager.getContextManager();
                        if (contextManager != null) {
                            contextManager.addContext(serviceGroupContext);
                        }
                    }

                    messageContext.setServiceGroupContextId(serviceGroupContextId);
                    registerServiceGroupContextintoSoapSessionTable(serviceGroupContext);
View Full Code Here


        AxisConfiguration axisConfiguration = configContext.getAxisConfiguration();
        ClusterManager clusterManager = axisConfiguration.getClusterManager();

        //Calling the ClusterManager probably to replicate the updated state of the context.
        if (clusterManager != null) {
          ContextManager contextManager = clusterManager.getContextManager();
          if (contextManager!=null && contextManager.isContextClusterable (this))
            contextManager.updateState(this);
        }

        //Other logic needed for flushing the contexts
    }
View Full Code Here

                }
               
                className = classNameAttr.getAttributeValue();

        clazz = Class.forName(className);
        ContextManager contextManager = (ContextManager) clazz.newInstance();
        clusterManager.setContextManager(contextManager);

        OMElement listenersElement = contextManagerElement.getFirstChildWithName(new QName(
            TAG_LISTENERS));
        if (listenersElement != null) {
          Iterator listenerElemIter = listenersElement.getChildrenWithName(new QName(
              TAG_LISTENER));
          while (listenerElemIter.hasNext()) {
            OMElement listenerElement = (OMElement) listenerElemIter.next();
                classNameAttr = listenerElement.getAttribute(new QName(TAG_CLASS_NAME));
                if (classNameAttr==null) {
                    throw new DeploymentException(Messages.getMessage("classAttributeNotFound", TAG_LISTENER));
                }
               
                className = classNameAttr.getAttributeValue();
            clazz = Class.forName(className);
            System.out.println(className);
            ContextManagerListener listener = (ContextManagerListener) clazz.newInstance();
            contextManager.addContextManagerListener(listener);
          }
        }
      }
           
            axisConfig.setClusterManager(clusterManager);
View Full Code Here

    public void init(SynapseEnvironment synapseEnvironment) {
        ConfigurationContext cc =
                ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext();
        if (!initialized) {
            // The check for clustering environment
            ClusteringAgent clusteringAgent = cc.getAxisConfiguration().getClusteringAgent();
            if (clusteringAgent != null && clusteringAgent.getStateManager() != null) {
                isClusteringEnabled = Boolean.TRUE;
            } else {
                isClusteringEnabled = Boolean.FALSE;
            }
View Full Code Here

        return lbMembershipHandler;
    }

    public void send(MessageContext synCtx) {
        SessionInformation sessionInformation = null;
        Member currentMember = null;
        ConfigurationContext configCtx =
                ((Axis2MessageContext) synCtx).getAxis2MessageContext().getConfigurationContext();
        if (lbMembershipHandler.getConfigurationContext() == null) {
            lbMembershipHandler.setConfigurationContext(configCtx);
        }
View Full Code Here

    }

    //----------------------- default method implementations and common code -----------------------

    public void init(SynapseEnvironment synapseEnvironment) {
        ConfigurationContext cc =
                ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext();
        if (!initialized) {
            // The check for clustering environment
            ClusteringAgent clusteringAgent = cc.getAxisConfiguration().getClusteringAgent();
            if (clusteringAgent != null && clusteringAgent.getStateManager() != null) {
                isClusteringEnabled = Boolean.TRUE;
            } else {
                isClusteringEnabled = Boolean.FALSE;
            }
View Full Code Here

     */
    private AlgorithmContext algorithmContext;

    @Override
    public void init(SynapseEnvironment synapseEnvironment) {
        ConfigurationContext cc =
                ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext();
        if (!initialized) {
            super.init(synapseEnvironment);
            if (algorithmContext == null) {
                algorithmContext = new AlgorithmContext(isClusteringEnabled, cc, getName());
View Full Code Here

    }

    public void send(MessageContext synCtx) {
        SessionInformation sessionInformation = null;
        Member currentMember = null;
        ConfigurationContext configCtx =
                ((Axis2MessageContext) synCtx).getAxis2MessageContext().getConfigurationContext();
        if (lbMembershipHandler.getConfigurationContext() == null) {
            lbMembershipHandler.setConfigurationContext(configCtx);
        }
View Full Code Here

     */
    public static StatisticsCollector getStatisticsCollector(ServerContextInformation contextInfo) {
        if (contextInfo != null && contextInfo.getServerState() == ServerState.INITIALIZED) {
            Object o = contextInfo.getServerContext();
            if (o instanceof ConfigurationContext) {
                ConfigurationContext context = (ConfigurationContext) o;
                SynapseEnvironment environment =
                        (SynapseEnvironment) context.getAxisConfiguration().getParameterValue(
                                SynapseConstants.SYNAPSE_ENV);
                if (environment != null) {
                    return environment.getStatisticsCollector();
                }
            }
View Full Code Here

                    (preserveAddressingProperty != null &&
                            Boolean.parseBoolean(preserveAddressingProperty)));
        }


        ConfigurationContext axisCfgCtx = axisOutMsgCtx.getConfigurationContext();
        AxisConfiguration axisCfg       = axisCfgCtx.getAxisConfiguration();

        AxisService anoymousService =
            AnonymousServiceFactory.getAnonymousService(synapseOutMessageContext.getConfiguration(),
            axisCfg, wsAddressingEnabled, wsRMEnabled, wsSecurityEnabled);
        // mark the anon services created to be used in the client side of synapse as hidden
View Full Code Here

TOP

Related Classes of org.apache.axis2.cluster.context.ContextManager

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.