Package org.apache.activemq.util

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


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


                    if( !sendShutdown.await(10, TimeUnit.SECONDS) ) {
                        LOG.info("Network Could not shutdown in a timely manner");
                    }
                } finally {
                    ServiceStopper ss = new ServiceStopper();
                    ss.stop(remoteBroker);
                    ss.stop(localBroker);
                    // Release the started Latch since another thread could be
                    // stuck waiting for it to start up.
                    startedLatch.countDown();
                    startedLatch.countDown();
View Full Code Here

                        LOG.info("Network Could not shutdown in a timely manner");
                    }
                } finally {
                    ServiceStopper ss = new ServiceStopper();
                    ss.stop(remoteBroker);
                    ss.stop(localBroker);
                    // Release the started Latch since another thread could be
                    // stuck waiting for it to start up.
                    startedLatch.countDown();
                    startedLatch.countDown();
                    localStartedLatch.countDown();
View Full Code Here

            this.scheduler = null;
        }
        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 timing issue with discovery (spinning up a new instance)
        BrokerRegistry.getInstance().unbind(getBrokerName());
        VMTransportFactory.stopped(getBrokerName());
        if (broker != null) {
            stopper.stop(broker);
            broker = null;
        }

        if (jobSchedulerStore != null) {
            jobSchedulerStore.stop();
View Full Code Here

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

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

    }

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

    public void onServiceAdd(DiscoveryEvent event) {
View Full Code Here

    @Override
    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

        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.