summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/config/TestUtil.py6
-rw-r--r--cpp/doc/Properties.sgml40
-rw-r--r--cpp/src/Ice/ObjectAdapterI.cpp7
-rwxr-xr-xcpp/test/Ice/faultTolerance/run.py6
-rwxr-xr-xcpp/test/Ice/locationForward/run.py9
-rwxr-xr-xcpp/test/IcePack/simple/run.py10
6 files changed, 51 insertions, 27 deletions
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py
index d4b1040c8b3..6d7f3adf14a 100644
--- a/cpp/config/TestUtil.py
+++ b/cpp/config/TestUtil.py
@@ -34,12 +34,16 @@ def clientServerTest(toplevel, name):
client = os.path.normpath(testdir + "/client")
print "starting server...",
- serverPipe = os.popen(server + " --Ice.PrintProcessId")
+ serverPipe = os.popen(server + " --Ice.PrintProcessId --Ice.PrintAdapterReady")
output = serverPipe.readline().strip()
if not output:
print "failed!"
sys.exit(0)
serverPids.append(int(output))
+ output = serverPipe.readline().strip()
+ if not output:
+ print "failed!"
+ sys.exit(0)
print "ok"
print "starting client...",
diff --git a/cpp/doc/Properties.sgml b/cpp/doc/Properties.sgml
index d8af3b26d40..05204c150b4 100644
--- a/cpp/doc/Properties.sgml
+++ b/cpp/doc/Properties.sgml
@@ -137,28 +137,6 @@ Sets the endpoints for the object adapter
</section>
</section>
-<section><title>Ice.Adapter.Forward.Endpoints</title>
-<section><title>Synopsis</title>
-<synopsis>
-Ice.Adapter.Forward.Endpoints=<replaceable>endpoints</replaceable>
-</synopsis>
-</section>
-<section>
-<title>Description</title>
-<para>
-<replaceable>endpoints</replaceable> are the &IcePack; location
-forward endpoints. Set this property if you want &Ice; to create
-references that point to the &IcePack; location forwarder.
-<note>
-<para>
-Do not use an Object Adapter with the name <literal>Forward</literal>
-in your own applications.
-</para>
-</note>
-</para>
-</section>
-</section>
-
</section>
<!-- ********************************************************************** -->
@@ -224,6 +202,24 @@ the process ID is printed on standard output upon startup.
</section>
</section>
+<section><title>Ice.PrintAdapterReady</title>
+<section><title>Synopsis</title>
+<synopsis>
+Ice.PrintAdapterReady=<replaceable>num</replaceable>
+</synopsis>
+</section>
+<section>
+<title>Description</title>
+<para>
+If <replaceable>num</replaceable> is set to a value larger than zero,
+an object adapter prints "<replaceable>adapter_name</replaceable>
+ready" on standard output after initialization is complete. This is
+useful for scripts that wish to wait until an object adapter is ready
+to be used.
+</para>
+</section>
+</section>
+
<section><title>Ice.ProgramName</title>
<section><title>Synopsis</title>
<synopsis>
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp
index 772c124962c..139a37e61d4 100644
--- a/cpp/src/Ice/ObjectAdapterI.cpp
+++ b/cpp/src/Ice/ObjectAdapterI.cpp
@@ -16,6 +16,7 @@
#include <Ice/Endpoint.h>
#include <Ice/Collector.h>
#include <Ice/LocalException.h>
+#include <Ice/Properties.h>
#include <Ice/Functional.h>
#include <sstream>
@@ -320,6 +321,12 @@ Ice::ObjectAdapterI::ObjectAdapterI(const InstancePtr& instance, const string& n
{
throw EndpointParseException(__FILE__, __LINE__);
}
+
+ string value = _instance->properties()->getProperty("Ice.PrintAdapterReady");
+ if (atoi(value.c_str()) >= 1)
+ {
+ cout << _name << " ready" << endl;
+ }
}
Ice::ObjectAdapterI::~ObjectAdapterI()
diff --git a/cpp/test/Ice/faultTolerance/run.py b/cpp/test/Ice/faultTolerance/run.py
index 884b1360fdf..71e9bc58c10 100755
--- a/cpp/test/Ice/faultTolerance/run.py
+++ b/cpp/test/Ice/faultTolerance/run.py
@@ -30,12 +30,16 @@ base = 12340
serverPipes = { }
for i in range(0, num):
print "starting server #%d..." % (i + 1),
- serverPipes[i] = os.popen(server + " --Ice.PrintProcessId %d" % (base + i))
+ serverPipes[i] = os.popen(server + " --Ice.PrintProcessId --Ice.PrintAdapterReady %d" % (base + i))
output = serverPipes[i].readline().strip()
if not output:
print "failed!"
sys.exit(0)
TestUtil.serverPids.append(int(output))
+ output = serverPipes[i].readline().strip()
+ if not output:
+ print "failed!"
+ sys.exit(0)
print "ok"
print "starting client...",
diff --git a/cpp/test/Ice/locationForward/run.py b/cpp/test/Ice/locationForward/run.py
index 3685b9f7c31..ccb045b467a 100755
--- a/cpp/test/Ice/locationForward/run.py
+++ b/cpp/test/Ice/locationForward/run.py
@@ -31,15 +31,20 @@ serverPipes = { }
for i in range(0, num):
print "starting server #%d..." % (i + 1),
if i + 1 < num:
- s = "--Ice.PrintProcessId --fwd \"test:tcp -t 2000 -p %d\" %d" % ((base + i + 1), (base + i))
+ s = "--Ice.PrintProcessId --Ice.PrintAdapterReady --fwd \"test:tcp -t 2000 -p %d\" %d" \
+ % ((base + i + 1), (base + i))
else:
- s = "--Ice.PrintProcessId %d" % (base + i)
+ s = "--Ice.PrintProcessId --Ice.PrintAdapterReady %d" % (base + i)
serverPipes[i] = os.popen(server + " " + s)
output = serverPipes[i].readline().strip()
if not output:
print "failed!"
sys.exit(0)
TestUtil.serverPids.append(int(output))
+ output = serverPipes[i].readline().strip()
+ if not output:
+ print "failed!"
+ sys.exit(0)
print "ok"
print "starting client...",
diff --git a/cpp/test/IcePack/simple/run.py b/cpp/test/IcePack/simple/run.py
index 6305848431f..0653788b7ab 100755
--- a/cpp/test/IcePack/simple/run.py
+++ b/cpp/test/IcePack/simple/run.py
@@ -24,7 +24,7 @@ icePack = os.path.normpath(toplevel + "/bin/icepack")
icePackAdmin = os.path.normpath(toplevel + "/bin/icepackadmin")
print "starting icepack...",
-icePackPipe = os.popen(icePack + ' --Ice.PrintProcessId --nowarn' + \
+icePackPipe = os.popen(icePack + ' --Ice.PrintProcessId --Ice.PrintAdapterReady --nowarn' + \
r' "--Ice.Adapter.Forward.Endpoints=tcp -p 12346 -t 5000"' + \
r' "--Ice.Adapter.Admin.Endpoints=tcp -p 12347 -t 5000"')
output = icePackPipe.readline().strip()
@@ -32,6 +32,14 @@ if not output:
print "failed!"
sys.exit(0)
TestUtil.serverPids.append(int(output))
+output = icePackPipe.readline().strip()
+if not output:
+ print "failed!"
+ sys.exit(0)
+output = icePackPipe.readline().strip()
+if not output:
+ print "failed!"
+ sys.exit(0)
print "ok"
print "registering server with icepack...",