Examples of POAManager


Examples of org.omg.PortableServer.POAManager

    byte[] tmpid;
    Policy[] policies;
    Test_impl servant1;
    Test_impl servant2;

    POAManager manager = root.the_POAManager();

    //
    // Create POA w/ UNIQUE_ID, NO_IMPLICIT_ACTIVATION
    //
    policies = new Policy[ 4 ];
View Full Code Here

Examples of org.omg.PortableServer.POAManager

    Test_impl def;
    Test_impl servant1;
    Test_impl servant2;
    Servant tmpservant;

    POAManager manager = root.the_POAManager();

    //
    // Create POA w/ RETAIN
    //
    policies = new Policy[ 3 ];
View Full Code Here

Examples of org.omg.PortableServer.POAManager

    byte[] tmpid2;
    Policy[] policies;
    Test_impl servant1;
    Test_impl servant2;

    POAManager manager = root.the_POAManager();

    //
    // Create POA w/ UNIQUE_ID, NO_IMPLICIT_ACTIVATION
    //
    policies = new Policy[ 4 ];
View Full Code Here

Examples of org.omg.PortableServer.POAManager

    byte[] tmpid;
    Policy[] policies;
    Test_impl servant1;
    Test_impl servant2;

    POAManager manager = root.the_POAManager();

    //
    // Create POA w/ RETAIN
    //
    policies = new Policy[ 3 ];
View Full Code Here

Examples of org.omg.PortableServer.POAManager

    Test_impl def;
    Test_impl servant1;
    Test_impl servant2;
    Servant tmpservant;

    POAManager manager = root.the_POAManager();

    //
    // Create POA w/ RETAIN
    //
    policies = new Policy[ 3 ];
View Full Code Here

Examples of org.omg.PortableServer.POAManager

    byte[] id1;
    byte[] id2;
    byte[] tmpid;
    Policy[] policies;

    POAManager manager = root.the_POAManager();

    //
    // Create POA
    //
    policies = new Policy[ 3 ];
View Full Code Here

Examples of org.omg.PortableServer.POAManager

    //
    // Create a child POA and run the tests again using the
    // child as the root
    //
    Policy[] policies = new Policy[ 0 ];
    POAManager manager = root.the_POAManager();
    POA child = null;
    try
      {
        child = root.create_POA("child", manager, policies);
      }
View Full Code Here

Examples of org.omg.PortableServer.POAManager

    Policy[] policies;
    Test_impl servant1;
    Test_impl servant2;
    Servant tmpserv;

    POAManager manager = root.the_POAManager();

    try
      {
        manager.activate();
      }
    catch (org.omg.PortableServer.POAManagerPackage.AdapterInactive ex)
      {
        fail(ex);
        throw new RuntimeException(ex);
View Full Code Here

Examples of org.omg.PortableServer.POAManager

  public void setPoaMode(int mode)
  {
    if (target == null)
      throw new BAD_INV_ORDER();

    POAManager manager = target.the_POAManager();

    try
      {
        switch (mode)
          {
            case State._ACTIVE :
              manager.activate();
              break;

            case State._HOLDING :
              manager.hold_requests(false);
              break;

            case State._DISCARDING :
              manager.discard_requests(false);
              break;

            case State._INACTIVE :
              manager.deactivate(false, false);
              break;

            case 100 :
              try
                {
View Full Code Here

Examples of org.omg.PortableServer.POAManager

    POA root = TestUtil.GetRootPOA(orb);

    POA poa;
    Policy[] policies;

    POAManager manager = root.the_POAManager();

    //
    // Create POA
    //
    policies = new Policy[ 4 ];
    policies [ 0 ] =
      root.create_id_assignment_policy(org.omg.PortableServer.IdAssignmentPolicyValue.USER_ID);
    policies [ 1 ] =
      root.create_id_uniqueness_policy(org.omg.PortableServer.IdUniquenessPolicyValue.UNIQUE_ID);
    policies [ 2 ] =
      root.create_servant_retention_policy(org.omg.PortableServer.ServantRetentionPolicyValue.RETAIN);
    policies [ 3 ] =
      root.create_request_processing_policy(org.omg.PortableServer.RequestProcessingPolicyValue.USE_SERVANT_MANAGER);

    try
      {
        poa = root.create_POA("poa", manager, policies);
      }
    catch (InvalidPolicy ex)
      {
        throw new RuntimeException(ex);
      }
    catch (AdapterAlreadyExists ex)
      {
        throw new RuntimeException(ex);
      }

    TestLocationForwardActivator_impl activatorImpl =
      new TestLocationForwardActivator_impl();
    ServantActivator activator = activatorImpl._this(orb);
    try
      {
        poa.set_servant_manager(activator);
      }
    catch (WrongPolicy ex)
      {
        throw new RuntimeException(ex);
      }

    byte[] oid = ("test").getBytes();
    final org.omg.CORBA.Object reference =
      poa.create_reference_with_id(oid, TestLocationForwardHelper.id());

    //"IDL:Test:1.0");
    String impl = null;

    //
    // Read all object references from file
    //
    try
      {
        String refFile = "Test.ref";
        FileInputStream file = new FileInputStream(refFile);
        BufferedReader in = new BufferedReader(new InputStreamReader(file));
        impl = in.readLine();
        file.close();
      }
    catch (IOException ex)
      {
        System.err.println("Can't read from `" + ex.getMessage() + "'");
        System.exit(1);
      }

    org.omg.CORBA.Object obj = orb.string_to_object(impl);
    TestLocationForwardServer server =
      TestLocationForwardServerHelper.narrow(obj);

    if (server == null)
      throw new RuntimeException("Server is null");

    org.omg.CORBA.Object servant = server.get_servant();

    activatorImpl.setForwardRequest(servant);

    TestLocationForward_impl testImpl = new TestLocationForward_impl(orb);
    activatorImpl.setActivatedServant(testImpl);

    try
      {
        manager.activate();
      }
    catch (org.omg.PortableServer.POAManagerPackage.AdapterInactive ex)
      {
        throw new RuntimeException(ex);
      }
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.