* null listener, or the application removed the
* ClientSessionListener object from the data service.
*/
ClientSessionListener listener = null;
try {
ManagedObject obj = null;
try {
obj = dataService.getServiceBinding(listenerKey);
} catch (ObjectNotFoundException ignore) {
// listener already removed
}
dataService.removeServiceBinding(listenerKey);
if (obj instanceof ListenerWrapper) {
dataService.removeObject(obj);
listener = ((ListenerWrapper) obj).get();
} else {
listener = (ClientSessionListener) obj;
}
} catch (NameNotBoundException e) {
logger.logThrow(
Level.FINE, e,
"removing ClientSessionListener for session:{0} throws",
this);
}
/*
* Remove event queue and associated binding.
*/
try {
ManagedObject eventQueue =
dataService.getServiceBinding(eventQueueKey);
dataService.removeServiceBinding(eventQueueKey);
dataService.removeObject(eventQueue);
} catch (NameNotBoundException e) {
logger.logThrow(