Package org.omg.PortableServer

Examples of org.omg.PortableServer.POA.activate_object_with_id()


        // Create implementation object
        //
        BankImpl bankImpl = new BankImpl(poa);

        byte[] oid = "Bank".getBytes();
        poa.activate_object_with_id(oid, bankImpl);

        org.omg.CORBA.Object ref = poa.create_reference_with_id(oid, BankHelper.id());

        // Register in NameService
        org.omg.CORBA.Object nsObj = orb.resolve_initial_references("NameService");
View Full Code Here


            policies[2] = orb.create_policy(SAS_POLICY_TYPE.value, sasAny);
            POA securePOA = rootPOA.create_POA("SecurePOA", rootPOA.the_POAManager(), policies);
            rootPOA.the_POAManager().activate();

            // create object and write out IOR
            securePOA.activate_object_with_id("SecureObject".getBytes(), this);
            org.omg.CORBA.Object demo = securePOA.servant_to_reference(this);
            PrintWriter pw = new PrintWriter(new FileWriter(args[0]));
            pw.println(orb.object_to_string(demo));
            pw.flush();
            pw.close();
View Full Code Here

            POA securePOA = rootPOA.create_POA("SecurePOA", rootPOA.the_POAManager(), policies);
            rootPOA.the_POAManager().activate();

            // create object and write out IOR
            GssUpServer server = new GssUpServer(orb);
            securePOA.activate_object_with_id("SecureObject".getBytes(), server);
            org.omg.CORBA.Object demo = securePOA.servant_to_reference(server);
            PrintWriter pw = new PrintWriter(new FileWriter(args[0]));
            pw.println(orb.object_to_string(demo));
            pw.flush();
            pw.close();
View Full Code Here

            });
            orbThread.start();

            // create peter and write his IOR
            UP_Client server = new UP_Client();
            securePOA.activate_object_with_id("SecurePeter".getBytes(), server);
            Peter peter = PeterHelper.narrow(rootPOA.servant_to_reference(server));
            org.omg.CORBA.Object demo = securePOA.servant_to_reference(server);
            PrintWriter pw = new PrintWriter(new FileWriter("peter.ior"));
            pw.println(orb.object_to_string(demo));
            pw.flush();
View Full Code Here

        );

        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( orb.object_to_string(obj), orb, loggerMock);

        assertTrue
View Full Code Here

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

            for (int count=0;count<100;count++)
            {
                poa.deactivate_object(id);
                poa.activate_object_with_id(id, soi);
            }
        }
        catch( Exception e )
        {
            fail( "unexpected exception: " + e );
View Full Code Here

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

            for (int count=0;count<100;count++)
            {
                poa.deactivate_object(id);
                poa.activate_object_with_id( id, soi);
           }
        }
        catch( Exception e )
        {
            e.printStackTrace();
View Full Code Here

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

        for (int count=0;count<100;count++)
        {
            poa.deactivate_object(id);
            poa.activate_object_with_id(id, soi);
        }
    }


    /**
 
View Full Code Here

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

        for (int count=0;count<100;count++)
        {
            poa.deactivate_object(id);
            poa.activate_object_with_id( id, soi);
        }
    }


    public void testActivateDeactivate4 () throws Exception
View Full Code Here

        );

        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( orb.object_to_string(obj), orb, loggerMock);

        assertTrue
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.