summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2001-12-07 16:23:30 +0000
committerMarc Laukien <marc@zeroc.com>2001-12-07 16:23:30 +0000
commitfb860ded9d0b326b5e3ac3930878dfa0aac4238e (patch)
treefcdfd2aeab607f4b088400df6225eac89b363f94 /cpp
parentRelease mode updates. (diff)
downloadice-fb860ded9d0b326b5e3ac3930878dfa0aac4238e.tar.bz2
ice-fb860ded9d0b326b5e3ac3930878dfa0aac4238e.tar.xz
ice-fb860ded9d0b326b5e3ac3930878dfa0aac4238e.zip
addPropertyPrefix
Diffstat (limited to 'cpp')
-rw-r--r--cpp/demo/IceStorm/clock/config2
-rw-r--r--cpp/doc/Properties.sgml321
-rw-r--r--cpp/include/Ice/Initialize.h2
-rw-r--r--cpp/slice/Ice/Communicator.ice28
-rw-r--r--cpp/src/Ice/.depend3
-rw-r--r--cpp/src/Ice/CommunicatorI.cpp79
-rw-r--r--cpp/src/Ice/CommunicatorI.h1
-rw-r--r--cpp/src/Ice/Initialize.cpp91
-rw-r--r--cpp/src/Ice/Makefile3
-rw-r--r--cpp/src/Ice/PropertiesI.cpp51
-rw-r--r--cpp/src/Ice/PropertiesI.h3
-rw-r--r--cpp/src/Ice/ice.dsp4
-rw-r--r--cpp/src/IcePack/Client.cpp3
-rw-r--r--cpp/src/IcePack/Server.cpp11
-rw-r--r--cpp/src/IceStorm/Server.cpp8
-rw-r--r--cpp/src/IceWall/Server.cpp6
-rw-r--r--cpp/test/Ice/locationForward/Server.cpp1
-rwxr-xr-xcpp/test/Ice/locationForward/run.py14
-rwxr-xr-xcpp/test/IcePack/simple/run.py28
19 files changed, 384 insertions, 275 deletions
diff --git a/cpp/demo/IceStorm/clock/config b/cpp/demo/IceStorm/clock/config
index c1d445b3b5d..bbb24b2ad81 100644
--- a/cpp/demo/IceStorm/clock/config
+++ b/cpp/demo/IceStorm/clock/config
@@ -8,7 +8,7 @@ IceStorm.TopicManager=TopicManager:tcp -h localhost -p 10000
# This property sets the endpoint for the TopicManager. The port
# number must match the above.
#
-Ice.Adapter.TopicManager.Endpoints=tcp -p 10000
+IceStorm.TopicManager.Endpoints=tcp -p 10000
#
# TopicManager Tracing
diff --git a/cpp/doc/Properties.sgml b/cpp/doc/Properties.sgml
index 92203108c6c..ffae0a5f4f5 100644
--- a/cpp/doc/Properties.sgml
+++ b/cpp/doc/Properties.sgml
@@ -230,7 +230,9 @@ Ice.Adapter.<replaceable>name</replaceable>.Endpoints=<replaceable>endpoints</re
<para>
Sets the endpoints for the object adapter
<replaceable>name</replaceable> to
-<replaceable>enpoints</replaceable>.
+<replaceable>enpoints</replaceable>, provided that such object adapter
+has been created with
+<literal>Ice::Communicator::createObjectAdapter</literal>.
</para>
</section>
</section>
@@ -337,191 +339,171 @@ application data before the connection times-out and resets.
</section>
<!-- ********************************************************************** -->
-<section><title>IceStorm</title>
+<section><title>Protocol</title>
<!-- ********************************************************************** -->
-<section><title>IceStorm.Trace.TopicManager</title>
+<section><title>Ice.DefaultProtocol</title>
<section><title>Synopsis</title>
<synopsis>
-IceStorm.Trace.TopicManager=<replaceable>num</replaceable>
+Ice.DefaultProtocol=<replaceable>protocol</replaceable>
</synopsis>
</section>
<section>
<title>Description</title>
<para>
-The TopicManager tracing level:
-<informaltable>
-<tgroup cols=2>
-<tbody>
-<row>
-<entry>0</entry>
-<entry>no tracing</entry>
-</row>
-<row>
-<entry>1</entry>
-<entry>topic creation, subscription, unsubscription</entry>
-</row>
-<row>
-<entry>2</entry>
-<entry>more verbose, includes qos information, and other diagnostic information</entry>
-</row>
-</tbody>
-</tgroup>
-</informaltable>
+Sets the protocol that is being used if an endpoint uses
+<literal>default</literal> as protocol specification. The default
+value is <literal>tcp</literal>.
</para>
</section>
</section>
-<section><title>IceStorm.Trace.Topic</title>
+<section><title>Ice.DefaultHost</title>
<section><title>Synopsis</title>
<synopsis>
-IceStorm.Trace.Topic=<replaceable>num</replaceable>
+Ice.DefaultHost=<replaceable>host</replaceable>
</synopsis>
</section>
<section>
<title>Description</title>
<para>
-The Topic tracing level:
-<informaltable>
-<tgroup cols=2>
-<tbody>
-<row>
-<entry>0</entry>
-<entry>no tracing</entry>
-</row>
-<row>
-<entry>1</entry>
-<entry>trace topic diagnostic information</entry>
-</row>
-</tbody>
-</tgroup>
-</informaltable>
+If an endpoint is specified without a host name (i.e., without a
+<literal>-h <replaceable>host</replaceable></literal> option), the
+<replaceable>host</replaceable> value from this property is being used
+instead. The default value is the local host name.
</para>
</section>
</section>
-<section><title>IceStorm.Trace.Flush</title>
+</section>
+
+<!-- ********************************************************************** -->
+<section><title>Miscellaneous</title>
+<!-- ********************************************************************** -->
+
+<section><title>Ice.Daemon, Ice.DaemonNoClose, Ice.DaemonNoChdir</title>
<section><title>Synopsis</title>
<synopsis>
-IceStorm.Trace.Flush=<replaceable>num</replaceable>
+Ice.Daemon=<replaceable>num</replaceable>
+Ice.DaemonNoClose=<replaceable>no_close</replaceable>
+Ice.DaemonNoChdir=<replaceable>no_chdir</replaceable>
</synopsis>
</section>
<section>
<title>Description</title>
<para>
-Trace information on the thread that flushes batch reliability events to subscribers:
-<informaltable>
-<tgroup cols=2>
-<tbody>
-<row>
-<entry>0</entry>
-<entry>no tracing</entry>
-</row>
-<row>
-<entry>1</entry>
-<entry>trace each flush</entry>
-</row>
-</tbody>
-</tgroup>
-</informaltable>
+If <replaceable>num</replaceable> is set to a value larger than zero,
+the &Ice; process daeamonizes itself with the
+<literal>daemon</literal> system call. If
+<replaceable>no_close</replaceable> is set to a value larger than zero,
+standard input, output, and error output are not redirected to
+<literal>/dev/null</literal>. If <replaceable>no_chdir</replaceable> is
+set to a value larger than zero, &Ice; doesn't change its working
+directory to the root directory. (Unix only.)
</para>
</section>
</section>
-<section><title>IceStorm.Trace.Subscriber</title>
+<section><title>Ice.PrintProcessId</title>
<section><title>Synopsis</title>
<synopsis>
-IceStorm.Trace.Subscriber=<replaceable>num</replaceable>
+Ice.PrintProcessId=<replaceable>num</replaceable>
</synopsis>
</section>
<section>
<title>Description</title>
<para>
-The Subscriber tracing level:
-<informaltable>
-<tgroup cols=2>
-<tbody>
-<row>
-<entry>0</entry>
-<entry>no tracing</entry>
-</row>
-<row>
-<entry>1</entry>
-<entry>trace topic diagnostic information on subscription/unsubscription</entry>
-</row>
-</tbody>
-</tgroup>
-</informaltable>
+If <replaceable>num</replaceable> is set to a value larger than zero,
+the process ID is printed on standard output upon startup.
</para>
</section>
</section>
-<section><title>IceStorm.Flush.Timeout</title>
+<section><title>Ice.PrintAdapterReady</title>
<section><title>Synopsis</title>
<synopsis>
-IceStorm.Flush.Timeout=<replaceable>num</replaceable>
+Ice.PrintAdapterReady=<replaceable>num</replaceable>
</synopsis>
</section>
<section>
<title>Description</title>
<para>
-Defines the interval in milliseconds that batch reliability events are
-sent to subscribers. The default is 1000 ms. The minimum value of this
-property is 100 ms.
+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.Adapter.TopicManager.Endpoints</title>
+<section><title>Ice.ProgramName</title>
<section><title>Synopsis</title>
<synopsis>
-Ice.Adapter.TopicManager.Enpoints=<replaceable>string</replaceable>
+Ice.ProgramName=<replaceable>name</replaceable>
</synopsis>
</section>
<section>
<title>Description</title>
<para>
-Definies the endpoint that the IceStorm TopicManager uses. TODO: add
-cross-reference TODO: Move to some place more appropriate
+<replaceable>name</replaceable> is the program name, which is set
+automatically from <literal>argv[0]</literal> during
+initialization. However, a different name can be used by overwriting
+this property.
</para>
</section>
</section>
+<section><title>Ice.ServerIdleTime</title>
+<section><title>Synopsis</title>
+<synopsis>
+Ice.ServerIdleTime=<replaceable>num</replaceable>
+</synopsis>
+</section>
+<section>
+<title>Description</title>
+<para>
+If <replaceable>num</replaceable> is set to a value larger than zero,
+&Ice; will automatically call
+<literal>Communicator::shutdown</literal> after the Communicator has
+been idle for <replaceable>num</replaceable> seconds. This will shut
+down the Communicator's server side, and all threads waiting in
+<literal>Communicator::waitForShutdown</literal> will return. After
+that, a server will typically do some cleanup work, and then exit.
+</para>
+</section>
</section>
-<!-- ********************************************************************** -->
-<section><title>Protocol</title>
-<!-- ********************************************************************** -->
-
-<section><title>Ice.DefaultProtocol</title>
+<section><title>Ice.UseSyslog</title>
<section><title>Synopsis</title>
<synopsis>
-Ice.DefaultProtocol=<replaceable>protocol</replaceable>
+Ice.UseSyslog=<replaceable>num</replaceable>
</synopsis>
</section>
<section>
<title>Description</title>
<para>
-Sets the protocol that is being used if an endpoint uses
-<literal>default</literal> as protocol specification. The default
-value is <literal>tcp</literal>.
+If <replaceable>num</replaceable> is set to a value larger than zero,
+a special logger is installed, which logs to the syslog facility
+instead of to standard error output. The identfier for syslog is the
+value of <literal>Ice.ProgramName</literal>. (Unix only.)
</para>
</section>
</section>
-<section><title>Ice.DefaultHost</title>
+<section><title>Ice.WarnAboutServerExceptions</title>
<section><title>Synopsis</title>
<synopsis>
-Ice.DefaultHost=<replaceable>host</replaceable>
+Ice.WarnAboutServerExceptions=<replaceable>num</replaceable>
</synopsis>
</section>
<section>
<title>Description</title>
<para>
-If an endpoint is specified without a host name (i.e., without a
-<literal>-h <replaceable>host</replaceable></literal> option), the
-<replaceable>host</replaceable> value from this property is being used
-instead. The default value is the local host name.
+If <replaceable>num</replaceable> is set to a value larger than zero,
+servers print warning messages if they encounter an unexpected
+exception while accepting connection requests from clients, or while
+dispatching operation calls invoked by clients.
</para>
</section>
</section>
@@ -529,132 +511,173 @@ instead. The default value is the local host name.
</section>
<!-- ********************************************************************** -->
-<section><title>Miscellaneous</title>
+<section><title>&IceStorm; Properties</title>
<!-- ********************************************************************** -->
-<section><title>Ice.Daemon, Ice.DaemonNoClose, Ice.DaemonNoChdir</title>
+<section><title>IceStorm.Trace.TopicManager</title>
<section><title>Synopsis</title>
<synopsis>
-Ice.Daemon=<replaceable>num</replaceable>
-Ice.DaemonNoClose=<replaceable>no_close</replaceable>
-Ice.DaemonNoChdir=<replaceable>no_chdir</replaceable>
+IceStorm.Trace.TopicManager=<replaceable>num</replaceable>
</synopsis>
</section>
<section>
<title>Description</title>
<para>
-If <replaceable>num</replaceable> is set to a value larger than zero,
-the &Ice; process daeamonizes itself with the
-<literal>daemon</literal> system call. If
-<replaceable>no_close</replaceable> is set to a value larger than zero,
-standard input, output, and error output are not redirected to
-<literal>/dev/null</literal>. If <replaceable>no_chdir</replaceable> is
-set to a value larger than zero, &Ice; doesn't change its working
-directory to the root directory. (Unix only.)
+The topic manager tracing level:
+<informaltable>
+<tgroup cols=2>
+<tbody>
+<row>
+<entry>0</entry>
+<entry>no tracing</entry>
+</row>
+<row>
+<entry>1</entry>
+<entry>topic creation, subscription, unsubscription</entry>
+</row>
+<row>
+<entry>2</entry>
+<entry>more verbose, includes qos information, and other diagnostic information</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
</para>
</section>
</section>
-<section><title>Ice.PrintProcessId</title>
+<section><title>IceStorm.Trace.Topic</title>
<section><title>Synopsis</title>
<synopsis>
-Ice.PrintProcessId=<replaceable>num</replaceable>
+IceStorm.Trace.Topic=<replaceable>num</replaceable>
</synopsis>
</section>
<section>
<title>Description</title>
<para>
-If <replaceable>num</replaceable> is set to a value larger than zero,
-the process ID is printed on standard output upon startup.
+The Topic tracing level:
+<informaltable>
+<tgroup cols=2>
+<tbody>
+<row>
+<entry>0</entry>
+<entry>no tracing</entry>
+</row>
+<row>
+<entry>1</entry>
+<entry>trace topic diagnostic information</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
</para>
</section>
</section>
-<section><title>Ice.PrintAdapterReady</title>
+<section><title>IceStorm.Trace.Flush</title>
<section><title>Synopsis</title>
<synopsis>
-Ice.PrintAdapterReady=<replaceable>num</replaceable>
+IceStorm.Trace.Flush=<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.
+Trace information on the thread that flushes batch reliability events to subscribers:
+<informaltable>
+<tgroup cols=2>
+<tbody>
+<row>
+<entry>0</entry>
+<entry>no tracing</entry>
+</row>
+<row>
+<entry>1</entry>
+<entry>trace each flush</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
</para>
</section>
</section>
-<section><title>Ice.ProgramName</title>
+<section><title>IceStorm.Trace.Subscriber</title>
<section><title>Synopsis</title>
<synopsis>
-Ice.ProgramName=<replaceable>name</replaceable>
+IceStorm.Trace.Subscriber=<replaceable>num</replaceable>
</synopsis>
</section>
<section>
<title>Description</title>
<para>
-<replaceable>name</replaceable> is the program name, which is set
-automatically from <literal>argv[0]</literal> during
-initialization. However, a different name can be used by overwriting
-this property.
+The Subscriber tracing level:
+<informaltable>
+<tgroup cols=2>
+<tbody>
+<row>
+<entry>0</entry>
+<entry>no tracing</entry>
+</row>
+<row>
+<entry>1</entry>
+<entry>trace topic diagnostic information on subscription/unsubscription</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
</para>
</section>
</section>
-<section><title>Ice.ServerIdleTime</title>
+<section><title>IceStorm.Flush.Timeout</title>
<section><title>Synopsis</title>
<synopsis>
-Ice.ServerIdleTime=<replaceable>num</replaceable>
+IceStorm.Flush.Timeout=<replaceable>num</replaceable>
</synopsis>
</section>
<section>
<title>Description</title>
<para>
-If <replaceable>num</replaceable> is set to a value larger than zero,
-&Ice; will automatically call
-<literal>Communicator::shutdown</literal> after the Communicator has
-been idle for <replaceable>num</replaceable> seconds. This will shut
-down the Communicator's server side, and all threads waiting in
-<literal>Communicator::waitForShutdown</literal> will return. After
-that, a server will typically do some cleanup work, and then exit.
+Defines the interval in milliseconds that batch reliability events are
+sent to subscribers. The default is 1000 ms. The minimum value of this
+property is 100 ms.
</para>
</section>
</section>
-<section><title>Ice.UseSyslog</title>
+<section><title>IceStorm.TopicManager.Endpoints</title>
<section><title>Synopsis</title>
<synopsis>
-Ice.UseSyslog=<replaceable>num</replaceable>
+IceStorm.TopicManager.Endpoints=<replaceable>endpoints</replaceable>
</synopsis>
</section>
<section>
<title>Description</title>
<para>
-If <replaceable>num</replaceable> is set to a value larger than zero,
-a special logger is installed, which logs to the syslog facility
-instead of to standard error output. The identfier for syslog is the
-value of <literal>Ice.ProgramName</literal>. (Unix only.)
+Defines the endpoints that the &IceStorm; topic manager uses.
</para>
</section>
</section>
-<section><title>Ice.WarnAboutServerExceptions</title>
+</section>
+
+<!-- ********************************************************************** -->
+<section><title>&IcePack; Properties</title>
+<!-- ********************************************************************** -->
+
+<section><title>IcePack.Admin.Endpoints, IcePack.Forward.Endpoints</title>
<section><title>Synopsis</title>
<synopsis>
-Ice.WarnAboutServerExceptions=<replaceable>num</replaceable>
+IcePack.Admin.Endpoints=<replaceable>endpoints</replaceable>
+IcePack.Forward.Endpoints=<replaceable>endpoints</replaceable>
</synopsis>
</section>
<section>
<title>Description</title>
<para>
-If <replaceable>num</replaceable> is set to a value larger than zero,
-servers print warning messages if they encounter an unexpected
-exception while accepting connection requests from clients, or while
-dispatching operation calls invoked by clients.
+Defines the endpoints that the &IcePack; administrative interface, and
+of the &IcePack; forwarder.
</para>
</section>
</section>
diff --git a/cpp/include/Ice/Initialize.h b/cpp/include/Ice/Initialize.h
index 0889a60259e..ecd7476c3c1 100644
--- a/cpp/include/Ice/Initialize.h
+++ b/cpp/include/Ice/Initialize.h
@@ -25,6 +25,8 @@ ICE_API PropertiesPtr getDefaultProperties(int&, char*[]);
ICE_API PropertiesPtr createProperties(int&, char*[]);
ICE_API PropertiesPtr createPropertiesFromFile(int&, char*[], const std::string&);
+ICE_API void addArgumentPrefix(const std::string&);
+
}
namespace IceInternal
diff --git a/cpp/slice/Ice/Communicator.ice b/cpp/slice/Ice/Communicator.ice
index 0f75256d83d..6f636f2d0d6 100644
--- a/cpp/slice/Ice/Communicator.ice
+++ b/cpp/slice/Ice/Communicator.ice
@@ -129,7 +129,7 @@ local interface Communicator
*
* Create a new Object Adapter. The endpoints for the Object
* Adapter are taken from the property
- * [ice.adapter.<replaceable>name</replaceable>.endpoints], with
+ * [Ice.Adapter.<replaceable>name</replaceable>.Endpoints], with
* <replaceable>name</replaceable> being the name of the Object
* Adapter.
*
@@ -139,6 +139,8 @@ local interface Communicator
* @return The new Object Adapter.
*
* @see ObjectAdapter
+ * @see Properties
+ * @see createObjectAdapterFromProperty
* @see createObjectAdapterWithEndpoints
*
**/
@@ -146,8 +148,29 @@ local interface Communicator
/**
*
+ * Create a new Object Adapter from a property. The endpoints for
+ * the Object Adapter are taken from the property
+ * <replaceable>property</replaceable>.
+ *
+ * @param name The name to use for the Object Adapter. This name
+ * must be unique for the Communicator.
+ *
+ * @param property The property from which the endpoints are taken.
+ *
+ * @return The new Object Adapter.
+ *
+ * @see Properties
+ * @see ObjectAdapter
+ * @see createObjectAdapterWithEndpoints
+ *
+ **/
+ ObjectAdapter createObjectAdapterFromProperty(string name, string property);
+
+ /**
+ *
* Create a new Object Adapter with a list of endpoints. In
- * contrast to [createObjectAdapter], the endpoints to use are
+ * contrast to [createObjectAdapter] and
+ * [createObjectAdapterFromProperty], the endpoints to use are
* passed explicitly as a parameter.
*
* @param name The name to use for the Object Adapter. This name
@@ -159,6 +182,7 @@ local interface Communicator
*
* @see ObjectAdapter
* @see createObjectAdapter
+ * @see createObjectAdapterFromProperty
*
**/
ObjectAdapter createObjectAdapterWithEndpoints(string name, string endpts);
diff --git a/cpp/src/Ice/.depend b/cpp/src/Ice/.depend
index d54e3096d13..b9004fd26a6 100644
--- a/cpp/src/Ice/.depend
+++ b/cpp/src/Ice/.depend
@@ -1,3 +1,4 @@
+Initialize.o: Initialize.cpp ../Ice/CommunicatorI.h ../Ice/ThreadPoolF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/Communicator.h ../../include/Ice/LoggerF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/StreamF.h ../Ice/PropertiesI.h ../../include/Ice/Properties.h
Application.o: Application.cpp ../../include/Ice/Application.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/Stream.h ../../include/Ice/Communicator.h ../../include/Ice/LoggerF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/StreamF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/Identity.h ../../include/Ice/ServantLocator.h ../../include/Ice/Current.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Object.h ../../include/Ice/IdentityUtil.h
Exception.o: Exception.cpp ../../include/Ice/Exception.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/LocalException.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/IceUtil/Handle.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../Ice/Network.h
LocalException.o: LocalException.cpp ../../include/Ice/LocalException.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Object.h
@@ -13,7 +14,7 @@ TraceLevels.o: TraceLevels.cpp ../Ice/TraceLevels.h ../../include/IceUtil/Shared
TraceUtil.o: TraceUtil.cpp ../Ice/TraceUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../Ice/TraceLevelsF.h ../Ice/Instance.h ../../include/Ice/InstanceF.h ../../include/Ice/CommunicatorF.h ../../include/Ice/PropertiesF.h ../../include/Ice/ProxyFactoryF.h ../Ice/ThreadPoolF.h ../../include/Ice/EmitterF.h ../Ice/ObjectFactoryManagerF.h ../Ice/UserExceptionFactoryManagerF.h ../../include/Ice/ObjectAdapterFactoryF.h ../../include/Ice/Object.h ../../include/Ice/Proxy.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../Ice/TraceLevels.h ../../include/Ice/Logger.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../Ice/Protocol.h ../../include/Ice/IdentityUtil.h
Instance.o: Instance.cpp ../Ice/Instance.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/InstanceF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/CommunicatorF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/Ice/PropertiesF.h ../../include/Ice/LoggerF.h ../Ice/TraceLevelsF.h ../../include/Ice/ProxyFactoryF.h ../Ice/ThreadPoolF.h ../../include/Ice/EmitterF.h ../Ice/ObjectFactoryManagerF.h ../Ice/UserExceptionFactoryManagerF.h ../../include/Ice/ObjectAdapterFactoryF.h ../Ice/TraceLevels.h ../Ice/ProxyFactory.h ../../include/Ice/ReferenceF.h ../Ice/ThreadPool.h ../Ice/EventHandlerF.h ../Ice/Emitter.h ../Ice/TransceiverF.h ../Ice/ConnectorF.h ../Ice/EndpointF.h ../Ice/EventHandler.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../Ice/ObjectFactoryManager.h ../../include/Ice/ObjectFactoryF.h ../Ice/UserExceptionFactoryManager.h ../../include/Ice/UserExceptionFactoryF.h ../Ice/ObjectAdapterFactory.h ../Ice/ObjectAdapterI.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/Identity.h ../../include/Ice/CollectorF.h ../../include/Ice/Properties.h ../Ice/LoggerI.h ../../include/Ice/Logger.h ../Ice/Network.h ../Ice/SysLoggerI.h
Communicator.o: Communicator.cpp ../../include/Ice/Communicator.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/LoggerF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/PropertiesF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/StreamF.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Object.h
-CommunicatorI.o: CommunicatorI.cpp ../Ice/CommunicatorI.h ../Ice/ThreadPoolF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/Communicator.h ../../include/Ice/LoggerF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/StreamF.h ../Ice/PropertiesI.h ../../include/Ice/Properties.h ../Ice/Instance.h ../Ice/TraceLevelsF.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../Ice/ObjectFactoryManagerF.h ../Ice/UserExceptionFactoryManagerF.h ../../include/Ice/ObjectAdapterFactoryF.h ../Ice/ProxyFactory.h ../../include/Ice/ReferenceF.h ../Ice/ThreadPool.h ../Ice/EventHandlerF.h ../Ice/ObjectFactoryManager.h ../Ice/UserExceptionFactoryManager.h ../Ice/ObjectAdapterFactory.h ../Ice/ObjectAdapterI.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/Identity.h ../../include/Ice/CollectorF.h ../Ice/EndpointF.h ../../include/Ice/Logger.h ../Ice/StreamI.h ../../include/Ice/Stream.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h
+CommunicatorI.o: CommunicatorI.cpp ../Ice/CommunicatorI.h ../Ice/ThreadPoolF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/Communicator.h ../../include/Ice/LoggerF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/StreamF.h ../Ice/Instance.h ../Ice/TraceLevelsF.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../Ice/ObjectFactoryManagerF.h ../Ice/UserExceptionFactoryManagerF.h ../../include/Ice/ObjectAdapterFactoryF.h ../../include/Ice/Properties.h ../Ice/ProxyFactory.h ../../include/Ice/ReferenceF.h ../Ice/ThreadPool.h ../Ice/EventHandlerF.h ../Ice/ObjectFactoryManager.h ../Ice/UserExceptionFactoryManager.h ../Ice/ObjectAdapterFactory.h ../Ice/ObjectAdapterI.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/Identity.h ../../include/Ice/CollectorF.h ../Ice/EndpointF.h ../../include/Ice/Logger.h ../Ice/StreamI.h ../../include/Ice/Stream.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h
ObjectFactory.o: ObjectFactory.cpp ../../include/Ice/ObjectFactory.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Object.h
ObjectFactoryManager.o: ObjectFactoryManager.cpp ../Ice/ObjectFactoryManager.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../Ice/ObjectFactoryManagerF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/Ice/ObjectFactory.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h
ObjectAdapter.o: ObjectAdapter.cpp ../../include/Ice/ObjectAdapter.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/CommunicatorF.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/Identity.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Object.h
diff --git a/cpp/src/Ice/CommunicatorI.cpp b/cpp/src/Ice/CommunicatorI.cpp
index 60704936022..be257743546 100644
--- a/cpp/src/Ice/CommunicatorI.cpp
+++ b/cpp/src/Ice/CommunicatorI.cpp
@@ -9,8 +9,8 @@
// **********************************************************************
#include <Ice/CommunicatorI.h>
-#include <Ice/PropertiesI.h>
#include <Ice/Instance.h>
+#include <Ice/Properties.h>
#include <Ice/ProxyFactory.h>
#include <Ice/ThreadPool.h>
#include <Ice/ObjectFactoryManager.h>
@@ -18,7 +18,6 @@
#include <Ice/ObjectAdapterFactory.h>
#include <Ice/Logger.h>
#include <Ice/StreamI.h>
-#include <Ice/Initialize.h>
#include <Ice/Exception.h>
using namespace std;
@@ -81,12 +80,18 @@ Ice::CommunicatorI::proxyToString(const ObjectPrx& proxy)
ObjectAdapterPtr
Ice::CommunicatorI::createObjectAdapter(const string& name)
{
+ return createObjectAdapterFromProperty(name, "Ice.Adapter." + name + ".Endpoints");
+}
+
+ObjectAdapterPtr
+Ice::CommunicatorI::createObjectAdapterFromProperty(const string& name, const string& property)
+{
JTCSyncT<JTCRecursiveMutex> sync(*this);
if (!_instance)
{
throw CommunicatorDestroyedException(__FILE__, __LINE__);
}
- string endpts = _instance->properties()->getProperty("Ice.Adapter." + name + ".Endpoints");
+ string endpts = _instance->properties()->getProperty(property);
return createObjectAdapterWithEndpoints(name, endpts);
}
@@ -240,71 +245,3 @@ Ice::CommunicatorI::~CommunicatorI()
_instance->logger()->warning("communicator has not been destroyed");
}
}
-
-CommunicatorPtr
-Ice::initialize(int& argc, char* argv[], Int version)
-{
-#ifndef ICE_IGNORE_VERSION
- if (version != ICE_INT_VERSION)
- {
- throw VersionMismatchException(__FILE__, __LINE__);
- }
-#endif
-
- return new CommunicatorI(getDefaultProperties(argc, argv));
-}
-
-CommunicatorPtr
-Ice::initializeWithProperties(const PropertiesPtr& properties, Int version)
-{
-#ifndef ICE_IGNORE_VERSION
- if (version != ICE_INT_VERSION)
- {
- throw VersionMismatchException(__FILE__, __LINE__);
- }
-#endif
-
- return new CommunicatorI(properties);
-}
-
-static PropertiesPtr defaultProperties;
-class DefaultPropertiesDestroyer
-{
-public:
-
- ~DefaultPropertiesDestroyer()
- {
- defaultProperties = 0;
- }
-};
-static DefaultPropertiesDestroyer defaultPropertiesDestroyer;
-
-PropertiesPtr
-Ice::getDefaultProperties(int& argc, char* argv[])
-{
- if (!defaultProperties)
- {
- defaultProperties = createProperties(argc, argv);
- }
- return defaultProperties;
-}
-
-PropertiesPtr
-Ice::createProperties(int& argc, char* argv[])
-{
- return new PropertiesI(argc, argv);
-}
-
-PropertiesPtr
-Ice::createPropertiesFromFile(int& argc, char* argv[], const string& file)
-{
- return new PropertiesI(argc, argv, file);
-}
-
-InstancePtr
-IceInternal::getInstance(const CommunicatorPtr& communicator)
-{
- CommunicatorI* p = dynamic_cast<CommunicatorI*>(communicator.get());
- assert(p);
- return p->_instance;
-}
diff --git a/cpp/src/Ice/CommunicatorI.h b/cpp/src/Ice/CommunicatorI.h
index d92aa80e91f..8801c98ca8e 100644
--- a/cpp/src/Ice/CommunicatorI.h
+++ b/cpp/src/Ice/CommunicatorI.h
@@ -30,6 +30,7 @@ public:
virtual std::string proxyToString(const ObjectPrx&);
virtual ObjectAdapterPtr createObjectAdapter(const std::string&);
+ virtual ObjectAdapterPtr createObjectAdapterFromProperty(const std::string&, const std::string&);
virtual ObjectAdapterPtr createObjectAdapterWithEndpoints(const std::string&, const std::string&);
virtual void addObjectFactory(const ObjectFactoryPtr&, const std::string&);
diff --git a/cpp/src/Ice/Initialize.cpp b/cpp/src/Ice/Initialize.cpp
new file mode 100644
index 00000000000..c2c9aa1740e
--- /dev/null
+++ b/cpp/src/Ice/Initialize.cpp
@@ -0,0 +1,91 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/CommunicatorI.h>
+#include <Ice/PropertiesI.h>
+#include <Ice/Initialize.h>
+
+using namespace std;
+using namespace Ice;
+using namespace IceInternal;
+
+CommunicatorPtr
+Ice::initialize(int& argc, char* argv[], Int version)
+{
+#ifndef ICE_IGNORE_VERSION
+ if (version != ICE_INT_VERSION)
+ {
+ throw VersionMismatchException(__FILE__, __LINE__);
+ }
+#endif
+
+ return new CommunicatorI(getDefaultProperties(argc, argv));
+}
+
+CommunicatorPtr
+Ice::initializeWithProperties(const PropertiesPtr& properties, Int version)
+{
+#ifndef ICE_IGNORE_VERSION
+ if (version != ICE_INT_VERSION)
+ {
+ throw VersionMismatchException(__FILE__, __LINE__);
+ }
+#endif
+
+ return new CommunicatorI(properties);
+}
+
+static PropertiesPtr defaultProperties;
+class DefaultPropertiesDestroyer
+{
+public:
+
+ ~DefaultPropertiesDestroyer()
+ {
+ defaultProperties = 0;
+ }
+};
+static DefaultPropertiesDestroyer defaultPropertiesDestroyer;
+
+PropertiesPtr
+Ice::getDefaultProperties(int& argc, char* argv[])
+{
+ if (!defaultProperties)
+ {
+ defaultProperties = createProperties(argc, argv);
+ }
+ return defaultProperties;
+}
+
+PropertiesPtr
+Ice::createProperties(int& argc, char* argv[])
+{
+ return new PropertiesI(argc, argv);
+}
+
+PropertiesPtr
+Ice::createPropertiesFromFile(int& argc, char* argv[], const string& file)
+{
+ return new PropertiesI(argc, argv, file);
+}
+
+void
+Ice::addArgumentPrefix(const std::string& prefix)
+{
+ PropertiesI::addArgumentPrefix(prefix);
+}
+
+InstancePtr
+IceInternal::getInstance(const CommunicatorPtr& communicator)
+{
+ CommunicatorI* p = dynamic_cast<CommunicatorI*>(communicator.get());
+ assert(p);
+ return p->_instance;
+}
diff --git a/cpp/src/Ice/Makefile b/cpp/src/Ice/Makefile
index c6655736f87..5498dcb0004 100644
--- a/cpp/src/Ice/Makefile
+++ b/cpp/src/Ice/Makefile
@@ -18,7 +18,8 @@ VERSIONED_NAME = $(top_srcdir)/lib/$(VERSIONED_BASE)
TARGETS = $(NAME) $(VERSIONED_NAME)
-OBJS = Application.o \
+OBJS = Initialize.o \
+ Application.o \
Exception.o \
LocalException.o \
Properties.o \
diff --git a/cpp/src/Ice/PropertiesI.cpp b/cpp/src/Ice/PropertiesI.cpp
index a3aa9fc77cf..e119d8bc0ba 100644
--- a/cpp/src/Ice/PropertiesI.cpp
+++ b/cpp/src/Ice/PropertiesI.cpp
@@ -16,6 +16,8 @@ using namespace std;
using namespace Ice;
using namespace IceInternal;
+std::set<string> Ice::PropertiesI::_argumentPrefixes;
+
string
Ice::PropertiesI::getProperty(const string& key)
{
@@ -45,6 +47,12 @@ Ice::PropertiesI::clone()
return p;
}
+void
+Ice::PropertiesI::addArgumentPrefix(const std::string& prefix)
+{
+ _argumentPrefixes.insert(prefix);
+}
+
Ice::PropertiesI::PropertiesI(int& argc, char* argv[])
{
for (int i = 1; i < argc; ++i)
@@ -111,23 +119,40 @@ Ice::PropertiesI::parseArgs(int& argc, char* argv[])
int idx = 1;
while (idx < argc)
{
- if (strncmp(argv[idx], "--Ice.", 6) == 0)
+ bool match = false;
+ string arg = argv[idx];
+ string::size_type beg = arg.find("--");
+ if (beg == 0)
{
- string line = argv[idx];
- for (int i = idx ; i + 1 < argc ; ++i)
+ string::size_type end = arg.find('.');
+ if (end != string::npos)
{
- argv[i] = argv[i + 1];
+ string prefix = arg.substr(2, end - 2);
+
+ if (prefix == "Ice" || _argumentPrefixes.find(prefix) != _argumentPrefixes.end())
+ {
+ match = true;
+ }
+
+ if (match)
+ {
+ for (int i = idx ; i + 1 < argc ; ++i)
+ {
+ argv[i] = argv[i + 1];
+ }
+ --argc;
+
+ if (arg.find('=') == string::npos)
+ {
+ arg += "=1";
+ }
+
+ parseLine(arg.substr(2));
+ }
}
- --argc;
-
- if (line.find('=') == string::npos)
- {
- line += "=1";
- }
-
- parseLine(line.substr(2));
}
- else
+
+ if (!match)
{
++idx;
}
diff --git a/cpp/src/Ice/PropertiesI.h b/cpp/src/Ice/PropertiesI.h
index 0a4027d18d6..255f7f0fb46 100644
--- a/cpp/src/Ice/PropertiesI.h
+++ b/cpp/src/Ice/PropertiesI.h
@@ -12,6 +12,7 @@
#define ICE_PROPERTIES_I_H
#include <Ice/Properties.h>
+#include <set>
namespace Ice
{
@@ -23,6 +24,7 @@ public:
virtual std::string getProperty(const std::string&);
virtual void setProperty(const std::string&, const std::string&);
virtual PropertiesPtr clone();
+ static void addArgumentPrefix(const std::string&);
private:
@@ -37,6 +39,7 @@ private:
void parseLine(const std::string&);
std::map<std::string, std::string> _properties;
+ static std::set<std::string> _argumentPrefixes;
};
}
diff --git a/cpp/src/Ice/ice.dsp b/cpp/src/Ice/ice.dsp
index 51243de1206..5b14d25dafa 100644
--- a/cpp/src/Ice/ice.dsp
+++ b/cpp/src/Ice/ice.dsp
@@ -168,6 +168,10 @@ SOURCE=.\Incoming.cpp
# End Source File
# Begin Source File
+SOURCE=.\Initialize.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Instance.cpp
# End Source File
# Begin Source File
diff --git a/cpp/src/IcePack/Client.cpp b/cpp/src/IcePack/Client.cpp
index 5f4e7eb7d20..8603fb574ef 100644
--- a/cpp/src/IcePack/Client.cpp
+++ b/cpp/src/IcePack/Client.cpp
@@ -27,6 +27,7 @@ public:
int
main(int argc, char* argv[])
{
+ addArgumentPrefix("IcePack");
Client app;
return app.main(argc, argv);
}
@@ -137,7 +138,7 @@ Client::run(int argc, char* argv[])
}
PropertiesPtr properties = communicator()->getProperties();
- const char* adminEndpointsProperty = "Ice.Adapter.Admin.Endpoints";
+ const char* adminEndpointsProperty = "IcePack.Admin.Endpoints";
string adminEndpoints = properties->getProperty(adminEndpointsProperty);
if (adminEndpoints.empty())
{
diff --git a/cpp/src/IcePack/Server.cpp b/cpp/src/IcePack/Server.cpp
index 7a0f7e8be28..3a2857db0f0 100644
--- a/cpp/src/IcePack/Server.cpp
+++ b/cpp/src/IcePack/Server.cpp
@@ -27,6 +27,7 @@ public:
int
main(int argc, char* argv[])
{
+ addArgumentPrefix("IcePack");
Server app;
return app.main(argc, argv);
}
@@ -73,7 +74,7 @@ Server::run(int argc, char* argv[])
PropertiesPtr properties = communicator()->getProperties();
- const char* adminEndpointsProperty = "Ice.Adapter.Admin.Endpoints";
+ const char* adminEndpointsProperty = "IcePack.Admin.Endpoints";
string adminEndpoints = properties->getProperty(adminEndpointsProperty);
if (!adminEndpoints.empty() && !nowarn)
{
@@ -81,7 +82,7 @@ Server::run(int argc, char* argv[])
<< endl;
}
- const char* forwardEndpointsProperty = "Ice.Adapter.Forward.Endpoints";
+ const char* forwardEndpointsProperty = "IcePack.Forward.Endpoints";
string forwardEndpoints = properties->getProperty(forwardEndpointsProperty);
if (forwardEndpoints.empty())
{
@@ -94,12 +95,14 @@ Server::run(int argc, char* argv[])
if (adminEndpoints.length() != 0)
{
- ObjectAdapterPtr adminAdapter = communicator()->createObjectAdapter("Admin");
+ ObjectAdapterPtr adminAdapter = communicator()->createObjectAdapterFromProperty("Admin",
+ adminEndpointsProperty);
adminAdapter->add(admin, stringToIdentity("admin"));
adminAdapter->activate();
}
- ObjectAdapterPtr forwardAdapter = communicator()->createObjectAdapter("Forward");
+ ObjectAdapterPtr forwardAdapter = communicator()->createObjectAdapterFromProperty("Forward",
+ forwardEndpointsProperty);
forwardAdapter->addServantLocator(forward, "");
forwardAdapter->activate();
diff --git a/cpp/src/IceStorm/Server.cpp b/cpp/src/IceStorm/Server.cpp
index 1b4e8455585..b5ff66fde5b 100644
--- a/cpp/src/IceStorm/Server.cpp
+++ b/cpp/src/IceStorm/Server.cpp
@@ -70,13 +70,13 @@ main(int argc, char* argv[])
usage(argv[0]);
return EXIT_FAILURE;
}
- dbdir = argv[i+1];
+ dbdir = argv[i + 1];
//
// Consume arguments
//
while (i < argc - 2)
{
- argv[i] = argv[i+2];
+ argv[i] = argv[i + 2];
++i;
}
argc -= 2;
@@ -87,6 +87,7 @@ main(int argc, char* argv[])
}
}
+ addArgumentPrefix("IcePack");
Server app(dbdir);
return app.main(argc, argv);
}
@@ -129,7 +130,8 @@ IceStorm::Server::runFreeze(int argc, char* argv[], const Freeze::DBEnvironmentP
//PropertiesPtr properties = communicator()->getProperties();
TraceLevelsPtr traceLevels = new TraceLevels(communicator()->getProperties());
- ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TopicManager");
+ ObjectAdapterPtr adapter = communicator()->createObjectAdapterFromProperty("TopicManager",
+ "IceStorm.TopicManager.Endpoints");
ObjectPtr object = new TopicManagerI(communicator(), adapter, traceLevels, dbTopicManager);
adapter->add(object, stringToIdentity("TopicManager"));
adapter->activate();
diff --git a/cpp/src/IceWall/Server.cpp b/cpp/src/IceWall/Server.cpp
index b6a79f75baf..19f993ed582 100644
--- a/cpp/src/IceWall/Server.cpp
+++ b/cpp/src/IceWall/Server.cpp
@@ -26,6 +26,7 @@ public:
int
main(int argc, char* argv[])
{
+ addArgumentPrefix("IceWall");
Server app;
return app.main(argc, argv);
}
@@ -66,7 +67,7 @@ Server::run(int argc, char* argv[])
PropertiesPtr properties = communicator()->getProperties();
- const char* routerEndpointsProperty = "Ice.Adapter.Router.Endpoints";
+ const char* routerEndpointsProperty = "IceWall.Router.Endpoints";
string routerEndpoints = properties->getProperty(routerEndpointsProperty);
if (routerEndpoints.empty())
{
@@ -76,7 +77,8 @@ Server::run(int argc, char* argv[])
ServantLocatorPtr router = new Router;
- ObjectAdapterPtr routerAdapter = communicator()->createObjectAdapter("Router");
+ ObjectAdapterPtr routerAdapter = communicator()->createObjectAdapterFromProperty("Router",
+ routerEndpointsProperty);
routerAdapter->addServantLocator(router, "");
routerAdapter->activate();
diff --git a/cpp/test/Ice/locationForward/Server.cpp b/cpp/test/Ice/locationForward/Server.cpp
index f5052e6faba..45d88844d84 100644
--- a/cpp/test/Ice/locationForward/Server.cpp
+++ b/cpp/test/Ice/locationForward/Server.cpp
@@ -81,7 +81,6 @@ main(int argc, char* argv[])
{
communicator = Ice::initialize(argc, argv);
status = run(argc, argv, communicator);
-
}
catch(const Ice::Exception& ex)
{
diff --git a/cpp/test/Ice/locationForward/run.py b/cpp/test/Ice/locationForward/run.py
index 836a33dc5cf..25a9152edfe 100755
--- a/cpp/test/Ice/locationForward/run.py
+++ b/cpp/test/Ice/locationForward/run.py
@@ -30,27 +30,23 @@ base = 12340
updatedServerOptions = TestUtil.serverOptions.replace("TOPLEVELDIR", toplevel)
updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
-if TestUtil.protocol == "ssl":
- secure = " -s "
-else:
- secure = ""
-
serverPipes = { }
for i in range(0, num):
if i + 1 < num:
- s = " --fwd \"test" + secure + ":" + TestUtil.protocol + " -t 2000 -p %d\" %d" \
- % ((base + i + 1), (base + i))
+ s = " --fwd \"test:default -t 2000 -p %d\" %d" % ((base + i + 1), (base + i))
else:
s = " %d" % (base + i)
print "starting server #%d..." % (i + 1),
- serverPipes[i] = os.popen(server + updatedServerOptions + s)
+ command = server + updatedServerOptions + s;
+ serverPipes[i] = os.popen(command)
TestUtil.getServerPid(serverPipes[i])
TestUtil.getAdapterReady(serverPipes[i])
print "ok"
print "starting client...",
s = " %d %d" % (base, (base + num - 1))
-clientPipe = os.popen(client + updatedClientOptions + s)
+command = client + updatedClientOptions + s
+clientPipe = os.popen(command)
output = clientPipe.readline()
if not output:
print "failed!"
diff --git a/cpp/test/IcePack/simple/run.py b/cpp/test/IcePack/simple/run.py
index 67ded103f8f..b287b322306 100755
--- a/cpp/test/IcePack/simple/run.py
+++ b/cpp/test/IcePack/simple/run.py
@@ -27,24 +27,19 @@ updatedServerOptions = TestUtil.serverOptions.replace("TOPLEVELDIR", toplevel)
updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel)
updatedClientServerOptions = TestUtil.clientServerOptions.replace("TOPLEVELDIR", toplevel)
-command = icePack + updatedClientServerOptions + ' --nowarn' + \
- r' "--Ice.Adapter.Forward.Endpoints=default -p 12346 -t 5000"' + \
- r' "--Ice.Adapter.Admin.Endpoints=default -p 12347 -t 5000"'
print "starting icepack...",
+command = icePack + updatedClientServerOptions + ' --nowarn' + \
+ r' "--IcePack.Forward.Endpoints=default -p 12346 -t 5000"' + \
+ r' "--IcePack.Admin.Endpoints=default -p 12347 -t 5000"'
icePackPipe = os.popen(command)
TestUtil.getServerPid(icePackPipe)
TestUtil.getAdapterReady(icePackPipe)
TestUtil.getAdapterReady(icePackPipe)
print "ok"
-secure = ""
-if TestUtil.protocol == "ssl":
- secure = " -s "
-
-command = icePackAdmin + updatedClientOptions + \
- r' "--Ice.Adapter.Admin.Endpoints=' + TestUtil.protocol + ' -p 12347 -t 5000"' + \
- r' -e "add \"test' + secure + ':' + TestUtil.protocol + r' -p 12345 -t 5000\""'
print "registering server with icepack...",
+command = icePackAdmin + updatedClientOptions + \
+ r' "--IcePack.Admin.Endpoints=default -p 12347 -t 5000" -e "add \"test:default -p 12345 -t 5000\""'
icePackAdminPipe = os.popen(command)
icePackAdminPipe.close()
print "ok"
@@ -57,16 +52,15 @@ TestUtil.collocatedTest(toplevel, name)
# This test doesn't work under Windows.
#
if sys.platform != "cygwin" and sys.platform != "win32":
- testdir = os.path.join(toplevel, "test", "IcePack", "simple")
+ testdir = os.path.join(toplevel, "test", "IcePack", "simple")
server = os.path.join(testdir, "server")
client = os.path.join(testdir, "client")
- command = icePackAdmin + updatedClientOptions + \
- r' "--Ice.Adapter.Admin.Endpoints=' + TestUtil.protocol + ' -p 12347 -t 5000"' + \
- r' -e "add \"test' + secure + ':' + TestUtil.protocol + r' -p 12345 -t 5000\"' + \
- ' ' + server + updatedServerOptions + '"'
print "registering server with icepack for automatic activation...",
+ command = icePackAdmin + updatedClientOptions + \
+ r' "--IcePack.Admin.Endpoints=default -p 12347 -t 5000"' + \
+ r' -e "add \"test:default -p 12345 -t 5000\" ' + server + updatedServerOptions + '"'
icePackAdminPipe = os.popen(command)
icePackAdminPipe.close()
print "ok"
@@ -87,9 +81,9 @@ if sys.platform != "cygwin" and sys.platform != "win32":
break;
print output,
-command = icePackAdmin + updatedClientOptions + \
- r' "--Ice.Adapter.Admin.Endpoints=' + TestUtil.protocol + r' -p 12347 -t 5000"' + r' -e "shutdown"'
print "shutting down icepack...",
+command = icePackAdmin + updatedClientOptions + \
+ r' "--IcePack.Admin.Endpoints=default -p 12347 -t 5000" -e "shutdown"'
icePackAdminPipe = os.popen(command)
icePackAdminPipe.close()
print "ok"