summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-29 08:17:36 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-29 08:17:36 +0000
commite1ace7b5128b616bb2242e4b64630670053b55bc (patch)
tree54b68351158c38e8cc0c2152814df9d594c0c2d3
parentf81c8e06e45cfc91fe1012a2c5edd523836f5c9c (diff)
downloadATCD-e1ace7b5128b616bb2242e4b64630670053b55bc.tar.gz
ChangeLogTag:Thu Jul 29 02:51:45 1999 Darrell Brunsch <brunsch@cs.wustl.edu>
-rw-r--r--TAO/ChangeLog-99c23
-rw-r--r--TAO/docs/Options.html4
-rw-r--r--TAO/docs/implrepo/index.html2
-rw-r--r--TAO/docs/implrepo/tao_ir.html8
-rw-r--r--TAO/docs/implrepo/usersguide.html148
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/airplane_server_i.cpp5
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/implrepo.conf3
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/nestea_server_i.cpp5
-rwxr-xr-xTAO/orbsvcs/tests/ImplRepo/run_test.pl24
-rwxr-xr-xTAO/orbsvcs/tests/Time/run_test.pl6
-rw-r--r--TAO/tao/ORB_Core.cpp4
11 files changed, 149 insertions, 83 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c
index 98be2e65651..815827d2a68 100644
--- a/TAO/ChangeLog-99c
+++ b/TAO/ChangeLog-99c
@@ -1,3 +1,26 @@
+Thu Jul 29 02:51:45 1999 Darrell Brunsch <brunsch@cs.wustl.edu>
+
+ * orbsvcs/tests/ImplRepo/implrepo.conf: This file isn't being used
+ anymore.
+
+ * orbsvcs/tests/ImplRepo/airplane_server_i.cpp:
+ * orbsvcs/tests/ImplRepo/nestea_server_i.cpp:
+ POA manager was not being activated so the tests were failing.
+
+ * docs/implrepo/usersguide.html: Updated with new IR information.
+
+ * docs/Options.html:
+ * docs/implrepo/index.html:
+ * docs/implrepo/tao_ir.html:
+ * orbsvcs/tests/ImplRepo/run_test.pl:
+ * orbsvcs/tests/Time/run_test.pl:
+ * tao/ORB_Core.cpp:
+ Changed ORB options -ORBImplRepo[IOR|Port] to
+ -ORBImplRepoService[IOR|Port] so that it is more consistent with
+ other ways of referencing the Implementation Repository in the
+ ORB. Thanks to Brian Wallis <Brian.Wallis@sr.com.au> for this
+ suggestion.
+
Thu Jul 29 01:06:54 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
* orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h:
diff --git a/TAO/docs/Options.html b/TAO/docs/Options.html
index 66dff6ace8e..bb4ad771f9a 100644
--- a/TAO/docs/Options.html
+++ b/TAO/docs/Options.html
@@ -236,11 +236,11 @@ merged with <a href="#-ORBCollocation"><code>-ORBCollocation</code></a>.
TAO_DEFAULT_TRADING_SERVICE_REQUEST_PORT which is 10016 is used.</TD>
</TR>
<TR>
- <TD><CODE>-ORBImplRepoIOR</CODE> <EM>ior</EM></TD>
+ <TD><CODE>-ORBImplRepoServiceIOR</CODE> <EM>ior</EM></TD>
<TD>Specifies the IOR for the Implementation Repository.</TD>
</TR>
<TR>
- <TD><CODE>-ORBImplRepoPort</CODE> <EM>portspec</EM></TD>
+ <TD><CODE>-ORBImplRepoServicePort</CODE> <EM>portspec</EM></TD>
<TD>Specifies to which port the Implementation Repository is listening on for
multicast requests. By default,
TAO_DEFAULT_IMPLREPO_SERVER_REQUEST_PORT which is 10018 is to
diff --git a/TAO/docs/implrepo/index.html b/TAO/docs/implrepo/index.html
index 5ce150eeaf7..3da1632c56b 100644
--- a/TAO/docs/implrepo/index.html
+++ b/TAO/docs/implrepo/index.html
@@ -77,7 +77,7 @@ are not finished or complete yet.</p>
</tr>
<tr>
<td>POA/ORB Integration</td>
- <td>Only some options have been added, ORBImplRepoIOR, etc.</td>
+ <td>Only some options have been added, ORBImplRepoServiceIOR, etc.</td>
</tr>
<tr>
<td>Multicast location of IRs</td>
diff --git a/TAO/docs/implrepo/tao_ir.html b/TAO/docs/implrepo/tao_ir.html
index 823957facf1..269e3b61c0d 100644
--- a/TAO/docs/implrepo/tao_ir.html
+++ b/TAO/docs/implrepo/tao_ir.html
@@ -19,7 +19,7 @@ content="text/html; charset=iso-8859-1">
[command-arguments]</code></p>
<p><i>ORB_options</i> is the ORB options to be given. This is where
-options like &quot;-ORBImplRepoIOR&quot; would be placed. <i>command </i>is
+options like &quot;-ORBImplRepoServiceIOR&quot; would be placed. <i>command </i>is
one of the supported commands like add, remove, etc. <i>command-arguments</i>
are dependent on the command used. For example, <i>add </i>will need a
server name for registration, but list does not necessarily need any arguments.</p>
@@ -33,17 +33,17 @@ is called <i>airplane.exe</i> and the POA name used by the object is <i>plane</i
The server needs the -i option to use the IR and the IOR of the IR. So the
command would be:</p>
-<p><code>tao_ir -ORBImplRepoIOR file://implrepo.ior add plane -c &quot;airplane.exe
+<p><code>tao_ir -ORBImplRepoServiceIOR file://implrepo.ior add plane -c &quot;airplane.exe
-i file://implrepo.ior&quot;</code></p>
<p><code>And if you want to later remove that server from the IR:</code></p>
-<p><code>tao_ir -ORBImplRepoIOR file://implrepo.ior remove plane</code></p>
+<p><code>tao_ir -ORBImplRepoServiceIOR file://implrepo.ior remove plane</code></p>
<p>Or if you wanted to update the entry to have a working directory of
C:\airplane\.</p>
-<p><code>tao_ir -ORBImplRepoIOR file://implrepo.ior update plane -w
+<p><code>tao_ir -ORBImplRepoServiceIOR file://implrepo.ior update plane -w
&quot;C:\airplane\&quot;</code></p>
<hr>
diff --git a/TAO/docs/implrepo/usersguide.html b/TAO/docs/implrepo/usersguide.html
index 7c34c93c5d3..f71163d14b9 100644
--- a/TAO/docs/implrepo/usersguide.html
+++ b/TAO/docs/implrepo/usersguide.html
@@ -2,9 +2,8 @@
<!-- $Id$ -->
<head>
-<meta http-equiv="Content-Type"
-content="text/html; charset=iso-8859-1">
-<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<title>Implementation Repository User's Guide</title>
</head>
@@ -12,76 +11,113 @@ content="text/html; charset=iso-8859-1">
<hr>
-<h3><font color="#FF0000">Warning, this document is out of date and is currently
-being updated.</font></h3>
-
<h3>Implementation Repository User's Guide</h3>
-<p>Since the POA/ORB integration is not yet completed, the functionality still
-exists in separately in IR_Helper, which is included in orbsvcs. When the
-integration is done, this dependency to orbsvcs will be removed.</p>
+<p>In order for a server to make use of the Implementation Repository, it must communicate
+with the IR to keep it up to date on such things as the server's running status. These
+actions are currently encapsulated in the IR_Helper class that is located in the orbsvcs
+library.</p>
<hr>
-<h4>What does the server need to do.</h4>
+<h4>How is the IR used?</h4>
+
+<p>The main steps for the lifetime of a server that uses the IR are generally the
+following:
+
+<ol>
+ <li>Register name and startup commands with the IR using <b>tao_ir<br>
+ </b><em>Example:<code> </em>tao_ir -ORBImplRepoServiceIOR file://implrepo.ior add plane -c
+ &quot;airplane_server -i -ORBImplRepoServiceIOR file://implrepo.ior&quot;</code></li>
+ <li>Start the server once to generate an IR-ified IOR</li>
+ <li>Start clients and pass them the above IOR</li>
+ <li>Clients will use the IOR, which will automatically go through the IR</li>
+ <li>The IR will start the server if it is not already running</li>
+ <li>At any time when the server is not currently in use by a client, it can be shut down
+ using <strong>tao_ir<br>
+ </strong><em>Example:</em><code> tao_ir -ORBImplRepoServiceIOR file://implrepo.ior shutdown plane</code></li>
+ <li>After the server isn't needed anymore, it can be removed from the IR database using <strong>tao_ir<br>
+ </strong><em>Example:<code> </em>tao_ir -ORBImplRepoServiceIOR file://implrepo.ior remove plane</code></li>
+</ol>
+
+<hr>
+
+<h4>So what does the server need to do? </h4>
+
+<p>The server will need to do the following things in order to work correctly with the IR.
-<p>The IR needs information about the server to be able to direct
-to the right place. The current scheme uses a regular persistent
-IOR and replaces the host and port with that of the IR. Then when
-the call comes into the IR, it sends back a LOCATION_FORWARD to
-the client and directs it to the correct server (after starting
-it if necessary).</p>
+<ol>
+ <li>Create an ImplementationRepository::ServerObject</li>
+ <li>Change the IOR given to clients to use the host/port of the Implementation Repository</li>
+ <li>Notify the IR when the server is starting up</li>
+ <li>Notify the IR when the server is shutting down</li>
+</ol>
-<p>So the server needs to know the IOR of the IR in order to
-change the host and port in it to that of the IR. The information
-the IR needs to receive from the server is its POA name (which it
-uses as an identifier) and commands used to restart the server.</p>
+<p>The details of how to do this can be found in the IR_Helper class, which has methods to
+perform these actions.</p>
<hr>
<h4>The IR_Helper class</h4>
-<p>Most of the work on the server is done in the IR_Helper class.
-The first thing it expects is to have the implrepo.ior file in
-the current directory. This file contains the IOR of the IR.
-IR_Helper then uses this to register itself. </p>
-
-<p>Here is the small checklist I went through when I used the
-IR_Helper class in Airplane Test. The Cubit-style references are
-just refering to any server that has used the structure of the
-IDL_Cubit test (a lot of TAO's examples are like this).</p>
-
-<dir>
- <li>Make yourself an IR_Helper object. (If you follow
- the Cubit-style architecture, this will be a pointer in
- the Server_i class). </li>
- <li>After you create the POA, construct the IR_Helper and
- pass it the relevant information. (Cubit-style: assign a
- new object within Server_i::init) </li>
- <li>If you need to register, call register_server ()
- (Cubit-style: add another option &quot;-r&quot; and have
- it set a flag. Within Server_i::init call
- register_server ()) </li>
- <li>After you create and register your objects, call
- change_object to redo the references. Then you can
- output the new IOR. (Cubit-style: still within
- Server_i::init) </li>
- <li>Right before ORB::run call notify_startup and afterwards,
- call notify shutdown (Cubit-style: within Server_i::run) </li>
-</dir>
+<p>The IR_Helper class is a class intended for use by the server to communicate with the
+IR. It does some of the work by keeping a reference to the IR and a ServerObject and
+hiding much of the work of registration in methods. </p>
+
+<p>Following is the public interface for IR_Helper
+
+<ul>
+ <li><code>IR_Helper (const char *server_name, PortableServer::POA_ptr poa, CORBA::ORB_ptr
+ orb, int debug = 0);<br>
+ <br>
+ </code>To contruct, you must pass in a server_name (which must be the same as the name of
+ the POA where the objects reside) and pointers to the ORB and POA. The debug flag,
+ if set to a value higher than zero, will cause the class to output messages using
+ ACE_DEBUG.<br>
+ <br>
+ The constructor creates a ServerObject and registers it with the Implementation
+ Repository. It receives a reference to the IR via the ORB, so the ORB must be passed
+ the information via the command line (since multicast is not fully operational yet)..
+ <code><br>
+ </code></li>
+ <li><code>void notify_startup ();<br>
+ </code><br>
+ This should be called right before ORB::run(). This passes the IR running
+ information, such as host/port of the server.<br>
+ </li>
+ <li><code>void notify_shutdown ();<br>
+ </code><br>
+ This should be called right after ORB::run(). This tells the IR to remove any
+ running information about the server.<br>
+ </li>
+ <li><code>int register_server (const char *comm_line, const char *environment =
+ &quot;&quot;, const char *working_dir = &quot;&quot;);<br>
+ </code><br>
+ Instead of using <strong>tao_ir</strong>, a server could perform its own registration.
+ Note: the Environment is not fully supported yet.<br>
+ </li>
+ <li><code>void change_object (CORBA::Object_ptr obj);</code><br>
+ <br>
+ This method will take an Object_ptr and convert it to an IR-ified Object_ptr. When
+ an IOR is created from this Object_ptr, it will contain the host/port of the IR instead.</li>
+</ul>
<hr>
<h4>To use, or not to use the IR</h4>
-<p>If you look at the tests, they use -r and -i flags to
-determine how to use the IR. The -i flag turns on the use of the
-Implementation Repository (so the server can be tested without
-the IR). The -r flag is used to register the entry in the IR for
-the server. Note that -r will not work in the example without -i.
-This does require some more work on the server side, so if you
-choose you can just use the IR all the time and only worry about
--r.</p>
+<p>If you look at the two tests, they use -i flags to determine how to use the IR. The -i
+flag turns on the use of the Implementation Repository. This allows the server to be
+tested without the IR, to help track down problems.. </p>
+
+<hr>
+
+<h4>The Future</h4>
+
+<p>What does the future hold for the IR? In addition to supporting the &quot;not
+fully supported yet&quot; items listed above, the functionality of IR_Helper will be moved
+into TAO's POA and ORB. This will help make the use of the IR in a server easier,
+since less changes will have to be made to the server code itself. </p>
<hr>
diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_server_i.cpp b/TAO/orbsvcs/tests/ImplRepo/airplane_server_i.cpp
index 4bcee722ff3..07ba21dac57 100644
--- a/TAO/orbsvcs/tests/ImplRepo/airplane_server_i.cpp
+++ b/TAO/orbsvcs/tests/ImplRepo/airplane_server_i.cpp
@@ -67,6 +67,11 @@ Airplane_Server_i::init (int argc, char** argv, CORBA::Environment &ACE_TRY_ENV)
ACE_TRY_CHECK;
+ if (this->orb_manager_.activate_poa_manager (ACE_TRY_ENV) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "activate_poa_manager"), -1);
+
+ ACE_TRY_CHECK;
+
this->argc_ = argc;
this->argv_ = argv;
diff --git a/TAO/orbsvcs/tests/ImplRepo/implrepo.conf b/TAO/orbsvcs/tests/ImplRepo/implrepo.conf
deleted file mode 100644
index b77832e4a23..00000000000
--- a/TAO/orbsvcs/tests/ImplRepo/implrepo.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id$
-static Resource_Factory "-ORBresources tss"
-static Server_Strategy_Factory "-ORBconcurrency thread-per-connection -ORBpoalock null"
diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_server_i.cpp b/TAO/orbsvcs/tests/ImplRepo/nestea_server_i.cpp
index 1a66f9a62b6..012cc47418f 100644
--- a/TAO/orbsvcs/tests/ImplRepo/nestea_server_i.cpp
+++ b/TAO/orbsvcs/tests/ImplRepo/nestea_server_i.cpp
@@ -76,6 +76,11 @@ Nestea_Server_i::init (int argc, char** argv, CORBA::Environment &ACE_TRY_ENV)
ACE_TRY_CHECK;
+ if (this->orb_manager_.activate_poa_manager (ACE_TRY_ENV) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "activate_poa_manager"), -1);
+
+ ACE_TRY_CHECK;
+
this->argc_ = argc;
this->argv_ = argv;
diff --git a/TAO/orbsvcs/tests/ImplRepo/run_test.pl b/TAO/orbsvcs/tests/ImplRepo/run_test.pl
index b194f4dffde..b61dcf350ec 100755
--- a/TAO/orbsvcs/tests/ImplRepo/run_test.pl
+++ b/TAO/orbsvcs/tests/ImplRepo/run_test.pl
@@ -49,20 +49,20 @@ sub airplane_ir_test
ACE::waitforfile ($implrepo_ior);
- system ($tao_ir." -ORBImplRepoIOR file://$implrepo_ior add plane -c \"airplane_server -i -ORBImplRepoIOR file://$implrepo_ior\"");
+ system ($tao_ir." -ORBImplRepoServiceIOR file://$implrepo_ior add plane -c \"airplane_server -i -ORBImplRepoServiceIOR file://$implrepo_ior\"");
$SV = Process::Create ($airplane_server,
- "-o $airplane_ior -i -ORBobjrefstyle url -ORBImplRepoIOR file://$implrepo_ior");
+ "-o $airplane_ior -i -ORBobjrefstyle url -ORBImplRepoServiceIOR file://$implrepo_ior");
ACE::waitforfile ($airplane_ior);
system($airplane_client." -k file://$airplane_ior");
- system($tao_ir." -ORBImplRepoIOR file://$implrepo_ior shutdown plane");
+ system($tao_ir." -ORBImplRepoServiceIOR file://$implrepo_ior shutdown plane");
system($airplane_client." -k file://$airplane_ior");
- system($tao_ir." -ORBImplRepoIOR file://$implrepo_ior shutdown plane");
+ system($tao_ir." -ORBImplRepoServiceIOR file://$implrepo_ior shutdown plane");
$IR->Kill (); $IR->Wait ();
}
@@ -87,20 +87,20 @@ sub nestea_ir_test
ACE::waitforfile ($implrepo_ior);
- system ($tao_ir." -ORBImplRepoIOR file://$implrepo_ior add nestea_server -c \"nestea_server -i -ORBImplRepoIOR file://$implrepo_ior\"");
+ system ($tao_ir." -ORBImplRepoServiceIOR file://$implrepo_ior add nestea_server -c \"nestea_server -i -ORBImplRepoServiceIOR file://$implrepo_ior\"");
$SV = Process::Create ($nestea_server,
- "-o $nestea_ior -i -ORBobjrefstyle url -ORBImplRepoIOR file://$implrepo_ior");
+ "-o $nestea_ior -i -ORBobjrefstyle url -ORBImplRepoServiceIOR file://$implrepo_ior");
ACE::waitforfile ($nestea_ior);
system ($nestea_client." -k file://$nestea_ior");
- system ($tao_ir." -ORBImplRepoIOR file://$implrepo_ior shutdown nestea_server");
+ system ($tao_ir." -ORBImplRepoServiceIOR file://$implrepo_ior shutdown nestea_server");
system ($nestea_client." -k file://$nestea_ior");
- system ($tao_ir." -ORBImplRepoIOR file://$implrepo_ior shutdown nestea_server");
+ system ($tao_ir." -ORBImplRepoServiceIOR file://$implrepo_ior shutdown nestea_server");
$IR->Kill (); $IR->Wait ();
}
@@ -112,13 +112,13 @@ sub both_ir_test
ACE::waitforfile ($implrepo_ior);
- system ($tao_ir." -ORBImplRepoIOR file://$implrepo_ior add plane -c \"airplane_server -i -ORBImplRepoIOR file://$implrepo_ior\"");
- system ($tao_ir." -ORBImplRepoIOR file://$implrepo_ior add nestea -c \"nestea_server -i -ORBImplRepoIOR file://$implrepo_ior\"");
+ system ($tao_ir." -ORBImplRepoServiceIOR file://$implrepo_ior add plane -c \"airplane_server -i -ORBImplRepoServiceIOR file://$implrepo_ior\"");
+ system ($tao_ir." -ORBImplRepoServiceIOR file://$implrepo_ior add nestea -c \"nestea_server -i -ORBImplRepoServiceIOR file://$implrepo_ior\"");
$ASV = Process::Create ($nestea_server,
- "-o $nestea_ior -i -ORBobjrefstyle url -ORBImplRepoIOR file://$implrepo_ior");
+ "-o $nestea_ior -i -ORBobjrefstyle url -ORBImplRepoServiceIOR file://$implrepo_ior");
$NSV = Process::Create ($airplane_server,
- "-o $airplane_ior -i -ORBobjrefstyle url -ORBImplRepoIOR file://$implrepo_ior");
+ "-o $airplane_ior -i -ORBobjrefstyle url -ORBImplRepoServiceIOR file://$implrepo_ior");
ACE::waitforfile ($nestea_ior);
diff --git a/TAO/orbsvcs/tests/Time/run_test.pl b/TAO/orbsvcs/tests/Time/run_test.pl
index 822a83e9c31..e25a760ee17 100755
--- a/TAO/orbsvcs/tests/Time/run_test.pl
+++ b/TAO/orbsvcs/tests/Time/run_test.pl
@@ -116,14 +116,14 @@ sub time_service_test_using_ir
}
$TIR = Process::Create ($tao_ir_program,
- "-ORBImplRepoIOR file://$implrepo_ior add ".
+ "-ORBImplRepoServiceIOR file://$implrepo_ior add ".
"time_server -c \"$server_program ".
- "-ORBImplRepoIOR file://$implrepo_ior -i\"");
+ "-ORBImplRepoServiceIOR file://$implrepo_ior -i\"");
sleep 5;
$SV1 = Process::Create ($server_program,
- "-ORBImplRepoIOR file://$implrepo_ior -o $server_ior -i");
+ "-ORBImplRepoServiceIOR file://$implrepo_ior -o $server_ior -i");
if (ACE::waitforfile_timed ($server_ior, 5) == -1) {
print STDERR "ERROR: timedout waiting for file <$implerepo_ior>\n";
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index f93f32d391a..f799267b2bf 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -433,7 +433,7 @@ TAO_ORB_Core::init (int &argc, char *argv[])
}
}
else if (ACE_OS::strcasecmp (current_arg,
- "-ORBImplRepoIOR") == 0)
+ "-ORBImplRepoServiceIOR") == 0)
{
// Specify the IOR of the Implementation Repository
@@ -445,7 +445,7 @@ TAO_ORB_Core::init (int &argc, char *argv[])
}
}
else if (ACE_OS::strcasecmp (current_arg,
- "-ORBImplRepoPort") == 0)
+ "-ORBImplRepoServicePort") == 0)
{
// Specify the multicast port number for the Implementation Repository.