use of org.wso2.carbon.apimgt.jms.listener.utils.JMSListenerStartupShutdownListener in project carbon-apimgt by wso2.
the class JMSListenerComponent method activate.
@Activate
protected void activate(ComponentContext context) {
log.debug("Activating component...");
APIManagerConfiguration configuration = ServiceReferenceHolder.getInstance().getAPIMConfiguration();
if (configuration == null) {
log.warn("API Manager Configuration not properly set.");
return;
}
JMSListenerStartupShutdownListener jmsListenerStartupShutdownListener = new JMSListenerStartupShutdownListener();
registration = context.getBundleContext().registerService(ServerStartupObserver.class, jmsListenerStartupShutdownListener, null);
registration = context.getBundleContext().registerService(ServerShutdownHandler.class, jmsListenerStartupShutdownListener, null);
registration = context.getBundleContext().registerService(JMSListenerShutDownService.class, jmsListenerStartupShutdownListener, null);
}
Aggregations