Package org.omg.PortableServer

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


    @Before
    public void setUp() throws Exception
    {
        POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
        server = BasicServerHelper.narrow(poa.servant_to_reference(new BasicServerImpl()));
    }

    @Test
    public void testRuntimeExceptionInClientInterceptorIsPropagated() throws Exception
    {
View Full Code Here


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

         CustomBasicServerImpl server = new CustomBasicServerImpl(orb);
         securePOA.activate_object_with_id("SecureObject".getBytes(), server);
         org.omg.CORBA.Object obj = securePOA.servant_to_reference(server);

         System.out.println ("SERVER IOR: " + orb.object_to_string(obj));
         System.out.flush();

         // wait for requests
View Full Code Here

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

            ServerStartupDaemon ssd =
                ServerStartupDaemonHelper.narrow(poa.servant_to_reference(this));

            HostInfo _me = new HostInfo(InetAddress.getLocalHost().getHostName(),
                                        ssd,
                                        orb.object_to_string(ssd));
View Full Code Here

                                         rootPOA.the_POAManager (),
                                         policies);

        bidir_poa.the_POAManager ().activate ();

        org.omg.CORBA.Object o = bidir_poa.servant_to_reference (new ServerImpl ());
        server = ServerHelper.narrow (o);

        ClientCallback ccb = ClientCallbackHelper.narrow (bidir_poa.servant_to_reference (new Client ()));

        server.register_callback (ccb);
View Full Code Here

        bidir_poa.the_POAManager ().activate ();

        org.omg.CORBA.Object o = bidir_poa.servant_to_reference (new ServerImpl ());
        server = ServerHelper.narrow (o);

        ClientCallback ccb = ClientCallbackHelper.narrow (bidir_poa.servant_to_reference (new Client ()));

        server.register_callback (ccb);

        server.callback_hello ("A test string");
    }
View Full Code Here

        server_orb_ = this.getAnotherORB(null);

        POA rootPOA = POAHelper.narrow(server_orb_.resolve_initial_references("RootPOA"));
        rootPOA.the_POAManager().activate();
        org.omg.CORBA.Object obj = rootPOA.servant_to_reference(new CurrentServerImpl(server_orb_, null));
        String objString = server_orb_.object_to_string(obj);

        new Thread()
        {
            @Override
View Full Code Here

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

        BasicServerImpl server = new BasicServerImpl(orb);
        securePOA.activate_object_with_id("SecureObject".getBytes(), server);
        org.omg.CORBA.Object obj = securePOA.servant_to_reference(server);

        System.out.println ("SERVER IOR: " + orb.object_to_string(obj));
        System.out.flush();

        // wait for requests
View Full Code Here

        SessionFactoryServant sessionFactoryServant =
        new SessionFactoryServant(orb);

        // create the object reference
        org.omg.CORBA.Object sessionFactory =
        rootPOA.servant_to_reference( sessionFactoryServant );

        //register Factory with the naming service
        NamingContextExt nc =
        NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService"));
View Full Code Here

        POA poa = (POA)
        orb.resolve_initial_references( "RootPOA" );

        poa.the_POAManager().activate();

        org.omg.CORBA.Object demo = poa.servant_to_reference( new Server());

        PrintWriter pw = new PrintWriter( new FileWriter( args[ 0 ] ));

        // print stringified object reference to file
        pw.println( orb.object_to_string( demo ));
View Full Code Here

         PrintWriter ps = new PrintWriter(new FileOutputStream(new File( args[0] ) + "persistent"));
         ps.println( orb.object_to_string( objP ) );
         ps.close();

         // Setup second server
         org.omg.CORBA.Object objT = helloPOATransient.servant_to_reference(new GoodDayImpl("SomewhereT"));

         // Use the PrintIOR utility function to extract a transient corbaloc string.
         corbalocStr = PrintIOR.printCorbalocIOR (orb, orb.object_to_string(objT));
         System.out.println("Server 2 can be reached with:");
         System.out.println("   " + corbalocStr + "\n");
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.