Examples of BasicServerImpl


Examples of org.jacorb.test.orb.BasicServerImpl

    {
        POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));

        poa.the_POAManager().activate();

        BasicServerImpl soi = new BasicServerImpl();

        // This will activate it so do deactivate first
        byte []id = poa.servant_to_id( soi );

        for (int count=0;count<100;count++)
View Full Code Here

Examples of org.jacorb.test.orb.BasicServerImpl

        policies[2] = rootPoa.create_servant_retention_policy(
                org.omg.PortableServer.ServantRetentionPolicyValue.RETAIN);

        POA poa = rootPoa.create_POA("system_id", rootPoa.the_POAManager(), policies);

        BasicServerImpl soi = new BasicServerImpl();

        byte [] id = poa.activate_object(soi);

        for (int count=0;count<100;count++)
        {
View Full Code Here

Examples of org.jacorb.test.orb.BasicServerImpl

        {
            POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));

            poa.the_POAManager().activate();

            BasicServerImpl soi = new BasicServerImpl();

            poa.activate_object( soi);
            poa.activate_object( soi);
            fail();
        }
View Full Code Here

Examples of org.jacorb.test.orb.BasicServerImpl

    public void testAccessIFR() throws Exception
    {
        // we're registering a BasicServer in the client ORB/POA here. the client ORB is properly configured
        // so that it knows how to contact the running IR.
        BasicServer server = BasicServerHelper.narrow(getClientRootPOA().servant_to_reference(new BasicServerImpl()));

        InterfaceDef interfaceDef = InterfaceDefHelper.narrow(server._get_interface_def());

        assertNotNull(interfaceDef);
    }
View Full Code Here

Examples of org.jacorb.test.orb.BasicServerImpl

        // The incarnate operation is invoked by the POA whenever the POA receives
        // a request for an object that is not currently active, assuming the POA
        // has the RETAIN and USE_SERVANT_MANAGER policies
        public Servant incarnate(byte[] oid, POA adapter) throws ForwardRequest
        {
            return new BasicServerImpl();
        }
View Full Code Here

Examples of org.jacorb.test.orb.BasicServerImpl

    private BasicServer server;
    private ORB clientORB;

    public void doSetUp() throws Exception
    {
        BasicServerImpl servant = new BasicServerImpl();
        BasicServer tmpServer = BasicServerHelper.narrow(rootPOA.servant_to_reference(servant));

        clientORB = ORB.init(new String[0], null);

        server = BasicServerHelper.narrow(clientORB.string_to_object(orb.object_to_string(tmpServer)));
View Full Code Here

Examples of org.jacorb.test.orb.BasicServerImpl

        );

        poa.the_POAManager().activate();

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        org.omg.CORBA.Object obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior = new ParsedIOR(getORB(), orb.object_to_string(obj));

        assertTrue
View Full Code Here

Examples of org.jacorb.test.orb.BasicServerImpl

        );

        poa.the_POAManager().activate();

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        org.omg.CORBA.Object obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior = new ParsedIOR(getORB(), orb.object_to_string(obj));

        assertTrue
View Full Code Here

Examples of org.jacorb.test.orb.BasicServerImpl

        );

        poa.the_POAManager().activate();

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        org.omg.CORBA.Object obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior = new ParsedIOR( getORB(), orb.object_to_string(obj));


        // Now create number two.
        final ORB orb2 = (org.jacorb.orb.ORB)getAnotherORB(orbProps);

        rootPOA = (POAHelper.narrow( orb2.resolve_initial_references( "RootPOA" )));

        // Create a child POA
        poa = rootPOA.create_POA
        (
                "TestServerPOA",
                rootPOA.the_POAManager(),
                new Policy[]
                           {
                    rootPOA.create_lifespan_policy( LifespanPolicyValue.TRANSIENT),
                    rootPOA.create_id_assignment_policy( IdAssignmentPolicyValue.USER_ID)
                           }
        );

        poa.the_POAManager().activate();

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior2 = new ParsedIOR( orb2, orb2.object_to_string(obj));

        assertTrue
View Full Code Here

Examples of org.jacorb.test.orb.BasicServerImpl

    @Test
    public void testAccessIFR() throws Exception
    {
        // we're registering a BasicServer in the client ORB/POA here. the client ORB is properly configured
        // so that it knows how to contact the running IR.
        BasicServer server = BasicServerHelper.narrow(setup.clientServerSetup.getClientRootPOA().servant_to_reference(new BasicServerImpl()));

        InterfaceDef interfaceDef = InterfaceDefHelper.narrow(server._get_interface_def());

        assertNotNull(interfaceDef);
    }
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.