Examples of JMSTransportService


Examples of org.wso2.carbon.transport.jms.JMSTransportService

    public JMSTransportServiceComponent() {
    }

    protected void activate(ComponentContext ctxt) {
        ConfigurationContext configContext;
        JMSTransportService jmsTransport;
        Properties props;
       
        log.debug("******* JMS Transport bundle is activated ******* ");

        try {
            if (contextService != null) {
                // Getting server's configContext instance
                configContext = contextService.getServerConfigContext();
            } else {
                throw new Exception("ConfigurationContext is not found while loading org.wso2.carbon.transport.jms bundle");
            }

            BundleContext bundleCtx = ctxt.getBundleContext();

            // Save the transport configuration in the registry if not already done so
            URL configURL = bundleCtx.getBundle().getResource(TRANSPORT_CONF);
            new TransportPersistenceManager(configContext.getAxisConfiguration()).
                    saveTransportConfiguration(TRANSPORT_NAME, configURL);
            TransportAxis2ConfigurationContextObserver cfgCtxObserver =
                    new TransportAxis2ConfigurationContextObserver(TRANSPORT_NAME, configURL);
            bundleCtx.registerService(Axis2ConfigurationContextObserver.class.getName(),
                                      cfgCtxObserver, null);

            // Instantiate JMSTransportService
            jmsTransport = new JMSTransportService();
            JMSServiceHolder.getInstance().setService(jmsTransport);

            // This should ideally contain properties of JMSTransportService as a collection of
            // key/value pair. Here we do not require to add any elements.
            props = new 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.