Package org.apache.geronimo.connector.mock

Examples of org.apache.geronimo.connector.mock.MockAdminObject


    public void testProxy() throws Exception {
        Object proxy = kernel.invoke(selfName, "$getResource");
        assertNotNull(proxy);
        assertTrue(proxy instanceof MockAdminObject);
        MockAdminObject mockAdminObject = ((MockAdminObject) proxy).getSomething();
        assertNotNull(mockAdminObject);
    }
View Full Code Here


        MockAdminObject mockAdminObject = ((MockAdminObject) proxy).getSomething();
        assertNotNull(mockAdminObject);
    }

    public void testSerialization() throws Exception {
        MockAdminObject proxy = (MockAdminObject) kernel.invoke(selfName, "$getResource");
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        oos.writeObject(proxy);
        oos.flush();
        byte[] bytes = baos.toByteArray();
        oos.close();
        ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bytes));
        Object proxy2 = ois.readObject();
        assertNotNull(proxy2);
        assertTrue(proxy instanceof MockAdminObject);
        MockAdminObject mockAdminObject = proxy.getSomething();
        assertNotNull(mockAdminObject);
        kernel.stopGBean(selfName);
        ObjectInputStream ois2 = new ObjectInputStream(new ByteArrayInputStream(bytes));
        MockAdminObject proxy3 = (MockAdminObject) ois2.readObject();
        kernel.startGBean(selfName);
        proxy3.getSomething();

    }
View Full Code Here

    public void testProxy() throws Exception {
        Object proxy = kernel.invoke(selfName, "$getResource");
        assertNotNull(proxy);
        assertTrue(proxy instanceof MockAdminObject);
        MockAdminObject mockAdminObject = ((MockAdminObject) proxy).getSomething();
        assertNotNull(mockAdminObject);
    }
View Full Code Here

        MockAdminObject mockAdminObject = ((MockAdminObject) proxy).getSomething();
        assertNotNull(mockAdminObject);
    }

    public void testSerialization() throws Exception {
        MockAdminObject proxy = (MockAdminObject) kernel.invoke(selfName, "$getResource");
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        oos.writeObject(proxy);
        oos.flush();
        byte[] bytes = baos.toByteArray();
        oos.close();
        ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bytes));
        Object proxy2 = ois.readObject();
        assertNotNull(proxy2);
        assertTrue(proxy instanceof MockAdminObject);
        MockAdminObject mockAdminObject = proxy.getSomething();
        assertNotNull(mockAdminObject);
        kernel.stopGBean(selfName);
        ObjectInputStream ois2 = new ObjectInputStream(new ByteArrayInputStream(bytes));
        MockAdminObject proxy3 = (MockAdminObject) ois2.readObject();
        kernel.startGBean(selfName);
        proxy3.getSomething();

    }
View Full Code Here

    public void testProxy() throws Exception {
        Object proxy = kernel.invoke(selfName, "$getResource");
        assertNotNull(proxy);
        assertTrue(proxy instanceof MockAdminObject);
        MockAdminObject mockAdminObject = ((MockAdminObject) proxy).getSomething();
        assertNotNull(mockAdminObject);
    }
View Full Code Here

        MockAdminObject mockAdminObject = ((MockAdminObject) proxy).getSomething();
        assertNotNull(mockAdminObject);
    }

    public void testSerialization() throws Exception {
        MockAdminObject proxy = (MockAdminObject) kernel.invoke(selfName, "$getResource");
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        oos.writeObject(proxy);
        oos.flush();
        byte[] bytes = baos.toByteArray();
        oos.close();
        ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bytes));
        Object proxy2 = ois.readObject();
        assertNotNull(proxy2);
        assertTrue(proxy instanceof MockAdminObject);
        MockAdminObject mockAdminObject = proxy.getSomething();
        assertNotNull(mockAdminObject);
        kernel.stopGBean(selfName);
        ObjectInputStream ois2 = new ObjectInputStream(new ByteArrayInputStream(bytes));
        MockAdminObject proxy3 = (MockAdminObject) ois2.readObject();
        kernel.startGBean(selfName);
        proxy3.getSomething();

    }
View Full Code Here

    public void testProxy() throws Exception {
        Object proxy = kernel.invoke(selfName, "$getResource");
        assertNotNull(proxy);
        assertTrue(proxy instanceof MockAdminObject);
        MockAdminObject mockAdminObject = ((MockAdminObject) proxy).getSomething();
        assertNotNull(mockAdminObject);
//        kernel.stopGBean(selfName);
//        try {
//            ((MockAdminObject) proxy).getSomething();
//            fail();
View Full Code Here

//        kernel.startGBean(selfName);
//        ((MockAdminObject) proxy).getSomething();
    }

    public void testSerialization() throws Exception {
        MockAdminObject proxy = (MockAdminObject) kernel.invoke(selfName, "$getResource");
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        oos.writeObject(proxy);
        oos.flush();
        byte[] bytes = baos.toByteArray();
        oos.close();
        ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bytes));
        Object proxy2 = ois.readObject();
        assertNotNull(proxy2);
        assertTrue(proxy instanceof MockAdminObject);
        MockAdminObject mockAdminObject = proxy.getSomething();
        assertNotNull(mockAdminObject);
        kernel.stopGBean(selfName);
        ObjectInputStream ois2 = new ObjectInputStream(new ByteArrayInputStream(bytes));
        MockAdminObject proxy3 = (MockAdminObject) ois2.readObject();
//        try {
//            proxy3.getSomething();
//            fail();
//        } catch (IllegalStateException ise) {
//        }
        kernel.startGBean(selfName);
        proxy3.getSomething();

    }
View Full Code Here

    public void testProxy() throws Exception {
        Object proxy = kernel.invoke(selfName, "$getResource");
        assertNotNull(proxy);
        assertTrue(proxy instanceof MockAdminObject);
        MockAdminObject mockAdminObject = ((MockAdminObject) proxy).getSomething();
        assertNotNull(mockAdminObject);
    }
View Full Code Here

        MockAdminObject mockAdminObject = ((MockAdminObject) proxy).getSomething();
        assertNotNull(mockAdminObject);
    }

    public void testSerialization() throws Exception {
        MockAdminObject proxy = (MockAdminObject) kernel.invoke(selfName, "$getResource");
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        oos.writeObject(proxy);
        oos.flush();
        byte[] bytes = baos.toByteArray();
        oos.close();
        ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bytes));
        Object proxy2 = ois.readObject();
        assertNotNull(proxy2);
        assertTrue(proxy instanceof MockAdminObject);
        MockAdminObject mockAdminObject = proxy.getSomething();
        assertNotNull(mockAdminObject);
        kernel.stopGBean(selfName);
        ObjectInputStream ois2 = new ObjectInputStream(new ByteArrayInputStream(bytes));
        MockAdminObject proxy3 = (MockAdminObject) ois2.readObject();
        kernel.startGBean(selfName);
        proxy3.getSomething();

    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.connector.mock.MockAdminObject

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.