Package com.arjuna.orbportability

Examples of com.arjuna.orbportability.ORB


        return(returnValue);
    }

    public void run(String[] args)
    {
        ORB orbInstance[] = new ORB[NUMBER_OF_ORBOAS];
        RootOA oaInstance[] = new RootOA[NUMBER_OF_ORBOAS];

        for (int count=0;count<NUMBER_OF_ORBOAS;count++)
        {
            logInformation("Creating ORB and OA #"+count);
            orbInstance[count] = ORB.getInstance("orb_"+count);

            oaInstance[count] = RootOA.getRootOA(orbInstance[count]);

            if (!initialiseORBandOA(args,orbInstance[count],oaInstance[count]))
            {
                logInformation("Failed to create ORB and OA #"+count);
                assertFailure();
            }
        }

        if (!ensureAllORBReferencesAreUnique(orbInstance, oaInstance))
        {
            assertFailure();
        }

        logInformation("Retrieving all ORBs and OAs");

        for (int count=0;count<NUMBER_OF_ORBOAS;count++)
        {
            logInformation("Retrieving ORB and OA #"+count);
            ORB orb = ORB.getInstance("orb_"+count);

            if ( orb == null)
            {
                logInformation("Failed to retrieve ORB #"+count);
                assertFailure();
View Full Code Here


  public void run(String[] args)
  {
    try
    {
      /** Create ORB and OA **/
      ORB testORB = ORB.getInstance( ORB_INSTANCE_NAME );
      OA testOA = OA.getRootOA( testORB );

      /** Initialise ORB and OA **/
      testORB.initORB(args, null);
      testOA.initPOA(args);

      /** Create services object **/
      Services testServ = new Services(testORB);

View Full Code Here

    {
        /**
         * Try and find this ORB in the hashmap first if
         * its not there then create one and add it
         */
        ORB orb = (ORB)_orbMap.get(uniqueId);

        if (orb == null)
        {
            orb = new InternalORB(uniqueId);

View Full Code Here

      resultsFile = args[1];
    }

    try
    {
      ORB myORB = ORB.getInstance("Client01");
      RootOA myOA = OA.getRootOA(myORB);

      myORB.initORB(args, null);
      myOA.initOA();

    }
    catch (Exception ex)
    {
View Full Code Here

      logInformation( " Current State : "+ PrettyPrintState( _currentState ) );
    }

    public void run(String[] args)
    {
        ORB orb = ORB.getInstance("main_orb");
        RootOA oa = RootOA.getRootOA(orb);
  try
  {
/*
       * Initialise the ORB and OA
       */
      logInformation("Initialising ORB and OA");

      orb.initORB(args, null);
      oa.initOA();

      _currentState = NONE;
  }
  catch (Exception e)
  {
      logInformation("Initialisation failed: "+e);
      e.printStackTrace();
      assertFailure();
  }

  /**
   * Register pre and post shutdown handlers
   */
  oa.addPreShutdown( new TestPreShutdown( "PreShutdown", this ) );
  oa.addPostShutdown( new TestPostShutdown( "PostShutdown", this ) );

        /*
   * Shutdown ORB and OA
   */
  logInformation("Shutting down ORB and OA");
  oa.destroy();
  orb.shutdown();

  /*
   * Ensure final state is correct
   */
  logInformation("Final state: " + PrettyPrintState(_currentState) );
View Full Code Here

      logInformation( " Current State : "+ PrettyPrintState( _currentState ) );
    }

    public void run(String[] args)
    {
        ORB orb = ORB.getInstance("main_orb");
        RootOA oa = RootOA.getRootOA(orb);

  try
  {
/*
       * Initialise the ORB and OA
       */
      logInformation("Initialising ORB and OA");

      orb.initORB(args, null);
      oa.initOA();

      _currentState = NONE;
  }
  catch (Exception e)
  {
      logInformation("Initialisation failed: "+e);
      e.printStackTrace();
      assertFailure();
  }

  /**
   * Register pre and post shutdown handlers
   */
  orb.addPreShutdown( new TestPreShutdown( "PreShutdown", this ) );
  orb.addPostShutdown( new TestPostShutdown( "PostShutdown", this ) );

/*
   * Shutdown ORB and OA
   */
  logInformation("Shutting down ORB and OA");
  oa.destroy();
  orb.shutdown();

  /*
   * Ensure final state is correct
   */
  logInformation("Final state: " + PrettyPrintState(_currentState) );
View Full Code Here

      logInformation(" Current State: " + getStateText(_currentState));
    }

    public void run(String[] args)
    {
        ORB orb = ORB.getInstance("main_orb");
        RootOA oa = RootOA.getRootOA(orb);

  try
  {
      _currentState = NONE;

      /*
       * Registering attributes with ORB
       */
      orb.addAttribute( new PreTestAttribute( this ) );
      orb.addAttribute( new PostTestAttribute( this ) );

            /*
       * Initialise the ORB and OA
       */
      logInformation("Initialising ORB and OA");

      orb.initORB(args, null);
      oa.initOA();

      if (_currentState == POSTINIT)
        assertSuccess();
      else
        assertFailure();
  }
  catch (Exception e)
  {
      logInformation("Initialisation failed: "+e);
      e.printStackTrace();
      assertFailure();
  }

  oa.destroy();
  orb.shutdown();
    }
View Full Code Here

     */
    public void run(String[] args)
    {
        try
        {
            ORB orb = ORB.getInstance( ORB_NAME );
            OA oa = OA.getRootOA( orb );

            orb.initORB(args, null);
            oa.initOA(args);

            logInformation("          ORBInfo.getOrbName: "+ORBInfo.getOrbName());
            logInformation("  ORBInfo.getOrbMajorVersion: "+ORBInfo.getOrbMajorVersion());
            logInformation("  ORBInfo.getOrbMinorVersion: "+ORBInfo.getOrbMinorVersion());
            logInformation("ORBInfo.getCorbaMajorVersion: "+ORBInfo.getCorbaMajorVersion());
            logInformation("ORBInfo.getCorbaMinorVersion: "+ORBInfo.getCorbaMinorVersion());
            logInformation("     ORBInfo.getOrbEnumValue: "+ORBInfo.getOrbEnumValue());

            oa.destroy();
            orb.destroy();

            assertSuccess();
        }
        catch (Exception e)
        {
View Full Code Here

    testProps.setProperty(PostSetLoader.generateORBPropertyName("com.arjuna.orbportability.orb", ORB_INSTANCE_NAME2),
        "com.hp.mwtests.orbportability.initialisation.postset.SinglePostSetUsingInterface");

    System.setProperties(testProps);

    ORB orb = null;
        ORB orb2 = null;

    try
    {
      orb = ORB.getInstance(ORB_INSTANCE_NAME);
      orb.initORB(args, null);

      orb2 = ORB.getInstance(ORB_INSTANCE_NAME2);

      orb2.setOrb(orb.orb());
    }
    catch (Exception e)
    {
      logInformation("ERROR - "+e);
      e.printStackTrace(System.err);
View Full Code Here

    /**
     * The main test method which must assert either a pass or a fail.
     */
    public void run(String[] args)
    {
        ORB orb = null,
            orb2 = null;
        Properties testProps = System.getProperties();

        testProps.setProperty(PreInitLoader.generateORBPropertyName("com.arjuna.orbportability.orb"),
                        "com.hp.mwtests.orbportability.initialisation.preinit.PreInitialisationUsingInterface");
        testProps.setProperty(PostInitLoader.generateORBPropertyName("com.arjuna.orbportability.orb"),
                        "com.hp.mwtests.orbportability.initialisation.postinit.PostInitialisationUsingInterface");
        testProps.setProperty(PreInitLoader.generateORBPropertyName("com.arjuna.orbportability.orb", ORB_INSTANCE_NAME_2),
                        "com.hp.mwtests.orbportability.initialisation.preinit.PreInitialisationUsingInterface");
        testProps.setProperty(PostInitLoader.generateORBPropertyName("com.arjuna.orbportability.orb", ORB_INSTANCE_NAME_2),
                        "com.hp.mwtests.orbportability.initialisation.postinit.PostInitialisationUsingInterface");

        try
        {
            orb = ORB.getInstance(ORB_INSTANCE_NAME);
            logInformation("Initialising ORB("+ORB_INSTANCE_NAME+")");
            orb.initORB(args, null);

            if ( PreInitialisationUsingInterface.getObject() == orb )
            {
                logInformation("PreInitialisationUsingInterface returned ORB("+ORB_INSTANCE_NAME+")");
                assertSuccess();
            }
            else
            {
                logInformation("PreInitialisationUsingInterface failed to return ORB("+ORB_INSTANCE_NAME+")");
                assertFailure();
            }

            if ( PostInitialisationUsingInterface.getObject() == orb )
            {
                logInformation("PostInitialisationUsingInterface returned ORB("+ORB_INSTANCE_NAME+")");
                assertSuccess();
            }
            else
            {
                logInformation("PostInitialisationUsingInterface failed to return ORB("+ORB_INSTANCE_NAME+")");
                assertFailure();
            }

            orb2 = ORB.getInstance(ORB_INSTANCE_NAME_2);
            logInformation("Initialising ORB("+ORB_INSTANCE_NAME_2+")");
            orb2.initORB(args, null);

            if ( PreInitialisationUsingInterface.getObject() == orb2 )
            {
                logInformation("PreInitialisationUsingInterface returned ORB("+ORB_INSTANCE_NAME_2+")");
                assertSuccess();
            }
            else
            {
                logInformation("PreInitialisationUsingInterface failed to return ORB("+ORB_INSTANCE_NAME_2+")");
                assertFailure();
            }

            if ( PostInitialisationUsingInterface.getObject() == orb2 )
            {
                logInformation("PostInitialisationUsingInterface returned ORB("+ORB_INSTANCE_NAME_2+")");
                assertSuccess();
            }
            else
            {
                logInformation("PostInitialisationUsingInterface failed to return ORB("+ORB_INSTANCE_NAME_2+")");
                assertFailure();
            }
        }
        catch (Exception e)
        {
            logInformation("ERROR - "+e);
            e.printStackTrace(System.err);
            assertFailure();
        }

        try
        {
            orb.destroy();
            orb2.destroy();
        }
        catch (Exception e)
        {
            logInformation("ERROR - "+e);
View Full Code Here

TOP

Related Classes of com.arjuna.orbportability.ORB

Copyright © 2018 www.massapicom. 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.