Package org.apache.geronimo.remoting.transport

Examples of org.apache.geronimo.remoting.transport.BytesMarshalledObject$ObjectOutputStreamExt


        TransportLoader bean = (TransportLoader) MBeanProxyFactory.getProxy(TransportLoader.class, kernel.getMBeanServer(), asyncTransport);
        connectURI = bean.getClientConnectURI();

        // simulate remote copy of handle
        MarshalledObject mo = new BytesMarshalledObject(RemoteMBeanServerFactory.create(connectURI.getHost(), connectURI.getPort()));
        remoteProxy = (MBeanServer)mo.get();
    }
View Full Code Here


        ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
       
        // Simulate App2 creating a proxy.
        Thread.currentThread().setContextClassLoader(cl2);
        Object proxy2 = createProxy(object2, true);
        MarshalledObject mo = new BytesMarshalledObject(proxy2);

        // Simulate App1 using the serialized proxy.
        Thread.currentThread().setContextClassLoader(cl1);
        Object proxy1 = mo.get();
        call(proxy1, "setSpouse", new Object[] { object1 });

        Thread.currentThread().setContextClassLoader(oldCL);
    }
View Full Code Here

        Object object2 = class2.newInstance();
        call(object2, "setValue", new Object[] { "foo" });

        // First test to see waht happens if we mock it to be a remote object.
        Object proxy1 = createProxy(object1,true);
        proxy1 = new BytesMarshalledObject(proxy1).get();
        call(proxy1, "setValue", new Object[] { object2 });
        Object rc = call(proxy1, "getValue", new Object[] {
        });
        rc = call(rc, "getValue", new Object[] {
        });
        assertSame(rc, null); // The value was marsalled cause it's remote.

        // Second test to see what happens if we mock it to be a local object.
        proxy1 = createProxy(object1,false);
        proxy1 = new BytesMarshalledObject(proxy1).get();
        call(proxy1, "setValue", new Object[] { object2 });
        rc = call(proxy1, "getValue", new Object[] {
        });
        rc = call(rc, "getValue", new Object[] {
        });
View Full Code Here

        Class class1 = cl1.loadClass(PERSON_CLASS);
        Object object1 = class1.newInstance();

        Object proxy1 = createProxy(object1, true);
        Thread.currentThread().setContextClassLoader(cl2);
        proxy1 = new BytesMarshalledObject(proxy1).get();

        Class class2 = cl2.loadClass(TRANSIENT_CLASS);
        Object object2 = class2.newInstance();
        call(object2, "setValue", new Object[] { "foo" });
View Full Code Here

        ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
       
        // Simulate App2 creating a proxy.
        Thread.currentThread().setContextClassLoader(cl2);
        Object proxy2 = createProxy(object2);
        MarshalledObject mo = new BytesMarshalledObject(proxy2);

        // Simulate App1 using the serialized proxy.   
        Thread.currentThread().setContextClassLoader(cl1);
        Object proxy1 = mo.get();
        call(proxy1, "setSpouse", new Object[] { object1 });
       
        Thread.currentThread().setContextClassLoader(oldCL);
    }
View Full Code Here

        Class class2 = cl1.loadClass(TRANSIENT_CLASS);
        Object object2 = class2.newInstance();
        call(object2, "setValue", new Object[] { "foo" });

        Object proxy1 = createProxy(object1);
        proxy1 = new BytesMarshalledObject(proxy1).get();
        call(proxy1, "setValue", new Object[] { object2 });
        Object rc = call(proxy1, "getValue", new Object[] {
        });
        rc = call(rc, "getValue", new Object[] {
        });
View Full Code Here

        Class class1 = cl1.loadClass(PERSON_CLASS);
        Object object1 = class1.newInstance();

        Object proxy1 = createProxy(object1);
        Thread.currentThread().setContextClassLoader(cl2);
        proxy1 = new BytesMarshalledObject(proxy1).get();

        Class class2 = cl2.loadClass(TRANSIENT_CLASS);
        Object object2 = class2.newInstance();
        call(object2, "setValue", new Object[] { "foo" });
View Full Code Here

    /**
     * @see org.apache.geronimo.remoting.transport.TransportClient#createMarshalledObject()
     */
    public MarshalledObject createMarshalledObject() {
        return new BytesMarshalledObject(Registry.transportContext);
    }
View Full Code Here

    /**
     * @see org.apache.geronimo.remoting.transport.TransportClient#createMarshalledObject()
     */
    public MarshalledObject createMarshalledObject() {
        return new BytesMarshalledObject(Registry.transportContext);
    }
View Full Code Here

        Object object2 = class2.newInstance();

        // Simulate App2 creating a proxy.
        Thread.currentThread().setContextClassLoader(cl2);
        Object proxy2 = createProxy(object2);
        MarshalledObject mo = new BytesMarshalledObject(proxy2);

        // Simulate App1 using the serialized proxy.   
        Thread.currentThread().setContextClassLoader(cl1);
        Object proxy1 = mo.get();
        call(proxy1, "setSpouse", new Object[] { object1 });
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.remoting.transport.BytesMarshalledObject$ObjectOutputStreamExt

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.