6 The ORB_init test simply verifies that the CORBA::ORB_init() call
7 behaves as defined in the OMG CORBA specification. Here are the
10 1. Multiple ORB_init calls with the same ORBid but in
11 different scopes should return the same ORB.
14 CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "my_orb");
17 CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "my_orb");
20 In both scopes, "my_orb" refers to the same ORB.
22 2. The ORB must be explicitly destroyed in order to free the
23 ORBid "my_orb" for use by another ORB.
26 CORBA::ORB_var orb1 = CORBA::ORB_init (argc, argv, "my_orb");
29 // "my_orb" ORB identifier can now be used to identify
31 CORBA::ORB_var orb2 = CORBA::ORB_init (argc, argv, "my_orb");
34 3. CORBA system exceptions should be available even after the
39 CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "my_orb");
40 // Exception is thrown
42 catch (CORBA::System_Exception &exc)
44 // Do something with exc.
47 ORB_init also makes a call to CORBA::ORB::string_to_object() to aid in
48 debugging during TAO_Stub destruction (memory leaks, etc).
50 Simply run the `ORB_init' program with out any argument to begin the
51 test. The correct output is:
53 The ORB <mighty_orb> was successfully returned from a second
54 call to CORBA::ORB_init() after it was released in
58 A new ORB with ORBid <mighty_orb> was successfully returned
59 from a second call to CORBA::ORB_init() after the
60 first ORB with the same ORBid was destroyed.
63 Successfully caught CORBA system exception after the
64 last ORB was released with the following repository ID:
65 IDL:omg.org/CORBA/OBJECT_NOT_EXIST:1.0
66 This exception was expected. It is safe to ignore it.
68 ORB_init test completed successfully.