Examples of BasicServer


Examples of org.jacorb.test.BasicServer

        props.put("jacorb.connection.client.max_receptor_threads", "1");

        ORB orb = newORB(props);

        BasicServer server1 = BasicServerHelper.narrow(orb.string_to_object(server1IOR));
        assertEquals(10, server1.bounce_long(10));

        BasicServer server2 = BasicServerHelper.narrow(orb.string_to_object(server2IOR));

        try
        {
            server2.bounce_long(10);
            fail();
        }
        catch (NO_RESOURCES e)
        {
            // expected
View Full Code Here

Examples of org.jacorb.test.BasicServer

        props.put("jacorb.connection.client.max_receptor_threads", "1");

        ORB orb = newORB(props);

        BasicServer server1 = BasicServerHelper.narrow(orb.string_to_object(server1IOR));
        assertEquals(10, server1.bounce_long(10));
        server1._release();

        // give the ConsumerReceptorThread some time to finish its work
        Thread.sleep(1000);

        BasicServer server2 = BasicServerHelper.narrow(orb.string_to_object(server2IOR));
        assertEquals(10, server2.bounce_long(10));
        server2._release();
    }
View Full Code Here

Examples of org.jacorb.test.BasicServer

        props.put("jacorb.connection.client.max_receptor_threads", "1");

        ORB orb = newORB(props);

        BasicServer server1 = BasicServerHelper.narrow(orb.string_to_object(server1IOR));
        assertEquals(10, server1.bounce_long(10));

        BasicServer server2 = BasicServerHelper.narrow(orb.string_to_object(server2IOR));

        try
        {
            server2.bounce_long(10);
            fail("should fail as there may not be more than 1 ClientReceptorThreads");
        }
        catch (NO_RESOURCES e)
        {
            // expected
        }

        server1._release();

        // give the ConsumerReceptorThread some time to finish its work
        Thread.sleep(1000);

        // retry bind
        assertEquals(10, server2.bounce_long(10));
    }
View Full Code Here

Examples of org.jacorb.test.BasicServer

        props.put("jacorb.connection.client.max_receptor_threads", "1");
        props.put("jacorb.connection.client.max_idle_receptor_threads", "0");

        ORB orb = newORB(props);

        BasicServer server1 = BasicServerHelper.narrow(orb.string_to_object(server1IOR));
        assertEquals(10, server1.bounce_long(10));

        final String threadName = "ClientMessageReceptor";
        assertTrue(isThereAThreadNamed(threadName));

        server1._release();

        int retry = 0;
        final int maxRetry = 30;

        while( (retry++ < maxRetry) && isThereAThreadNamed(threadName))
View Full Code Here

Examples of org.jacorb.test.BasicServer

        POA system = root.create_POA("system_id_deactivate_2", root.the_POAManager(), policies);
        system.the_POAManager().activate();
        system.set_servant_manager(new PoaServantActivator());
       
        org.omg.CORBA.Object objectRef = system.create_reference(BasicServerHelper.id());
        BasicServer ref = BasicServerHelper.narrow(objectRef);
        // Local op; will incarnate the object.
        ref.ping();
       
        // Now try deactivating it.
        system.deactivate_object (system.reference_to_id(ref));
    }
View Full Code Here

Examples of org.jacorb.test.BasicServer

    }

    private void testORB() throws InvalidName
    {
        ORB orb = newORB(args);
        BasicServer server = BasicServerHelper.narrow(orb.resolve_initial_references("BasicServer"));
        assertFalse(server.bounce_boolean(false));
    }
View Full Code Here

Examples of org.jacorb.test.BasicServer

        return setup;
    }

    public void testConnectClient() throws Exception
    {
        final BasicServer server = BasicServerHelper.narrow(setup.getServerObject());
        final Exception[] exception = new Exception[1];
        final boolean[] success = new boolean[1];
        final int timeout = 60000;

        Runnable pingCommand = new Runnable()
        {
            public void run()
            {
                try
                {
                    server.ping();
                    success[0] = true;
                }
                catch (Exception e)
                {
                    exception[0] = e;
View Full Code Here

Examples of org.jacorb.test.BasicServer

        BasicServerImpl servant = new BasicServerImpl();

        rootPOA.activate_object(servant);

        BasicServer server = BasicServerHelper.narrow(rootPOA.servant_to_reference(servant));

        assertEquals(42, server.bounce_long(42));

        rootPOA.deactivate_object(rootPOA.servant_to_id(servant));

        Thread.sleep(1000);

        try
        {
            server.bounce_long(43);
            fail();
        }
        catch (OBJECT_NOT_EXIST e)
        {
            // expected
View Full Code Here

Examples of org.jacorb.test.BasicServer

        props.put("jacorb.connection.client.max_receptor_threads", "1");

        ORB orb = newORB(props);

        BasicServer server1 = BasicServerHelper.narrow(orb.string_to_object(server1IOR));
        assertEquals(10, server1.bounce_long(10));

        BasicServer server2 = BasicServerHelper.narrow(orb.string_to_object(server2IOR));

        try
        {
            server2.bounce_long(10);
            fail();
        }
        catch (NO_RESOURCES e)
        {
            // expected
View Full Code Here

Examples of org.jacorb.test.BasicServer

        props.put("jacorb.connection.client.max_receptor_threads", "1");

        ORB orb = newORB(props);

        BasicServer server1 = BasicServerHelper.narrow(orb.string_to_object(server1IOR));
        assertEquals(10, server1.bounce_long(10));
        server1._release();

        // give the ConsumerReceptorThread some time to finish its work
        Thread.sleep(1000);

        BasicServer server2 = BasicServerHelper.narrow(orb.string_to_object(server2IOR));
        assertEquals(10, server2.bounce_long(10));
        server2._release();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.