Search in sources :

Example 1 with IORInterceptor

use of org.omg.PortableInterceptor.IORInterceptor in project Payara by payara.

the class SecurityIIOPInterceptorFactory method createServerRequestInterceptor.

@Override
public ServerRequestInterceptor createServerRequestInterceptor(ORBInitInfo info, Codec codec) {
    ServerRequestInterceptor ret = null;
    try {
        if (!penv.getProcessType().isServer()) {
            return null;
        }
        if (altSecFactory != null || (interceptorFactory != null && createAlternateSecurityInterceptorFactory())) {
            ret = altSecFactory.getServerRequestInterceptor(codec);
        } else {
            ret = getServerInterceptorInstance(codec);
        }
        // also register the IOR Interceptor here
        if (info instanceof com.sun.corba.ee.spi.legacy.interceptor.ORBInitInfoExt) {
            com.sun.corba.ee.spi.legacy.interceptor.ORBInitInfoExt infoExt = (com.sun.corba.ee.spi.legacy.interceptor.ORBInitInfoExt) info;
            IORInterceptor secIOR = getSecIORInterceptorInstance(codec, infoExt.getORB());
            info.add_ior_interceptor(secIOR);
        }
    } catch (DuplicateName ex) {
        _logger.log(Level.SEVERE, null, ex);
        throw new RuntimeException(ex);
    }
    return ret;
}
Also used : DuplicateName(org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName) ServerRequestInterceptor(org.omg.PortableInterceptor.ServerRequestInterceptor) IORInterceptor(org.omg.PortableInterceptor.IORInterceptor)

Aggregations

IORInterceptor (org.omg.PortableInterceptor.IORInterceptor)1 DuplicateName (org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName)1 ServerRequestInterceptor (org.omg.PortableInterceptor.ServerRequestInterceptor)1