Search in sources :

Example 1 with ComponentNotAlreadyActivatedEx

use of alma.maciErrType.ComponentNotAlreadyActivatedEx in project ACS by ACS-Community.

the class ACSRemoteAccess method resolveNamingServiceContext.

private NamingContext resolveNamingServiceContext(si.ijs.maci.Manager manager) {
    listenersDispatcher.publishReport("Resolving Naming Service...");
    org.omg.CORBA.Object nameService = null;
    try {
        nameService = manager.get_service(0, NAME_SERVICE, false);
    } catch (NoPermissionEx e) {
        throw new IllegalStateException("Failed to obtaine NameService from the manager. No permission");
    } catch (CannotGetComponentEx e) {
        throw new IllegalStateException("Failed to obtain NameService from the manager.");
    } catch (ComponentNotAlreadyActivatedEx e) {
        throw new IllegalStateException("Failed to  obtaine NameService from the manager.");
    } catch (ComponentConfigurationNotFoundEx e) {
        throw new IllegalStateException("Failed to  obtaine NameService from the manager.");
    }
    NamingContext namingContext = null;
    try {
        namingContext = org.omg.CosNaming.NamingContextHelper.narrow(nameService);
    } catch (Exception e) {
        listenersDispatcher.publishReport("Exception occurred when narrowing Naming Service Context from the Naming Service.");
        System.out.println("Exception in resloveNamingServiceContext(): " + e);
        return null;
    }
    listenersDispatcher.publishReport("Naming Service resolved.");
    return namingContext;
}
Also used : ComponentConfigurationNotFoundEx(alma.maciErrType.ComponentConfigurationNotFoundEx) CannotGetComponentEx(alma.maciErrType.CannotGetComponentEx) NoPermissionEx(alma.maciErrType.NoPermissionEx) NamingContext(org.omg.CosNaming.NamingContext) ComponentNotAlreadyActivatedEx(alma.maciErrType.ComponentNotAlreadyActivatedEx)

Aggregations

CannotGetComponentEx (alma.maciErrType.CannotGetComponentEx)1 ComponentConfigurationNotFoundEx (alma.maciErrType.ComponentConfigurationNotFoundEx)1 ComponentNotAlreadyActivatedEx (alma.maciErrType.ComponentNotAlreadyActivatedEx)1 NoPermissionEx (alma.maciErrType.NoPermissionEx)1 NamingContext (org.omg.CosNaming.NamingContext)1