Search in sources :

Example 1 with NamingContextExt

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;
}
Also used : NameComponent(org.omg.CosNaming.NameComponent) InvalidName(org.omg.CosNaming.NamingContextPackage.InvalidName) NamingContextExt(org.omg.CosNaming.NamingContextExt) CannotProceed(org.omg.CosNaming.NamingContextPackage.CannotProceed) StartException(org.jboss.msc.service.StartException) NotFound(org.omg.CosNaming.NamingContextPackage.NotFound)

Aggregations

StartException (org.jboss.msc.service.StartException)1 NameComponent (org.omg.CosNaming.NameComponent)1 NamingContextExt (org.omg.CosNaming.NamingContextExt)1 CannotProceed (org.omg.CosNaming.NamingContextPackage.CannotProceed)1 InvalidName (org.omg.CosNaming.NamingContextPackage.InvalidName)1 NotFound (org.omg.CosNaming.NamingContextPackage.NotFound)1