Package org.apache.activemq.util

Examples of org.apache.activemq.util.ServiceStopper.stop()


    }

    public void stop() throws Exception {
      ServiceStopper ss = new ServiceStopper();
      ss.stop(discoveryAgent);
      ss.stop(next);
      ss.throwFirstException();
    }

    public void onServiceAdd(DiscoveryEvent event) {
        String url = event.getServiceName();
View Full Code Here


        catch (IOException e) {
            log.debug("Caught exception stopping", e);
        }
        finally {
            ServiceStopper ss = new ServiceStopper();
            ss.stop(localBroker);
            ss.stop(remoteBroker);
            ss.throwFirstException();
        }
    }
View Full Code Here

            log.debug("Caught exception stopping", e);
        }
        finally {
            ServiceStopper ss = new ServiceStopper();
            ss.stop(localBroker);
            ss.stop(remoteBroker);
            ss.throwFirstException();
        }
    }

    protected void serviceRemoteException(IOException error) {
View Full Code Here

    }

    public void stop() throws Exception {
        ServiceStopper ss = new ServiceStopper();
        if (this.server != null) {
            ss.stop(this.server);
        }
        for (Iterator<ProxyConnection> iter = connections.iterator(); iter.hasNext();) {
            LOG.info("Connector stopped: Stopping proxy.");
            ss.stop(iter.next());
        }
View Full Code Here

        if (this.server != null) {
            ss.stop(this.server);
        }
        for (Iterator<ProxyConnection> iter = connections.iterator(); iter.hasNext();) {
            LOG.info("Connector stopped: Stopping proxy.");
            ss.stop(iter.next());
        }
        ss.throwFirstException();
        LOG.info("Proxy Connector " + getName() + " Stopped");
    }
View Full Code Here

        LOG.info("ActiveMQ Message Broker (" + getBrokerName() + ", " + brokerId + ") is shutting down");
        removeShutdownHook();
        ServiceStopper stopper = new ServiceStopper();
        if (services != null) {
            for (Service service : services) {
                stopper.stop(service);
            }
        }
        stopAllConnectors(stopper);
        // remove any VMTransports connected
        // this has to be done after services are stopped,
View Full Code Here

        // this has to be done after services are stopped,
        // to avoid timimg issue with discovery (spinning up a new instance)
        BrokerRegistry.getInstance().unbind(getBrokerName());
        VMTransportFactory.stopped(getBrokerName());
        if (broker != null) {
            stopper.stop(broker);
            broker = null;
        }
       
        if (tempDataStore != null) {
            tempDataStore.stop();
View Full Code Here

       
        if (tempDataStore != null) {
            tempDataStore.stop();
            tempDataStore = null;
        }
        stopper.stop(persistenceAdapter);
        persistenceAdapter = null;
        slave = true;
        if (isUseJmx()) {
            stopper.stop(getManagementContext());
            managementContext = null;
View Full Code Here

        }
        stopper.stop(persistenceAdapter);
        persistenceAdapter = null;
        slave = true;
        if (isUseJmx()) {
            stopper.stop(getManagementContext());
            managementContext = null;
        }
        // Clear SelectorParser cache to free memory
        SelectorParser.clearCache();
        stopped.set(true);
View Full Code Here

        if( !running.compareAndSet(true, false) ) {
            return;
        }
        shuttingDown.set(true);
        ServiceStopper ss = new ServiceStopper();
        ss.stop(localTransport);
        ss.stop(remoteTransport);
        ss.throwFirstException();
    }
   
}
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.