Package org.wso2.carbon.mediation.initializer.services

Examples of org.wso2.carbon.mediation.initializer.services.SynapseEnvironmentService


    private ComponentContext compCtx;

    protected void activate(ComponentContext compCtx) throws Exception {
        this.compCtx = compCtx;
        try {
            SynapseEnvironmentService synapseEnvService =
                    synapseEnvServices.get(MultitenantConstants.SUPER_TENANT_ID);

            if (synapseEnvService != null) {
                createStatisticsStore(synapseEnvService);

                MediationStatisticsStore store = stores.get(MultitenantConstants.SUPER_TENANT_ID);
                MediationStatisticsService service = new MediationStatisticsServiceImpl(store,
                        MultitenantConstants.SUPER_TENANT_ID,
                        synapseEnvService.getConfigurationContext());

                services.put(MultitenantConstants.SUPER_TENANT_ID, service);

                compCtx.getBundleContext().registerService(
                        MediationStatisticsService.class.getName(),
View Full Code Here


            SynapseRegistrationsService registrationsService) {
        ServiceRegistration synEnvSvcRegistration =
                registrationsService.getSynapseEnvironmentServiceRegistration();
        try {
            if (initialized && compCtx != null) {
                SynapseEnvironmentService synEnvSvc = (SynapseEnvironmentService)
                        compCtx.getBundleContext().getService(
                                synEnvSvcRegistration.getReference());
                createStatisticsStore(synEnvSvc);

                int tenantId = registrationsService.getTenantId();
View Full Code Here

    private boolean activated = false;

    protected void activate(ComponentContext context) {
        try {
            SynapseEnvironmentService synEnvService =
                    ConfigHolder.getInstance().getSynapseEnvironmentService(
                            MultitenantConstants.SUPER_TENANT_ID);

            registerDeployer(ConfigHolder.getInstance().getAxisConfiguration(),
                    synEnvService.getSynapseEnvironment());
            if (log.isDebugEnabled()) {
                log.debug("Sequence Admin bundle is activated ");
            }
            activated = true;
        } catch (Throwable e) {
View Full Code Here

    private boolean activated = false;

    protected void activate(ComponentContext ctxt) {
        try {
            SynapseEnvironmentService synEnvService =
                                                      ConfigHolder.getInstance()
                                                                  .getSynapseEnvironmentService(MultitenantConstants.SUPER_TENANT_ID);

            registerDeployer(ConfigHolder.getInstance().getAxisConfiguration(),
                             synEnvService.getSynapseEnvironment());

            if (ConfigHolder.getInstance().getConfigCtxt() != null) {
              ConfigHolder
                .getInstance()
                .getConfigCtxt()
                .setNonReplicableProperty(
                CreateClusterDomainMessage.CLUSTER_DOMAIN_MANAGER,
                new ClusterDomainManagerImpl());
                log.debug("Setting property Cluster Domain MANAGER ... ");

            }
     
            SynapseEnvironment synapseEnv = synEnvService.getSynapseEnvironment();

            /* Registering Tenant Aware Load Balance Endpoint */

            // get the main sequence mediator
            SequenceMediator mainSequence =
View Full Code Here

    private boolean activated = false;

    protected void activate(ComponentContext ctxt) {
        try {
            SynapseEnvironmentService synEnvService =
                    ConfigHolder.getInstance().getSynapseEnvironmentService(
                            MultitenantConstants.SUPER_TENANT_ID);

            registerDeployer(ConfigHolder.getInstance().getAxisConfiguration(),
                    synEnvService.getSynapseEnvironment());
            if (log.isDebugEnabled()) {
                log.debug("LocalEntry Admin bundle is activated for Super tenant");
            }
            activated = true;
        } catch (Throwable e) {
View Full Code Here

    private boolean initialized = false;

    protected void activate(ComponentContext context) {
        try {
            initialized = true;
            SynapseEnvironmentService synEnvService =
                    ConfigHolder.getInstance().getSynapseEnvironmentService(
                            MultitenantConstants.SUPER_TENANT_ID);
            if (synEnvService != null) {
                AxisConfiguration axisConf = synEnvService.getConfigurationContext().
                        getAxisConfiguration();
               
                try {
                    ProxyObserver proxyObserver = new ProxyObserver(
                            synEnvService.getSynapseEnvironment().getSynapseConfiguration(),
                            ConfigHolder.getInstance().getRegistryService().
                                    getConfigSystemRegistry());

                    ConfigHolder.getInstance().addProxyObserver(
                            MultitenantConstants.SUPER_TENANT_ID, proxyObserver);

                    axisConf.addObservers(proxyObserver);

                    registerDeployer(synEnvService.getConfigurationContext().getAxisConfiguration(),
                            synEnvService.getSynapseEnvironment());
                } catch (ProxyAdminException e) {
                    log.error("Error while initializing the proxy service observer. " +
                            "Proxy admin component may be unstable.", e);
                }
            } else {
View Full Code Here

    private LoadBalancerStatisticsNotifier statisticsNotifier;

    protected void activate(ComponentContext ctxt) {
        try {
            // Register endpoint deployer
            SynapseEnvironmentService synEnvService = LoadBalancerContext.getInstance().getTenantIdSynapseEnvironmentServiceMap()
                    .getSynapseEnvironmentService(MultitenantConstants.SUPER_TENANT_ID);
            registerDeployer(LoadBalancerContext.getInstance().getAxisConfiguration(),
                    synEnvService.getSynapseEnvironment());

            // Configure synapse settings
            LoadBalancerConfiguration configuration = LoadBalancerConfiguration.getInstance();
            SynapseConfigurator.configure(configuration);
View Full Code Here

        }

        public void run() {
            try {
                MessageContext msgCtx = ((Axis2MessageContext) synCtx).getAxis2MessageContext();
                Event<MessageContext> event = new Event(msgCtx);
                subscriptions = subscriptionManager.getMatchingSubscriptions(event);
            } catch (EventException e) {
                handleException("Matching subscriptions fetching error", e);
            }
View Full Code Here

     * @throws EventException event
     */
    private void processGetStatusRequest(MessageContext mc,
                                         ResponseMessageBuilder messageBuilder)
            throws AxisFault, EventException {
        Subscription subscription =
                SubscriptionMessageBuilder.createGetStatusMessage(mc);
        if (log.isDebugEnabled()) {
            log.debug("GetStatus request recived for SynapseSubscription ID : " +
                    subscription.getId());
        }
        subscription = subscriptionManager.getSubscription(subscription.getId());
        if (subscription != null) {
            if (log.isDebugEnabled()) {
                log.debug("Sending GetStatus responce for SynapseSubscription ID : " +
                        subscription.getId());
            }
            //send the responce
            SOAPEnvelope soapEnvelope = messageBuilder.genGetStatusResponse(subscription);
            dispatchResponse(soapEnvelope, EventingConstants.WSE_GET_STATUS_RESPONSE,
                    mc, false);
View Full Code Here


    public SynapseSubscription() {
        this.setId(UIDGenerator.generateURNString());
        this.setDeliveryMode(EventingConstants.WSE_DEFAULT_DELIVERY_MODE);
        SubscriptionData subscriptionData = new SubscriptionData();
        subscriptionData.setProperty(SynapseEventingConstants.STATIC_ENTRY, "false");
        this.setSubscriptionData(subscriptionData);
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.mediation.initializer.services.SynapseEnvironmentService

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.