use of org.omg.CosNaming.NamingContextExt in project wildfly by wildfly.
the class EjbIIOPService method stop.
@Override
public synchronized void stop(final StopContext context) {
// Get local (in-VM) CORBA naming context
final NamingContextExt corbaContext = corbaNamingContext.getValue();
// Unregister bean home from local CORBA naming context
try {
NameComponent[] name = corbaContext.to_name(this.name);
corbaContext.unbind(name);
} catch (InvalidName invalidName) {
EjbLogger.ROOT_LOGGER.cannotUnregisterEJBHomeFromCobra(invalidName);
} catch (NotFound notFound) {
EjbLogger.ROOT_LOGGER.cannotUnregisterEJBHomeFromCobra(notFound);
} catch (CannotProceed cannotProceed) {
EjbLogger.ROOT_LOGGER.cannotUnregisterEJBHomeFromCobra(cannotProceed);
}
// Deactivate the home servant and the bean servant
try {
homeServantRegistry.unbind(homeServantName(this.name));
} catch (Exception e) {
EjbLogger.ROOT_LOGGER.cannotDeactivateHomeServant(e);
}
try {
beanServantRegistry.unbind(beanServantName(this.name));
} catch (Exception e) {
EjbLogger.ROOT_LOGGER.cannotDeactivateBeanServant(e);
}
if (iri != null) {
// Deactivate the interface repository
iri.shutdown();
}
this.name = null;
}
Aggregations