Package org.apache.geronimo.proxy

Examples of org.apache.geronimo.proxy.ProxyContainer


        ClassLoader cl = JaasLoginServiceMBean.class.getClassLoader();

        // Setup the client side container..
        RequestChannelInterceptor remoteInterceptor = new RequestChannelInterceptor(target, cl);
        ProxyContainer clientContainer = new ProxyContainer(remoteInterceptor);
        return (JaasLoginServiceMBean) clientContainer.createProxy(cl , new Class[]{JaasLoginServiceMBean.class});

    }
View Full Code Here


        LoginServiceMBean loginService = (LoginServiceMBean) MBeanProxyFactory.getProxy(LoginServiceMBean.class,
                kernel.getMBeanServer(),
                JMXUtil.getObjectName("geronimo.security:type=LoginService"));
        Interceptor firstInterceptor = new ReflexiveInterceptor(loginService);
        demarshaller = new DeMarshalingInterceptor(firstInterceptor, getClass().getClassLoader());
        serverContainer = new ProxyContainer(firstInterceptor);

        log.info("Started login service stub");
    }
View Full Code Here

    private Object createProxy(Object target, boolean mockFromRemoteMV ) throws Exception {

        // Setup the server side contianer..
        ReflexiveInterceptor ri = new ReflexiveInterceptor(target);
        DeMarshalingInterceptor demarshaller = new DeMarshalingInterceptor(ri, target.getClass().getClassLoader());
        ProxyContainer serverContainer = new ProxyContainer(demarshaller);
        Long dmiid = InterceptorRegistry.instance.register(demarshaller);

        // Setup the client side container..
        RemoteTransportInterceptor transport = new RemoteTransportInterceptor(URISupport.setFragment(connectURI, ""+dmiid));
        IntraVMRoutingInterceptor localRouter = new IntraVMRoutingInterceptor(ri, dmiid, false);
        InterVMRoutingInterceptor remoteRouter = new InterVMRoutingInterceptor(transport, localRouter);
        if(mockFromRemoteMV) {
            remoteRouter.setTargetVMID("THIS CRAP WILL NOT MATCH THE LOCAL VM ID");
        }
        ProxyContainer clientContainer = new ProxyContainer(remoteRouter);

        return clientContainer.createProxy(target.getClass().getClassLoader(), target.getClass().getInterfaces());
    }
View Full Code Here

    private Object createProxy(Object target) throws Exception {
       
        // Setup the server side contianer..
        ReflexiveInterceptor ri = new ReflexiveInterceptor(target);
        DeMarshalingInterceptor demarshaller = new DeMarshalingInterceptor(ri, target.getClass().getClassLoader());
        ProxyContainer serverContainer = new ProxyContainer(demarshaller);

        // Configure the server side interceptors.
        Long dmiid = InterceptorRegistry.instance.register(demarshaller);
       
        // Setup the client side container..       
        IntraVMRoutingInterceptor localRouter = new IntraVMRoutingInterceptor(ri, dmiid, false);
        ProxyContainer clientContainer = new ProxyContainer(localRouter);
        return clientContainer.createProxy(target.getClass().getClassLoader(), target.getClass().getInterfaces());
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.proxy.ProxyContainer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.