Examples of ORB


Examples of org.omg.CORBA.ORB

    }

    private static ORB getOrb() {
        try {
            Context context = new InitialContext();
            ORB orb = (ORB) context.lookup("java:comp/ORB");
            return orb;
        } catch (Throwable e) {
            throw new org.omg.CORBA.MARSHAL("Could not find ORB in jndi at java:comp/ORB", 0, org.omg.CORBA.CompletionStatus.COMPLETED_YES);
        }
    }
View Full Code Here

Examples of org.omg.CORBA.ORB

    }

    private static ORB getOrb() {
        try {
            Context context = new InitialContext();
            ORB orb = (ORB) context.lookup("java:comp/ORB");
            return orb;
        } catch (Throwable e) {
            throw new org.omg.CORBA.MARSHAL("Could not find ORB in jndi at java:comp/ORB", 0, org.omg.CORBA.CompletionStatus.COMPLETED_YES);
        }
    }
View Full Code Here

Examples of org.omg.CORBA.ORB

    }

    private static ORB getOrb() {
        try {
            Context context = new InitialContext();
            ORB orb = (ORB) context.lookup("java:comp/ORB");
            return orb;
        } catch (Throwable e) {
            throw new org.omg.CORBA.MARSHAL("Could not find ORB in jndi at java:comp/ORB", 0, org.omg.CORBA.CompletionStatus.COMPLETED_YES);
        }
    }
View Full Code Here

Examples of org.omg.CORBA.ORB

    }

    private static ORB getOrb() {
        try {
            Context context = new InitialContext();
            ORB orb = (ORB) context.lookup("java:comp/ORB");
            return orb;
        } catch (Throwable e) {
            throw new org.omg.CORBA.MARSHAL("Could not find ORB in jndi at java:comp/ORB", 0, org.omg.CORBA.CompletionStatus.COMPLETED_YES);
        }
    }
View Full Code Here

Examples of org.omg.CORBA.ORB

    }

    private static ORB getOrb() {
        try {
            Context context = new InitialContext();
            ORB orb = (ORB) context.lookup("java:comp/ORB");
            return orb;
        } catch (Throwable e) {
            throw new org.omg.CORBA.MARSHAL("Could not find ORB in jndi at java:comp/ORB", 0, org.omg.CORBA.CompletionStatus.COMPLETED_YES);
        }
    }
View Full Code Here

Examples of org.omg.CORBA.ORB

            Map<String, String> objStoreBrowserTypes = new HashMap<String, String> ();
               objStoreBrowser = new ObjStoreBrowser();
            objStoreBrowserTypes.put("StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction",
                "com.arjuna.ats.internal.jta.tools.osb.mbean.jta.JTAActionBean");

            final ORB orb = orbInjector.getValue();

            if (orb == null) {
                // No IIOP, stick with JTA mode.
                final com.arjuna.ats.jbossatx.jta.TransactionManagerService service = new com.arjuna.ats.jbossatx.jta.TransactionManagerService();
                service.setJbossXATerminator(xaTerminatorInjector.getValue());
View Full Code Here

Examples of org.omg.CORBA.ORB

  public void testIt()
  {
    java.util.Properties props = System.getProperties();

    int status = 0;
    ORB orb = null;

    //
    // Create ORB
    //
    orb = ORB.init(new String[ 0 ], props);

    POA root = TestUtil.GetRootPOA(orb);

    //
    // Run the test
    //
    run(orb, root);

    if (orb != null)
      orb.destroy();
  }
View Full Code Here

Examples of org.omg.CORBA.ORB

  public static void main(String[] args)
  {
    java.util.Properties props = System.getProperties();

    ORB orb = null;

    //
    // Create ORB
    //
    orb = ORB.init(args, props);

    POA root = TestUtil.GetRootPOA(orb);

    POA poa;
    Policy[] policies;

    POAManager manager = root.the_POAManager();

    //
    // Create POAs
    //
    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 (AdapterAlreadyExists ex)
      {
        throw new RuntimeException(ex);
      }
    catch (InvalidPolicy ex)
      {
        throw new RuntimeException(ex);
      }

    TestLocationForwardActivator_impl activatorImpl =
      new TestLocationForwardActivator_impl();
    org.omg.PortableServer.ServantActivator activator =
      activatorImpl._this(orb);

    try
      {
        poa.set_servant_manager(activator);
      }
    catch (WrongPolicy ex)
      {
        throw new RuntimeException(ex);
      }

    byte[] oid = "test".getBytes();
    org.omg.CORBA.Object obj =
      poa.create_reference_with_id(oid, "IDL:Test:1.0");

    TestLocationForward_impl testImpl = new TestLocationForward_impl(orb);

    activatorImpl.setActivatedServant(testImpl);

    Server_impl serverImpl = new Server_impl(orb, activatorImpl, obj);
    TestLocationForwardServer server = serverImpl._this(orb);

    //
    // Save reference
    //
    String refFile = "Test.ref";
    try
      {
        FileOutputStream file = new FileOutputStream(refFile);
        PrintWriter out = new PrintWriter(file);
        out.println(ior = orb.object_to_string(server));
        out.flush();
        file.close();
      }
    catch (IOException ex)
      {
        throw new RuntimeException(ex);
      }

    //
    // Run implementation
    //
    try
      {
        manager.activate();
      }
    catch (org.omg.PortableServer.POAManagerPackage.AdapterInactive ex)
      {
        throw new RuntimeException(ex);
      }

    orb.run();

    File file = new File(refFile);
    file.delete();

    orb.destroy();
  }
View Full Code Here

Examples of org.omg.CORBA.ORB

  public void testIt()
  {
    java.util.Properties props = System.getProperties();

    ORB orb = null;

    //
    // Create ORB
    //
    orb = ORB.init(new String[ 0 ], props);

    POA root = TestUtil.GetRootPOA(orb);

    //
    // Activate the RootPOA manager
    //
    POAManager rootMgr = root.the_POAManager();
    TEST(rootMgr != null);

    try
      {
        rootMgr.activate();
      }
    catch (org.omg.PortableServer.POAManagerPackage.AdapterInactive ex)
      {
        TEST(false);
      }

    //
    // Run the tests using the root POA
    //
    mTestDeactivateBlocking(orb, root);
    mTestDeactivateThreaded(orb, root);

    if (orb != null)
      orb.destroy();
  }
View Full Code Here

Examples of org.omg.CORBA.ORB

  public void testIt()
  {
    java.util.Properties props = System.getProperties();

    ORB orb = null;

    //
    // Create ORB
    //
    orb = ORB.init(new String[ 0 ], props);

    POA root = TestUtil.GetRootPOA(orb);

    POAManager rootMgr = root.the_POAManager();
    TEST(rootMgr != null);

    try
      {
        rootMgr.activate();
      }
    catch (org.omg.PortableServer.POAManagerPackage.AdapterInactive ex)
      {
        fail(ex);
        throw new RuntimeException(ex);
      }

    uTestDestroyBlocking(orb, root);
    uTestDestroyThreaded(orb, root);

    if (orb != null)
      orb.destroy();
  }
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.