summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/DevGuideExamples/NamingService/corbaname_Messenger/README
blob: 4486d3b9da459e91e3215075314ba43c316188b2 (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$

DevGuideExamples/NamingService/corbaname_Messenger/README

The example in this directory extends the example in GettingStartedUNIX 
(or GettingStartedVC) to use the Naming_Service
and calling string_to_object instead of calling resolve_initial_references 
to get the NameService object reference and look up the service in the Naming_Service.

This example only differs from the NamingService/Messenger example by a few lines
in the MessengerClient.cpp.  (All other source files should be the same.)
 
How to Run:
-----------
To start the Naming_Service:
----------------------------
$TAO_ROOT/orbsvcs/Naming_Service/Naming_Service &

To start the server:
------------------
./MessengerServer

To start the client:
------------------
./MessengerClient


This MessengerClient will optionally take parameter that is a URL (corbaname:) 
that addresses the Naming_Service and the MessengerServer within it.

The MessengerServer and MessengerClient may also take an -ORBInitRef option
to help qualify the address of the Naming_Service.

Here are some examples:

REM start the name server
cd/d %TAO_ROOT%\orbsvcs\Naming_Service
title NS
Naming_Service -ORBListenEndpoints iiop://localhost:2809 -m 0

REM start the example server
cd/d %EXAMPLES%\NamingService\corbaname_Messenger\Debug
title server
REM use -ORBInitRef with IIOP
MessengerServer -ORBInitRef NameService=iiop://localhost:2809/NameService



REM start the client
cd/d %EXAMPLES%\NamingService\corbaname_Messenger\Debug
title client

REM use a corbaname that does not require -ORBDefaultInitRef 
MessengerClient corbaname:iiop:localhost:2809#example/Messenger

REM defaults to iiop protocol
MessengerClient corbaname::localhost:2809#example/Messenger

REM default protocol (iiop) and default port (2809)
MessengerClient corbaname::localhost#example/Messenger



REM use RIR 
MessengerClient -ORBInitRef NameService=iiop://localhost:2809/NameService corbaname:rir:#example/Messenger