summaryrefslogtreecommitdiff
path: root/TAO/tests/ORB_init/README
blob: ec8b35f574f6840d3c2fc7e3254da99c8497380c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
$Id$

ORB_init Test
-------------

The ORB_init test simply verifies that the CORBA::ORB_init() call
behaves as defined in the OMG CORBA specification.  Here are the
behaviors it tests:

        1. Multiple ORB_init calls with the same ORBid but in
           different scopes should return the same ORB.

	    {
               CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "my_orb");
            }
            {
	       CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "my_orb");
	    }

           In both scopes, "my_orb" refers to the same ORB.

        2. The ORB must be explicitly destroyed in order to free the
           ORBid "my_orb" for use by another ORB.

	    {
               CORBA::ORB_var orb1 = CORBA::ORB_init (argc, argv, "my_orb");
               orb1->destroy();

               // "my_orb" ORB identifier can now be used to identify
               // another ORB.
	       CORBA::ORB_var orb2 = CORBA::ORB_init (argc, argv, "my_orb");
	    }

        3. CORBA system exceptions should be available even after the
           last ORB is released.

            try
              {
                 CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "my_orb");
                 // Exception is thrown
              }
            catch (CORBA::System_Exception &exc)
              {
                 // Do something with exc.
              }

Simply run the `ORB_init' program with out any argument to begin the
test.  The correct output is:

        The ORB <my_orb> was successfully returned from a second
        call to CORBA::ORB_init() after it was released in
        a previous scope.


        A new ORB with ORBid <my_orb> was successfully returned
        from a second call to CORBA::ORB_init() after the
        first ORB with the same ORBid was destroyed.


        Successfully caught CORBA system exception after the
        last ORB was released with the following repository ID:
          IDL:omg.org/CORBA/OBJECT_NOT_EXIST:1.0
        This exception was expected.  It is safe to ignore it.

        ORB_init test completed successfully.