Examples of activate_object()


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

            Debug.error("Error getting root POA: " + error);
            error.printStackTrace();
        }

        try {
            poa.activate_object(servant);
        } catch (Exception e) {
            Debug.error("Caught exception activating POA object: \n"
                    + e.getMessage());
        }
View Full Code Here

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

            POA bindingPOA = rootPOA.create_POA("BindingPOA", poaManager, policies);
           // CorbaDSIServant servant = new CorbaDSIServant(orb, bindingPOA, this, observer);
            CorbaDSIServant servant = new CorbaDSIServant();
            servant.init(orb, bindingPOA, this, observer);
            byte[] objectId = bindingPOA.activate_object(servant);
            obj = bindingPOA.id_to_reference(objectId);
           
            // Register the object reference so we can support passing references as
            // parameters and return types.  Note that we need the actual endpoint that
            // this object reference has been created on.  This is available through the
View Full Code Here

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

    // Create a SampleImpl and bind it to the POA
    Sample sample = new SampleImpl();
   
    Tie tie = javax.rmi.CORBA.Util.getTie(sample);
   
    byte[] id = poa.activate_object((Servant) tie);
    org.omg.CORBA.Object obj = poa.create_reference_with_id(id, ((Servant)tie)._all_interfaces(poa, id)[0]);
   
    // Write a IOR to a file so the client can obtain a reference to the Sample
    File sampleRef = new File("Sample.ref");
    PrintWriter writer = new PrintWriter(new FileOutputStream(sampleRef));
View Full Code Here

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

    rootPoa.the_POAManager().activate();
    System.out.println("ORB: " + orb.getClass().getName());
   
    // Bind a sample CORBA object
    SampleCorba_impl sampleCorba = new SampleCorba_impl();
    byte [] id = rootPoa.activate_object(sampleCorba);
    org.omg.CORBA.Object sampleCorbaRef = rootPoa.create_reference_with_id(id, sampleCorba._all_interfaces(rootPoa, id)[0]);

    // Get IOR to Sample on server
    BufferedReader reader = new BufferedReader(new FileReader("Sample.ref"));
    String ref = reader.readLine();
View Full Code Here

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

    public void orb(org.omg.CORBA.ORB orb) {
        try {
            POA _poa = POAHelper.narrow(orb
                    .resolve_initial_references("RootPOA"));

            _poa.activate_object(this);
        } catch (org.omg.CORBA.ORBPackage.InvalidName ex) {
            throw new RuntimeException("ORB must have POA support");
        } catch (org.omg.PortableServer.POAPackage.WrongPolicy ex) {
            throw new RuntimeException("wrong policy: " + ex);
        } catch (org.omg.PortableServer.POAPackage.ServantAlreadyActive ex) {
View Full Code Here

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

    // Test: confirm ServantActivator::etherealize is invoked on
    // deactivate
    //
    try
      {
        id1 = ether.activate_object(servant1);
        id2 = ether.activate_object(servant1);
        id3 = ether.activate_object(servant2);
      }
    catch (ServantAlreadyActive ex)
      {
View Full Code Here

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

    // deactivate
    //
    try
      {
        id1 = ether.activate_object(servant1);
        id2 = ether.activate_object(servant1);
        id3 = ether.activate_object(servant2);
      }
    catch (ServantAlreadyActive ex)
      {
        fail(ex);
View Full Code Here

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

    //
    try
      {
        id1 = ether.activate_object(servant1);
        id2 = ether.activate_object(servant1);
        id3 = ether.activate_object(servant2);
      }
    catch (ServantAlreadyActive ex)
      {
        fail(ex);
        throw new RuntimeException(ex);
View Full Code Here

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

    // Create a SampleImpl and bind it to the POA
    Sample sample = new SampleImpl();
   
    Tie tie = javax.rmi.CORBA.Util.getTie(sample);
   
    byte[] id = poa.activate_object((Servant) tie);
    org.omg.CORBA.Object obj = poa.create_reference_with_id(id, ((Servant)tie)._all_interfaces(poa, id)[0]);
   
    // Write a IOR to a file so the client can obtain a reference to the Sample
    File sampleRef = new File("Sample.ref");
    PrintWriter writer = new PrintWriter(new FileOutputStream(sampleRef));
View Full Code Here

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

    rootPoa.the_POAManager().activate();
    System.out.println("ORB: " + orb.getClass().getName());
   
    // Bind a sample CORBA object
    SampleCorba_impl sampleCorba = new SampleCorba_impl();
    byte [] id = rootPoa.activate_object(sampleCorba);
    org.omg.CORBA.Object sampleCorbaRef = rootPoa.create_reference_with_id(id, sampleCorba._all_interfaces(rootPoa, id)[0]);

    // Get IOR to Sample on server
    BufferedReader reader = new BufferedReader(new FileReader("Sample.ref"));
    String ref = reader.readLine();
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.