Package com.sun.enterprise.v3.services.impl

Examples of com.sun.enterprise.v3.services.impl.GrizzlyService


    @Override
    public void destroy() {
        JmsService jmsService = getJmsService();
        if (connectorRuntime.isServer() && grizzlyListenerInit && jmsService != null
                && EMBEDDED.equalsIgnoreCase(jmsService.getType())) {
            GrizzlyService grizzlyService = null;
            try {
                grizzlyService = Globals.get(GrizzlyService.class);
            } catch (RunLevelException rle) {
                // if GrizzlyService was shut down already, skip removing the proxy.
            }
            if (grizzlyService != null)
                grizzlyService.removeNetworkProxy(JMS_SERVICE);
            grizzlyListenerInit = false;
        }
        super.destroy();
    }
View Full Code Here


     * JMS container on first request.
     */ 
    public void initializeLazyListener(JmsService jmsService) {
        if (jmsService != null) {
            if (EMBEDDED.equalsIgnoreCase(jmsService.getType()) && !grizzlyListenerInit) {
                GrizzlyService grizzlyService = Globals.get(GrizzlyService.class);
                if (grizzlyService != null) {
                List<JmsHost> jmsHosts = jmsService.getJmsHost();
                    for (JmsHost oneHost : jmsHosts) {
                        if (Boolean.valueOf(oneHost.getLazyInit())) {
                            String jmsHost = null;
                            if (oneHost.getHost() != null && "localhost".equals(oneHost.getHost())) {
                                jmsHost = "0.0.0.0";
                            } else {
                                jmsHost = oneHost.getHost();
                            }
                            NetworkListener dummy = new DummyNetworkListener();
                            dummy.setPort(oneHost.getPort());
                            dummy.setAddress(jmsHost);
                            dummy.setProtocol("light-weight-listener");
                            dummy.setTransport("tcp");
                            dummy.setName(JMS_SERVICE);
                            grizzlyService.createNetworkProxy(dummy);
                            grizzlyListenerInit = true;
                        }
                    }
                }
            }
View Full Code Here

    public void destroy() {
        try {
            JmsService jmsService = getJmsService();
            if (connectorRuntime.isServer() && grizzlyListenerInit && jmsService != null
                    && EMBEDDED.equalsIgnoreCase(jmsService.getType())) {
                GrizzlyService grizzlyService = null;
                try {
                    grizzlyService = Globals.get(GrizzlyService.class);
                } catch (MultiException rle) {
                    // if GrizzlyService was shut down already, skip removing the proxy.
                }
                if (grizzlyService != null)
                    grizzlyService.removeNetworkProxy(JMS_SERVICE);
                grizzlyListenerInit = false;
            }
        } catch (Throwable th) {
            _logger.log(Level.WARNING, "Error occurs when shutting down JMSRA: " + th.getMessage());
            throw new RuntimeException(th);
View Full Code Here

     * JMS container on first request.
     */ 
    public void initializeLazyListener(JmsService jmsService) {
        if (jmsService != null) {
            if (EMBEDDED.equalsIgnoreCase(jmsService.getType()) && !grizzlyListenerInit) {
                GrizzlyService grizzlyService = Globals.get(GrizzlyService.class);
                if (grizzlyService != null) {
                List<JmsHost> jmsHosts = jmsService.getJmsHost();
                    for (JmsHost oneHost : jmsHosts) {
                        if (Boolean.valueOf(oneHost.getLazyInit())) {
                            String jmsHost = null;
                            if (oneHost.getHost() != null && "localhost".equals(oneHost.getHost())) {
                                jmsHost = "0.0.0.0";
                            } else {
                                jmsHost = oneHost.getHost();
                            }
                            NetworkListener dummy = new DummyNetworkListener();
                            dummy.setPort(oneHost.getPort());
                            dummy.setAddress(jmsHost);
                            dummy.setProtocol("light-weight-listener");
                            dummy.setTransport("tcp");
                            dummy.setName(JMS_SERVICE);
                            grizzlyService.createNetworkProxy(dummy);
                            grizzlyListenerInit = true;
                        }
                    }
                }
            }
View Full Code Here

    @Override
    public void destroy() {
        JmsService jmsService = getJmsService();
        if (connectorRuntime.isServer() && grizzlyListenerInit && jmsService != null
                && EMBEDDED.equalsIgnoreCase(jmsService.getType())) {
            GrizzlyService grizzlyService = null;
            try {
                grizzlyService = Globals.get(GrizzlyService.class);
            } catch (RunLevelException rle) {
                // if GrizzlyService was shut down already, skip removing the proxy.
            }
            if (grizzlyService != null)
                grizzlyService.removeNetworkProxy(JMS_SERVICE);
            grizzlyListenerInit = false;
        }
        super.destroy();
    }
View Full Code Here

     * JMS container on first request.
     */ 
    public void initializeLazyListener(JmsService jmsService) {
        if (jmsService != null) {
            if (EMBEDDED.equalsIgnoreCase(jmsService.getType()) && !grizzlyListenerInit) {
                GrizzlyService grizzlyService = Globals.get(GrizzlyService.class);
                if (grizzlyService != null) {
                List<JmsHost> jmsHosts = jmsService.getJmsHost();
                    for (JmsHost oneHost : jmsHosts) {
                        if (Boolean.valueOf(oneHost.getLazyInit())) {
                            String jmsHost = null;
                            if (oneHost.getHost() != null && "localhost".equals(oneHost.getHost())) {
                                jmsHost = "0.0.0.0";
                            } else {
                                jmsHost = oneHost.getHost();
                            }
                            NetworkListener dummy = new DummyNetworkListener();
                            dummy.setPort(oneHost.getPort());
                            dummy.setAddress(jmsHost);
                            dummy.setProtocol("light-weight-listener");
                            dummy.setTransport("tcp");
                            dummy.setName(JMS_SERVICE);
                            grizzlyService.createNetworkProxy(dummy);
                            grizzlyListenerInit = true;
                        }
                    }
                }
            }
View Full Code Here

    @Override
    public void destroy() {
        JmsService jmsService = getJmsService();
        if (connectorRuntime.isServer() && grizzlyListenerInit && jmsService != null
                && EMBEDDED.equalsIgnoreCase(jmsService.getType())) {
            GrizzlyService grizzlyService = null;
            try {
                grizzlyService = Globals.get(GrizzlyService.class);
            } catch (RunLevelException rle) {
                // if GrizzlyService was shut down already, skip removing the proxy.
            }
            if (grizzlyService != null)
                grizzlyService.removeNetworkProxy(JMS_SERVICE);
            grizzlyListenerInit = false;
        }
        super.destroy();
    }
View Full Code Here

     * JMS container on first request.
     */ 
    public void initializeLazyListener(JmsService jmsService) {
        if (jmsService != null) {
            if (EMBEDDED.equalsIgnoreCase(jmsService.getType()) && !grizzlyListenerInit) {
                GrizzlyService grizzlyService = Globals.get(GrizzlyService.class);
                if (grizzlyService != null) {
                List<JmsHost> jmsHosts = jmsService.getJmsHost();
                    for (JmsHost oneHost : jmsHosts) {
                        if (Boolean.valueOf(oneHost.getLazyInit())) {
                            String jmsHost = null;
                            if (oneHost.getHost() != null && "localhost".equals(oneHost.getHost())) {
                                jmsHost = "0.0.0.0";
                            } else {
                                jmsHost = oneHost.getHost();
                            }
                            NetworkListener dummy = new DummyNetworkListener();
                            dummy.setPort(oneHost.getPort());
                            dummy.setAddress(jmsHost);
                            dummy.setProtocol("light-weight-listener");
                            dummy.setTransport("tcp");
                            dummy.setName(JMS_SERVICE);
                            grizzlyService.createNetworkProxy(dummy);
                            grizzlyListenerInit = true;
                        }
                    }
                }
            }
View Full Code Here

                                      final FilterChainBuilder filterChainBuilder) {

        super.configureTransport(networkListener, transportConfig,
                filterChainBuilder);

        transport.getConnectionMonitoringConfig().addProbes(new ConnectionMonitor(
                grizzlyService.getMonitoring(), name, transport));
    }
View Full Code Here

    @Override
    protected FileCache configureHttpFileCache(org.glassfish.grizzly.config.dom.FileCache cache) {
       
        final FileCache fileCache = super.configureHttpFileCache(cache);
        fileCache.getMonitoringConfig().addProbes(new FileCacheMonitor(
                grizzlyService.getMonitoring(), name, fileCache));
       
        return fileCache;
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.v3.services.impl.GrizzlyService

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.