// TODO: Check if we unregister everything!
// TODO: Protect each call with catch Throwable
// we shut down the resources for the queue and storage events
ServerScope serverScope = requestBroker.getServerScope();
StoragePluginManager storagePluginManager = serverScope.getStoragePluginManager();
StorageEventHandler mapEventHandler = storagePluginManager.getEventHandler(uniqueInstanceName);
if (mapEventHandler != null) {
storagePluginManager.setEventHandler(uniqueInstanceName, null);
mapEventHandler.unRegisterEventHelpers(this);
}
QueuePluginManager queuePluginManager = serverScope.getQueuePluginManager();
StorageEventHandler queueEventHandler = queuePluginManager.getEventHandler(uniqueInstanceName);
if (queueEventHandler != null) {
queueEventHandler.unRegisterEventHelpers(this);
queuePluginManager.setEventHandler(uniqueInstanceName, null);
}
if (this.loggingSet != null)
this.loggingSet = null;