Example usage for com.liferay.portal.kernel.messaging MessageBusUtil removeDestination

List of usage examples for com.liferay.portal.kernel.messaging MessageBusUtil removeDestination

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.messaging MessageBusUtil removeDestination.

Prototype

@Deprecated
public static void removeDestination(String destinationName) 

Source Link

Usage

From source file:com.liferay.alloy.mvc.AlloyPortlet.java

License:Open Source License

@Override
public void destroy() {
    for (BaseAlloyControllerImpl baseAlloyControllerImpl : _alloyControllers.values()) {

        Indexer indexer = baseAlloyControllerImpl.indexer;

        if (indexer != null) {
            IndexerRegistryUtil.unregister(indexer);
        }//  www . jav  a2s  .  c  o m

        MessageListener controllerMessageListener = baseAlloyControllerImpl.controllerMessageListener;

        if (controllerMessageListener != null) {
            MessageBusUtil.removeDestination(baseAlloyControllerImpl.getControllerDestinationName());
        }

        MessageListener schedulerMessageListener = baseAlloyControllerImpl.schedulerMessageListener;

        if (schedulerMessageListener != null) {
            try {
                SchedulerEngineHelperUtil.unschedule(baseAlloyControllerImpl.getSchedulerJobName(),
                        baseAlloyControllerImpl.getMessageListenerGroupName(), StorageType.MEMORY_CLUSTERED);

                MessageBusUtil.removeDestination(baseAlloyControllerImpl.getSchedulerDestinationName());
            } catch (Exception e) {
                _log.error(e, e);
            }
        }
    }
}

From source file:com.liferay.analytics.internal.osgi.AnalyticsServiceActivator.java

License:Open Source License

@Override
public synchronized void stop(BundleContext context) throws Exception {
    MessageBusUtil.removeDestination(DESTINATION_NAME);

    MessageBusUtil.unregisterMessageListener(DESTINATION_NAME, this);

    if (_analyticsEventLocalServiceServiceRegistration != null) {
        _analyticsEventLocalServiceServiceRegistration.unregister();

        _analyticsEventLocalServiceServiceRegistration = null;
    }//from   www.  j  a v  a  2 s.c o  m
}

From source file:com.liferay.anonymoususers.internal.osgi.AnonymousUserServiceActivator.java

License:Open Source License

@Override
public synchronized void stop(BundleContext context) throws Exception {
    MessageBusUtil.removeDestination(DESTINATION_NAME);

    MessageBusUtil.unregisterMessageListener(DESTINATION_NAME, this);

    if (_anonymousUserLocalServiceServiceRegistration != null) {
        _anonymousUserLocalServiceServiceRegistration.unregister();

        _anonymousUserLocalServiceServiceRegistration = null;
    }//from  w  ww.jav a2  s.com
}

From source file:com.liferay.contenttargeting.internal.osgi.ContentTargetingActivator.java

License:Open Source License

@Override
public synchronized void stop(BundleContext context) throws Exception {
    MessageBusUtil.removeDestination(DESTINATION_NAME);

    MessageBusUtil.unregisterMessageListener(DESTINATION_NAME, this);

    if (_campaignLocalServiceServiceRegistration != null) {
        _campaignLocalServiceServiceRegistration.unregister();

        _campaignLocalServiceServiceRegistration = null;
    }/*from w  ww.j a  va 2 s . com*/

    if (_campaignServiceServiceRegistration != null) {
        _campaignServiceServiceRegistration.unregister();

        _campaignServiceServiceRegistration = null;
    }

    if (_ruleInstanceLocalServiceServiceRegistration != null) {
        _ruleInstanceLocalServiceServiceRegistration.unregister();

        _ruleInstanceLocalServiceServiceRegistration = null;
    }

    if (_ruleInstanceServiceServiceRegistration != null) {
        _ruleInstanceServiceServiceRegistration.unregister();

        _ruleInstanceServiceServiceRegistration = null;
    }

    if (_trackingActionInstanceLocalServiceServiceRegistration != null) {
        _trackingActionInstanceLocalServiceServiceRegistration.unregister();

        _trackingActionInstanceLocalServiceServiceRegistration = null;
    }

    if (_trackingActionInstanceServiceServiceRegistration != null) {
        _trackingActionInstanceServiceServiceRegistration.unregister();

        _trackingActionInstanceServiceServiceRegistration = null;
    }

    if (_userSegmentLocalServiceServiceRegistration != null) {
        _userSegmentLocalServiceServiceRegistration.unregister();

        _userSegmentLocalServiceServiceRegistration = null;
    }

    if (_userSegmentServiceServiceRegistration != null) {
        _userSegmentServiceServiceRegistration.unregister();

        _userSegmentServiceServiceRegistration = null;
    }
}

From source file:com.liferay.ipgeocoder.servlet.IPGeocoderServletContextListener.java

License:Open Source License

@Override
protected void doPortalDestroy() {
    _ipGeocoderDestination.unregister(_ipGeocoderMessageListener);

    MessageBusUtil.removeDestination(_ipGeocoderDestination.getName());

    MessageBusUtil.removeDestination(DestinationNames.IP_GEOCODER_RESPONSE);
}

From source file:com.liferay.ruon.servlet.RUONServletContextListener.java

License:Open Source License

public void contextDestroyed(ServletContextEvent event) {
    _ruonDestination.unregister(_ruonMessageListener);

    MessageBusUtil.removeDestination(_ruonDestination.getName());

    MessageBusUtil.removeDestination(DestinationNames.RUON_RESPONSE);
}