Package org.activemq.service

Examples of org.activemq.service.Service


     *
     * @param executor the executor or null if one is not created yet
     */
    public static void stopExecutor(Executor executor) throws InterruptedException, JMSException {
        if (executor instanceof Service) {
            Service service = (Service) executor;
            service.stop();
        }
        else if (executor instanceof PooledExecutor) {
            PooledExecutor pe = (PooledExecutor) executor;
            pe.shutdownAfterProcessingCurrentlyQueuedTasks();
            //pe.shutdownNow();
View Full Code Here


        // TODO we might not need to copy the collections, as maybe the List might not
        // throw concurrent modification exception? Couldn't tell from the docs
        // but I don't think it does

        for (Iterator iter = new ArrayList(networkConnectors).iterator(); iter.hasNext();) {
            Service connector = (Service) iter.next();
            connector.start();
        }

        for (Iterator iter = new ArrayList(transportConnectors).iterator(); iter.hasNext();) {
            Service connector = (Service) iter.next();
            connector.start();
        }

        if (discoveryAgent != null) {
            discoveryAgent.start();
View Full Code Here

                    log.warn("Could not close discovery agent: " + discoveryAgent + " due to: " + e, e);
                }
            }

            for (Iterator iter = new ArrayList(transportConnectors).iterator(); iter.hasNext();) {
                Service connector = (Service) iter.next();
                try {
                    connector.stop();
                }
                catch (JMSException e) {
                    if (firstException == null) {
                        firstException = e;
                    }
                    log.warn("Could not close transport connector: " + connector + " due to: " + e, e);
                }
            }
            transportConnectors.clear();

            for (Iterator iter = new ArrayList(networkConnectors).iterator(); iter.hasNext();) {
                Service connector = (Service) iter.next();
                try {
                    connector.stop();
                }
                catch (JMSException e) {
                    if (firstException == null) {
                        firstException = e;
                    }
View Full Code Here

        // TODO we might not need to copy the collections, as maybe the List might not
        // throw concurrent modification exception? Couldn't tell from the docs
        // but I don't think it does

        for (Iterator iter = new ArrayList(networkConnectors).iterator(); iter.hasNext();) {
            Service connector = (Service) iter.next();
            connector.start();
        }

        for (Iterator iter = new ArrayList(transportConnectors).iterator(); iter.hasNext();) {
            Service connector = (Service) iter.next();
            connector.start();
        }

        if (discoveryAgent != null) {
            discoveryAgent.start();
View Full Code Here

                    log.warn("Could not close discovery agent: " + discoveryAgent + " due to: " + e, e);
                }
            }

            for (Iterator iter = new ArrayList(transportConnectors).iterator(); iter.hasNext();) {
                Service connector = (Service) iter.next();
                try {
                    connector.stop();
                }
                catch (JMSException e) {
                    if (firstException == null) {
                        firstException = e;
                    }
                    log.warn("Could not close transport connector: " + connector + " due to: " + e, e);
                }
            }
            transportConnectors.clear();

            for (Iterator iter = new ArrayList(networkConnectors).iterator(); iter.hasNext();) {
                Service connector = (Service) iter.next();
                try {
                    connector.stop();
                }
                catch (JMSException e) {
                    if (firstException == null) {
                        firstException = e;
                    }
View Full Code Here

     *
     * @param executor the executor or null if one is not created yet
     */
    public static void stopExecutor(Executor executor) throws InterruptedException, JMSException {
        if (executor instanceof Service) {
            Service service = (Service) executor;
            service.stop();
        }
        else if (executor instanceof PooledExecutor) {
            PooledExecutor pe = (PooledExecutor) executor;
            pe.shutdownAfterProcessingCurrentlyQueuedTasks();
            //pe.shutdownNow();
View Full Code Here

        // TODO we might not need to copy the collections, as maybe the List might not
        // throw concurrent modification exception? Couldn't tell from the docs
        // but I don't think it does

        for (Iterator iter = new ArrayList(networkConnectors).iterator(); iter.hasNext();) {
            Service connector = (Service) iter.next();
            connector.start();
        }

        for (Iterator iter = new ArrayList(transportConnectors).iterator(); iter.hasNext();) {
            Service connector = (Service) iter.next();
            connector.start();
        }

        if (discoveryAgent != null) {
            discoveryAgent.start();
View Full Code Here

                    log.warn("Could not close discovery agent: " + discoveryAgent + " due to: " + e, e);
                }
            }

            for (Iterator iter = new ArrayList(transportConnectors).iterator(); iter.hasNext();) {
                Service connector = (Service) iter.next();
                try {
                    connector.stop();
                }
                catch (JMSException e) {
                    if (firstException == null) {
                        firstException = e;
                    }
                    log.warn("Could not close transport connector: " + connector + " due to: " + e, e);
                }
            }
            transportConnectors.clear();

            for (Iterator iter = new ArrayList(networkConnectors).iterator(); iter.hasNext();) {
                Service connector = (Service) iter.next();
                try {
                    connector.stop();
                }
                catch (JMSException e) {
                    if (firstException == null) {
                        firstException = e;
                    }
View Full Code Here

TOP

Related Classes of org.activemq.service.Service

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.