Search in sources :

Example 6 with AcsJmaciErrTypeEx

use of alma.maciErrType.wrappers.AcsJmaciErrTypeEx in project ACS by ACS-Community.

the class ContainerServicesImpl method getComponentNonSticky.

public org.omg.CORBA.Object getComponentNonSticky(String curl) throws AcsJContainerServicesEx {
    if (curl == null) {
        AcsJBadParameterEx cause = new AcsJBadParameterEx();
        cause.setParameter("curl");
        cause.setParameterValue("null");
        throw new AcsJContainerServicesEx(cause);
    }
    org.omg.CORBA.Object stub = null;
    try {
        stub = m_acsManagerProxy.get_component_non_sticky(getEffectiveClientHandle(), curl);
        m_logger.fine("Non-sticky reference to component '" + curl + "' retrieved successfully.");
        m_usedNonStickyComponentsMap.put(curl, stub);
    } catch (AcsJmaciErrTypeEx ex) {
        String msg = "Failed to retrieve non-sticky reference to component " + curl;
        // only a low-level log because the client component is supposed to log the exception which contains all context data 
        m_logger.log(Level.FINE, msg, ex);
        throw new AcsJContainerServicesEx(ex);
    } catch (Throwable thr) {
        String msg = "Failed to retrieve non-sticky reference to component '" + curl + "' for unexpected reasons.";
        m_logger.log(Level.FINE, msg, thr);
        AcsJContainerServicesEx ex = new AcsJContainerServicesEx(thr);
        ex.setContextInfo(msg);
        throw ex;
    }
    return stub;
}
Also used : AcsJBadParameterEx(alma.ACSErrTypeCommon.wrappers.AcsJBadParameterEx) AcsJmaciErrTypeEx(alma.maciErrType.wrappers.AcsJmaciErrTypeEx) AcsJContainerServicesEx(alma.JavaContainerError.wrappers.AcsJContainerServicesEx)

Aggregations

AcsJContainerServicesEx (alma.JavaContainerError.wrappers.AcsJContainerServicesEx)6 AcsJmaciErrTypeEx (alma.maciErrType.wrappers.AcsJmaciErrTypeEx)6 AcsJBadParameterEx (alma.ACSErrTypeCommon.wrappers.AcsJBadParameterEx)4 ComponentDescriptor (alma.acs.component.ComponentDescriptor)3 ComponentInfo (si.ijs.maci.ComponentInfo)3 NamingContext (org.omg.CosNaming.NamingContext)1