blob: 58b9de1fba46e2e59a0d5f2b228629f9e1053e5e (
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
66
67
68
69
70
|
$Id$
This example shows the use of ORT Template by a simple application.
Scenario:
========
1. There's a server which has a dummy method that adds the two 'in' variables
and return the sum to the client.
2. There is a Gateway which receives the requests on behalf of the
server and redirects to the server. So the client never knows about
the actual server but only the gateway.
3. And, as always we will have a client that invokes the server
method.
Files and Small Description
=====================
Gateway.idl IDL for the Gateway
Gateway_IORInterceptor IORInterceptor for the Gateway.
Gateway_i Implementation of the Gateway which changes the
DSI to DII.
Object_Factory_i Implementation for the
Gateway IDL method. This method
creates a reference which points to the gateway
instead of the server.
gateway_server As the name means, gateway server
implementation.
sum_server.idl idl for the sum_server.
server The main server which is being
gatewayed by the gateway
sum_server_i Implementation of sum_server.idl methods.
client Simple client which invokes the sum_server
method add_variables.
How to run the example
======================
1. First run the IFR_Service.
% $IFR_Service
It generates an ior in if_repo.ior by default.
2. Then, run the tao_ifr passing sum_server.idl as its argument,
% $tao_ifr sum_server.idl
3. Run the gateway server
% ./gateway_server -o gateway_ior -ORBInitRef IFR_Service=file://if_repo.ior
4. Run the actual server.
% ./server -o server_ior -ORBInitRef Gateway_Object_Factory=file://gateway_ior
5. Run the client
% ./client -k file://server_ior
|