3 This tests the federated fault tolerant naming service use case:
5 To run all tests automatically -
6 execute Perl script run_test.pl
8 Example Perl script execution output:
10 Hello object bound in Naming Service B
11 Root context of NS B bound in Naming Service A under name 'nsB'
14 **** Narrowed root NamingContext
15 **** Resolved #nsB/example/Hello
16 (12960|3069859584) - string returned <Hello there!>
17 INFO: server being killed.
18 INFO: removing <NameService1>
19 INFO: removing <NameService2>
22 To run tests manually -
23 start the 2 redundant pairs of tao_ft_naming (see
24 TAO/orbsvcs/Naming_Service/README for valid options),
25 then run ./server and ./client as shown below:
27 NOTE: if running tests manually, the NameService1 and NameService2 directories
28 must exist before starting the Naming Service and these directories must be
29 cleaned out manually after stopping the Naming Service.
31 1) server connects to Naming Service B (localhost:9932) and attempts to bind
32 context "example" to it.
34 2) server attempts to bind "Hello" object to the newly created context "example".
36 3) server connects to Naming Service A (localhost:9931) and bind
37 Naming Service B as name "nsB".
39 4) server writes out ior file.
41 5) client connects to Naming Service A (localhost:9931) and attempts to resolve
42 "nsB/example/Hello" from the root context.
44 6) client attempts to narrow the Hello object and reports the output of the
45 Hello object's get_string() method.
47 Example (on a Unix system):
49 $tao_ft_naming --primary -ORBListenEndPoints iiop://localhost:9931 \
51 $tao_ft_naming --backup -ORBListenEndPoints iiop://localhost:9933 -c ns1.ior \
52 -g nm1.ior -r NameService1 &
54 $tao_ft_naming --primary -ORBListenEndPoints iiop://localhost:9932 \
56 $tao_ft_naming --backup -ORBListenEndPoints iiop://localhost:9934 -c ns2.ior \
57 -g nm2.ior -r NameService2 &
59 $./server -o test.ior &
61 Hello object bound in Naming Service B
62 Root context of NS B bound in Naming Service A under name 'nsB'
67 **** Narrowed root NamingContext
68 **** Resolved #nsB/example/Hello
69 (10911|3069798144) - string returned <Hello there!>