summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rwxr-xr-xcpp/allTests.py1
-rw-r--r--cpp/demo/IceGrid/icebox/.gitignore2
-rw-r--r--cpp/demo/IceGrid/icebox/Makefile3
-rw-r--r--cpp/src/IceBox/ServiceManagerI.cpp208
-rw-r--r--cpp/src/IceBox/ServiceManagerI.h3
-rw-r--r--cpp/test/IceBox/Makefile22
-rw-r--r--cpp/test/IceBox/Makefile.mak20
-rw-r--r--cpp/test/IceBox/configuration/.depend7
-rw-r--r--cpp/test/IceBox/configuration/.gitignore7
-rw-r--r--cpp/test/IceBox/configuration/AllTests.cpp91
-rw-r--r--cpp/test/IceBox/configuration/Client.cpp64
-rw-r--r--cpp/test/IceBox/configuration/Makefile46
-rw-r--r--cpp/test/IceBox/configuration/Makefile.mak72
-rw-r--r--cpp/test/IceBox/configuration/Service.cpp70
-rw-r--r--cpp/test/IceBox/configuration/Test.ice27
-rw-r--r--cpp/test/IceBox/configuration/TestI.cpp29
-rw-r--r--cpp/test/IceBox/configuration/TestI.h29
-rw-r--r--cpp/test/IceBox/configuration/config.icebox13
-rw-r--r--cpp/test/IceBox/configuration/config.icebox216
-rw-r--r--cpp/test/IceBox/configuration/config.service19
-rw-r--r--cpp/test/IceBox/configuration/config.service1-210
-rw-r--r--cpp/test/IceBox/configuration/config.service24
-rw-r--r--cpp/test/IceBox/configuration/config.service2-27
-rw-r--r--cpp/test/IceBox/configuration/config.service38
-rw-r--r--cpp/test/IceBox/configuration/config.service46
-rwxr-xr-xcpp/test/IceBox/configuration/run.py38
-rw-r--r--cpp/test/Makefile1
-rw-r--r--cpp/test/Makefile.mak1
28 files changed, 732 insertions, 82 deletions
diff --git a/cpp/allTests.py b/cpp/allTests.py
index aeb434a38e9..dbc4768ed3e 100755
--- a/cpp/allTests.py
+++ b/cpp/allTests.py
@@ -57,6 +57,7 @@ tests = [
"Ice/interceptor",
"Ice/stringConverter",
"IceSSL/configuration",
+ "IceBox/configuration",
"Freeze/dbmap",
"Freeze/complex",
"Freeze/evictor",
diff --git a/cpp/demo/IceGrid/icebox/.gitignore b/cpp/demo/IceGrid/icebox/.gitignore
index 20a7b29a4a9..2169402e345 100644
--- a/cpp/demo/IceGrid/icebox/.gitignore
+++ b/cpp/demo/IceGrid/icebox/.gitignore
@@ -5,3 +5,5 @@ client
libHelloService.so
Hello.cpp
Hello.h
+db/node/*
+db/registry/*
diff --git a/cpp/demo/IceGrid/icebox/Makefile b/cpp/demo/IceGrid/icebox/Makefile
index 84a5d0ebf2e..feb43ddcbcb 100644
--- a/cpp/demo/IceGrid/icebox/Makefile
+++ b/cpp/demo/IceGrid/icebox/Makefile
@@ -42,4 +42,7 @@ $(CLIENT): $(OBJS) $(COBJS)
rm -f $@
$(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(LIBS)
+clean::
+ -rm -rf db/node/* db/registry/*
+
include .depend
diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp
index 54707394347..523d1593aa4 100644
--- a/cpp/src/IceBox/ServiceManagerI.cpp
+++ b/cpp/src/IceBox/ServiceManagerI.cpp
@@ -383,7 +383,7 @@ IceBox::ServiceManagerI::start()
for(vector<ServiceInfo>::iterator r = _services.begin(); r != _services.end(); ++r)
{
const ServiceInfo& info = *r;
- CommunicatorPtr communicator = info.communicator != 0 ? info.communicator : _communicator;
+ CommunicatorPtr communicator = info.communicator != 0 ? info.communicator : _sharedCommunicator;
_communicator->addAdminFacet(new PropertiesAdminI(communicator->getProperties()),
"IceBox.Service." + info.name + ".Properties");
}
@@ -542,100 +542,54 @@ IceBox::ServiceManagerI::start(const string& service, const string& entryPoint,
// add the service properties to the shared commnunicator
// property set.
//
- PropertiesPtr properties = _communicator->getProperties();
+ Ice::CommunicatorPtr communicator;
+ if(_communicator->getProperties()->getPropertyAsInt("IceBox.UseSharedCommunicator." + service) > 0)
+ {
+ if(!_sharedCommunicator)
+ {
+ Ice::StringSeq dummy = Ice::StringSeq();
+ _sharedCommunicator = createCommunicator("", dummy);
+ }
+ communicator = _sharedCommunicator;
+ PropertiesPtr properties = _sharedCommunicator->getProperties();
- if(properties->getPropertyAsInt("IceBox.UseSharedCommunicator." + service) > 0)
- {
- PropertiesPtr serviceProperties = createProperties(info.args, properties);
+ PropertiesPtr svcProperties = createProperties(info.args, properties);
//
- // Erase properties in 'properties'
+ // Erase properties from the shared communicator which don't exist in the
+ // service properties (which include the shared communicator properties
+ // overriden by the service properties).
//
PropertyDict allProps = properties->getPropertiesForPrefix("");
for(PropertyDict::iterator p = allProps.begin(); p != allProps.end(); ++p)
{
- if(serviceProperties->getProperty(p->first) == "")
+ if(svcProperties->getProperty(p->first) == "")
{
properties->setProperty(p->first, "");
}
}
-
+
//
- // Put all serviceProperties into 'properties'
+ // Add the service properties to the shared communicator properties.
//
- properties->parseCommandLineOptions("", serviceProperties->getCommandLineOptions());
+ PropertyDict props = svcProperties->getPropertiesForPrefix("");
+ for(PropertyDict::const_iterator p = props.begin(); p != props.end(); ++p)
+ {
+ properties->setProperty(p->first, p->second);
+ }
//
- // Parse <service>.* command line options
- // (the Ice command line options were parse by the createProperties above)
+ // Parse <service>.* command line options (the Ice command line options
+ // were parsed by the createProperties above)
//
info.args = properties->parseCommandLineOptions(service, info.args);
}
else
{
- string name = properties->getProperty("Ice.ProgramName");
- PropertiesPtr serviceProperties;
- if(properties->getPropertyAsInt("IceBox.InheritProperties") > 0)
- {
- //
- // Inherit all except Ice.Admin.Endpoints!
- //
- serviceProperties = properties->clone();
- serviceProperties->setProperty("Ice.Admin.Endpoints", "");
- serviceProperties = createProperties(info.args, serviceProperties);
- }
- else
- {
- serviceProperties = createProperties(info.args);
- }
-
- if(name == serviceProperties->getProperty("Ice.ProgramName"))
- {
- //
- // If the service did not set its own program-name, and
- // the icebox program-name != service, append the service name to the
- // program name.
- //
- if(name != service)
- {
- name = name.empty() ? service : name + "-" + service;
- }
- serviceProperties->setProperty("Ice.ProgramName", name);
- }
-
- //
- // Parse <service>.* command line options
- // (the Ice command line options were parsed by the createProperties above)
- //
- info.args = serviceProperties->parseCommandLineOptions(service, info.args);
-
- //
- // Remaining command line options are passed to the
- // communicator with argc/argv. This is necessary for Ice
- // plugin properties (e.g.: IceSSL).
- //
- int argc = static_cast<int>(info.args.size());
- char** argv = new char*[argc + 1];
- int i = 0;
- for(Ice::StringSeq::const_iterator p = info.args.begin(); p != info.args.end(); ++p, ++i)
- {
- argv[i] = strdup(p->c_str());
- }
- argv[argc] = 0;
-
- InitializationData initData;
- initData.properties = serviceProperties;
- info.communicator = initialize(argc, argv, initData);
-
- for(i = 0; i < argc + 1; ++i)
- {
- free(argv[i]);
- }
- delete[] argv;
+ info.communicator = createCommunicator(service, info.args);
+ communicator = info.communicator;
}
-
- CommunicatorPtr communicator = info.communicator ? info.communicator : _communicator;
//
// Start the service.
@@ -754,20 +708,20 @@ IceBox::ServiceManagerI::stopAll()
for(p = _services.rbegin(); p != _services.rend(); ++p)
{
ServiceInfo& info = *p;
+
+ try
+ {
+ _communicator->removeAdminFacet("IceBox.Service." + info.name + ".Properties");
+ }
+ catch(const LocalException&)
+ {
+ // Ignored
+ }
if(info.communicator)
{
try
{
- _communicator->removeAdminFacet("IceBox.Service." + info.name + ".Properties");
- }
- catch(const LocalException&)
- {
- // Ignored
- }
-
- try
- {
info.communicator->shutdown();
info.communicator->waitForShutdown();
}
@@ -840,6 +794,20 @@ IceBox::ServiceManagerI::stopAll()
}
}
+ if(_sharedCommunicator)
+ {
+ try
+ {
+ _sharedCommunicator->destroy();
+ }
+ catch(const std::exception& ex)
+ {
+ Warning out(_logger);
+ out << "ServiceManager: unknown exception while destroying shared communicator:\n" << ex.what();
+ }
+ _sharedCommunicator = 0;
+ }
+
_services.clear();
set<ServiceObserverPrx> observers = _observers;
@@ -894,3 +862,79 @@ IceBox::ServiceManagerI::observerRemoved(const ServiceObserverPrx& observer, con
<< "\nafter catching " << ex.what();
}
}
+
+Ice::CommunicatorPtr
+IceBox::ServiceManagerI::createCommunicator(const string& service, Ice::StringSeq& args)
+{
+ PropertiesPtr communicatorProperties = _communicator->getProperties();
+
+ //
+ // Create the service properties. We use the communicator properties as the default
+ // properties if IceBox.InheritProperties is set.
+ //
+ PropertiesPtr properties;
+ if(communicatorProperties->getPropertyAsInt("IceBox.InheritProperties") > 0)
+ {
+ properties = communicatorProperties->clone();
+ properties->setProperty("Ice.Admin.Endpoints", ""); // Inherit all except Ice.Admin.Endpoints!
+ }
+ else
+ {
+ properties = createProperties();
+ }
+
+ //
+ // Set the default program name for the service properties. By default it's
+ // the IceBox program name + "-" + the service name, or just the IceBox
+ // program name if we're creating the shared communicator (service == "").
+ //
+ string programName = communicatorProperties->getProperty("Ice.ProgramName");
+ if(service.empty())
+ {
+ if(programName.empty())
+ {
+ properties->setProperty("Ice.ProgramName", "SharedCommunicator");
+ }
+ else
+ {
+ properties->setProperty("Ice.ProgramName", programName + "-SharedCommunicator");
+ }
+ }
+ else
+ {
+ if(programName.empty())
+ {
+ properties->setProperty("Ice.ProgramName", service);
+ }
+ else
+ {
+ properties->setProperty("Ice.ProgramName", programName + "-" + service);
+ }
+ }
+
+ if(!args.empty())
+ {
+ //
+ // Create the service properties with the given service arguments. This should
+ // read the service config file if it's specified with --Ice.Config.
+ //
+ properties = createProperties(args, properties);
+
+ if(!service.empty())
+ {
+ //
+ // Next, parse the service "<service>.*" command line options (the Ice command
+ // line options were parsed by the createProperties above)
+ //
+ args = properties->parseCommandLineOptions(service, args);
+ }
+ }
+
+ //
+ // Remaining command line options are passed to the communicator. This is
+ // necessary for Ice plugin properties (e.g.: IceSSL).
+ //
+ InitializationData initData;
+ initData.properties = properties;
+ return initialize(args, initData);
+}
diff --git a/cpp/src/IceBox/ServiceManagerI.h b/cpp/src/IceBox/ServiceManagerI.h
index e4131a82bb0..859d4bd907c 100644
--- a/cpp/src/IceBox/ServiceManagerI.h
+++ b/cpp/src/IceBox/ServiceManagerI.h
@@ -63,7 +63,10 @@ private:
void servicesStopped(const std::vector<std::string>&, const std::set<ServiceObserverPrx>&);
void observerRemoved(const ServiceObserverPrx&, const std::exception&);
+ Ice::CommunicatorPtr createCommunicator(const std::string&, Ice::StringSeq&);
+
::Ice::CommunicatorPtr _communicator;
+ ::Ice::CommunicatorPtr _sharedCommunicator;
::Ice::LoggerPtr _logger;
::Ice::StringSeq _argv; // Filtered server argument vector, not including program name
std::vector<ServiceInfo> _services;
diff --git a/cpp/test/IceBox/Makefile b/cpp/test/IceBox/Makefile
new file mode 100644
index 00000000000..b53ff7c7069
--- /dev/null
+++ b/cpp/test/IceBox/Makefile
@@ -0,0 +1,22 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+top_srcdir = ../..
+
+include $(top_srcdir)/config/Make.rules
+
+
+SUBDIRS = configuration
+
+$(EVERYTHING)::
+ @for subdir in $(SUBDIRS); \
+ do \
+ echo "making $@ in $$subdir"; \
+ ( cd $$subdir && $(MAKE) $@ ) || exit 1; \
+ done
diff --git a/cpp/test/IceBox/Makefile.mak b/cpp/test/IceBox/Makefile.mak
new file mode 100644
index 00000000000..01713251699
--- /dev/null
+++ b/cpp/test/IceBox/Makefile.mak
@@ -0,0 +1,20 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+top_srcdir = ..\..
+
+!include $(top_srcdir)/config/Make.rules.mak
+
+
+SUBDIRS = configuration
+
+$(EVERYTHING)::
+ @for %i in ( $(SUBDIRS) ) do \
+ @echo "making $@ in %i" && \
+ cmd /c "cd %i && $(MAKE) -nologo -f Makefile.mak $@" || exit 1
diff --git a/cpp/test/IceBox/configuration/.depend b/cpp/test/IceBox/configuration/.depend
new file mode 100644
index 00000000000..40ff507363b
--- /dev/null
+++ b/cpp/test/IceBox/configuration/.depend
@@ -0,0 +1,7 @@
+Test$(OBJEXT): Test.cpp Test.h ../../../include/Ice/LocalObjectF.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Time.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/Ice/Config.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GCShared.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/RequestHandlerF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/StreamF.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/Ice/InstanceF.h ../../../include/Ice/BasicStream.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/Ice/StringConverter.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/Direct.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/LocalException.h ../../../include/Ice/ObjectFactory.h ../../../include/IceUtil/Iterator.h ../../../include/IceUtil/ScopedArray.h
+Client$(OBJEXT): Client.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Time.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/Ice/Config.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GCShared.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/RequestHandlerF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/StreamF.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/Ice/BasicStream.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/IceUtil/Timer.h ../../../include/IceUtil/Thread.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/Direct.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ImplicitContextF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/FacetMap.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../../include/Ice/ImplicitContext.h ../../../include/Ice/Locator.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/ProcessF.h ../../../include/Ice/Router.h ../../../include/Ice/DispatchInterceptor.h ../../../include/Ice/IconvStringConverter.h ../../../include/IceUtil/IceUtil.h ../../../include/IceUtil/AbstractMutex.h ../../../include/IceUtil/Algorithm.h ../../../include/IceUtil/ArgVector.h ../../../include/IceUtil/Base64.h ../../../include/IceUtil/Cache.h ../../../include/IceUtil/CountDownLatch.h ../../../include/IceUtil/CtrlCHandler.h ../../../include/IceUtil/InputUtil.h ../../../include/IceUtil/Iterator.h ../../../include/IceUtil/MD5.h ../../../include/IceUtil/Options.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/OutputUtil.h ../../../include/IceUtil/RWRecMutex.h ../../../include/IceUtil/Random.h ../../../include/IceUtil/ScopedArray.h ../../../include/IceUtil/StringUtil.h ../../../include/IceUtil/UUID.h ../../include/TestCommon.h Test.h
+AllTests$(OBJEXT): AllTests.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Time.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/Ice/Config.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GCShared.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/RequestHandlerF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/StreamF.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/Ice/BasicStream.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/IceUtil/Timer.h ../../../include/IceUtil/Thread.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/Direct.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ImplicitContextF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/FacetMap.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../../include/Ice/ImplicitContext.h ../../../include/Ice/Locator.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/ProcessF.h ../../../include/Ice/Router.h ../../../include/Ice/DispatchInterceptor.h ../../../include/Ice/IconvStringConverter.h ../../include/TestCommon.h Test.h
+TestI$(OBJEXT): TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Time.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/Ice/Config.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GCShared.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/RequestHandlerF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/StreamF.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/Ice/BasicStream.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/IceUtil/Timer.h ../../../include/IceUtil/Thread.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/Direct.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ImplicitContextF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/FacetMap.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../../include/Ice/ImplicitContext.h ../../../include/Ice/Locator.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/ProcessF.h ../../../include/Ice/Router.h ../../../include/Ice/DispatchInterceptor.h ../../../include/Ice/IconvStringConverter.h TestI.h Test.h
+Service$(OBJEXT): Service.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Time.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/Ice/Config.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GCShared.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/RequestHandlerF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/StreamF.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/Ice/BasicStream.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/IceUtil/Timer.h ../../../include/IceUtil/Thread.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/Direct.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ImplicitContextF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/FacetMap.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../../include/Ice/ImplicitContext.h ../../../include/Ice/Locator.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/ProcessF.h ../../../include/Ice/Router.h ../../../include/Ice/DispatchInterceptor.h ../../../include/Ice/IconvStringConverter.h ../../../include/IceBox/IceBox.h ../../../include/Ice/SliceChecksumDict.h TestI.h Test.h
+Test.cpp: Test.ice ../../../../slice/Ice/BuiltinSequences.ice
+Test.ice: $(SLICE2CPP) $(SLICEPARSERLIB)
diff --git a/cpp/test/IceBox/configuration/.gitignore b/cpp/test/IceBox/configuration/.gitignore
new file mode 100644
index 00000000000..bc5fb97a328
--- /dev/null
+++ b/cpp/test/IceBox/configuration/.gitignore
@@ -0,0 +1,7 @@
+// Generated by makegitignore.py
+
+// IMPORTANT: Do not edit this file -- any edits made here will be lost!
+client
+libTestService.so
+Test.cpp
+Test.h
diff --git a/cpp/test/IceBox/configuration/AllTests.cpp b/cpp/test/IceBox/configuration/AllTests.cpp
new file mode 100644
index 00000000000..4fb796d59dc
--- /dev/null
+++ b/cpp/test/IceBox/configuration/AllTests.cpp
@@ -0,0 +1,91 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+
+using namespace std;
+using namespace Test;
+
+void
+allTests(const Ice::CommunicatorPtr& communicator)
+{
+ TestIntfPrx service1 = TestIntfPrx::uncheckedCast(communicator->stringToProxy("test:default -p 12010"));
+ TestIntfPrx service2 = TestIntfPrx::uncheckedCast(communicator->stringToProxy("test:default -p 12011"));
+ TestIntfPrx service3 = TestIntfPrx::uncheckedCast(communicator->stringToProxy("test:default -p 12012"));
+ TestIntfPrx service4 = TestIntfPrx::uncheckedCast(communicator->stringToProxy("test:default -p 12013"));
+
+ if(service1->getProperty("IceBox.InheritProperties") == "")
+ {
+ cout << "testing service properties... " << flush;
+
+ test(service1->getProperty("Ice.ProgramName") == "IceBox-Service1");
+ test(service1->getProperty("Service") == "1");
+ test(service1->getProperty("Service1.Ovrd") == "2");
+ test(service1->getProperty("Service1.Unset") == "");
+ test(service1->getProperty("Arg") == "1");
+
+ Ice::StringSeq args1;
+ args1.push_back("-a");
+ args1.push_back("--Arg=2");
+ test(service1->getArgs() == args1);
+
+ test(service2->getProperty("Ice.ProgramName") == "Test");
+ test(service2->getProperty("Service") == "2");
+ test(service2->getProperty("Service1.ArgProp") == "");
+ test(service2->getProperty("IceBox.InheritProperties") == "1");
+
+ Ice::StringSeq args2;
+ args2.push_back("--Service1.ArgProp=1");
+ test(service2->getArgs() == args2);
+
+ cout << "ok" << endl;
+
+ cout << "testing with shared communicator... " << flush;
+
+ test(service3->getProperty("Ice.ProgramName") == "IceBox-SharedCommunicator");
+ test(service3->getProperty("Service") == "4");
+ test(service3->getProperty("Prop") == "");
+ test(service3->getProperty("Service3.Prop") == "1");
+ test(service3->getProperty("Ice.Trace.Network") == "3");
+
+ test(service4->getProperty("Ice.ProgramName") == "IceBox-SharedCommunicator");
+ test(service4->getProperty("Service") == "4");
+ test(service4->getProperty("Prop") == "");
+ test(service4->getProperty("Service3.Prop") == "1");
+ test(service4->getProperty("Ice.Trace.Network") == "3");
+
+ Ice::StringSeq args4;
+ args4.push_back("--Service3.Prop=2");
+ test(service4->getArgs() == args4);
+
+ cout << "ok" << endl;
+ }
+ else
+ {
+ cout << "testing property inheritance... " << flush;
+
+ test(service1->getProperty("Ice.ProgramName") == "IceBox2-Service1");
+ test(service1->getProperty("ServerProp") == "1");
+ test(service1->getProperty("OverrideMe") == "2");
+ test(service1->getProperty("UnsetMe") == "");
+ test(service1->getProperty("Service1.Prop") == "1");
+ test(service1->getProperty("Service1.ArgProp") == "2");
+
+ test(service2->getProperty("Ice.ProgramName") == "IceBox2-SharedCommunicator");
+ test(service2->getProperty("ServerProp") == "1");
+ test(service2->getProperty("OverrideMe") == "3");
+ test(service2->getProperty("UnsetMe") == "");
+ test(service2->getProperty("Service2.Prop") == "1");
+
+ cout << "ok" << endl;
+ }
+}
+
diff --git a/cpp/test/IceBox/configuration/Client.cpp b/cpp/test/IceBox/configuration/Client.cpp
new file mode 100644
index 00000000000..66742b16a9c
--- /dev/null
+++ b/cpp/test/IceBox/configuration/Client.cpp
@@ -0,0 +1,64 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <IceUtil/IceUtil.h>
+#include <TestCommon.h>
+#include <Test.h>
+
+using namespace std;
+using namespace Test;
+
+int
+run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
+{
+ void allTests(const Ice::CommunicatorPtr&);
+ allTests(communicator);
+
+ //
+ // Shutdown the IceBox server.
+ //
+ Ice::ProcessPrx::uncheckedCast(communicator->stringToProxy("DemoIceBox/admin -f Process:tcp -p 9996"))->shutdown();
+
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ communicator = Ice::initialize(argc, argv);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if(communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/IceBox/configuration/Makefile b/cpp/test/IceBox/configuration/Makefile
new file mode 100644
index 00000000000..7feb923a4a6
--- /dev/null
+++ b/cpp/test/IceBox/configuration/Makefile
@@ -0,0 +1,46 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+top_srcdir = ../../..
+
+CLIENT = client
+
+SVCFILENAME = $(call mklibfilename,TestService)
+SVCSONAME = $(call mksoname,TestService)
+
+TARGETS = $(CLIENT) $(SVCFILENAME)
+
+OBJS = Test.o \
+
+COBJS = Client.o \
+ AllTests.o
+
+SERVICE_OBJS = TestI.o \
+ Service.o
+
+SRCS = $(OBJS:.o=.cpp) \
+ $(COBJS:.o=.cpp) \
+ $(SERVICE_OBJS:.o=.cpp) \
+
+SLICE_SRCS = Test.ice
+
+include $(top_srcdir)/config/Make.rules
+
+CPPFLAGS := -I. -I../../include $(CPPFLAGS)
+LINKWITH := -lIceBox $(BZIP2_RPATH_LINK) -lIce -lIceUtil
+
+$(CLIENT): $(OBJS) $(COBJS)
+ rm -f $@
+ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(LIBS)
+
+$(SVCFILENAME): $(OBJS) $(SERVICE_OBJS)
+ rm -f $@
+ $(call mkshlib,$@,$(SVCSONAME),$(OBJS) $(SERVICE_OBJS), $(LINKWITH))
+
+include .depend
diff --git a/cpp/test/IceBox/configuration/Makefile.mak b/cpp/test/IceBox/configuration/Makefile.mak
new file mode 100644
index 00000000000..a43f0d936e4
--- /dev/null
+++ b/cpp/test/IceBox/configuration/Makefile.mak
@@ -0,0 +1,72 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+top_srcdir = ..\..\..
+
+CLIENT = client.exe
+
+LIBNAME = testservice$(LIBSUFFIX).lib
+DLLNAME = testservice$(LIBSUFFIX).dll
+
+TARGETS = $(CLIENT) $(LIBNAME) $(DLLNAME)
+
+OBJS = Test.obj
+
+COBJS = Client.obj \
+ AllTests.obj
+
+SERVICE_OBJS = TestI.obj \
+ Service.obj
+
+SRCS = $(OBJS:.obj=.cpp) \
+ $(COBJS:.obj=.cpp) \
+ $(SERVICE_OBJS:.obj=.cpp)
+
+!include $(top_srcdir)/config/Make.rules.mak
+
+CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+LINKWITH = $(LIBS) icebox$(LIBSUFFIX).lib
+
+!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
+CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
+SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
+!endif
+
+$(LIBNAME) : $(DLLNAME)
+
+$(DLLNAME): $(OBJS) $(SERVICE_OBJS)
+ $(LINK) $(LD_DLLFLAGS) $(PDBFLAGS) $(SETARGV) $(OBJS) $(SERVICE_OBJS) $(PREOUT)$(DLLNAME) $(PRELIBS)$(LINKWITH) \
+ freeze$(LIBSUFFIX).lib
+ @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
+ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest
+ @if exist $(DLLNAME:.dll=.exp) del /q $(DLLNAME:.dll=.exp)
+
+$(CLIENT): $(OBJS) $(COBJS)
+ $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(OBJS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) \
+ icegrid$(LIBSUFFIX).lib glacier2$(LIBSUFFIX).lib
+ @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
+ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
+
+clean::
+ del /q Test.cpp Test.h
+
+!if "$(OPTIMIZE)" == "yes"
+
+all::
+ @echo release > build.txt
+
+!else
+
+all::
+ @echo debug > build.txt
+
+!endif
+
+!include .depend
diff --git a/cpp/test/IceBox/configuration/Service.cpp b/cpp/test/IceBox/configuration/Service.cpp
new file mode 100644
index 00000000000..3f2e5bf3d12
--- /dev/null
+++ b/cpp/test/IceBox/configuration/Service.cpp
@@ -0,0 +1,70 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <IceBox/IceBox.h>
+#include <TestI.h>
+
+#ifndef TEST_SERVICE_API
+# define TEST_SERVICE_API ICE_DECLSPEC_EXPORT
+#endif
+
+
+using namespace std;
+using namespace Ice;
+
+class TEST_SERVICE_API ServiceI : public ::IceBox::Service
+{
+public:
+
+ ServiceI();
+ virtual ~ServiceI();
+
+ virtual void start(const string&,
+ const CommunicatorPtr&,
+ const StringSeq&);
+
+ virtual void stop();
+};
+
+extern "C"
+{
+
+//
+// Factory function
+//
+TEST_SERVICE_API ::IceBox::Service*
+create(CommunicatorPtr communicator)
+{
+ return new ServiceI;
+}
+
+}
+
+ServiceI::ServiceI()
+{
+}
+
+ServiceI::~ServiceI()
+{
+}
+
+void
+ServiceI::start(const string& name, const CommunicatorPtr& communicator, const StringSeq& args)
+{
+ Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter(name + "OA");
+ adapter->add(new TestI(args), communicator->stringToIdentity("test"));
+ adapter->activate();
+}
+
+void
+ServiceI::stop()
+{
+}
+
diff --git a/cpp/test/IceBox/configuration/Test.ice b/cpp/test/IceBox/configuration/Test.ice
new file mode 100644
index 00000000000..3e00f476a53
--- /dev/null
+++ b/cpp/test/IceBox/configuration/Test.ice
@@ -0,0 +1,27 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef TEST_ICE
+#define TEST_ICE
+
+#include <Ice/BuiltinSequences.ice>
+
+module Test
+{
+
+interface TestIntf
+{
+ string getProperty(string name);
+ Ice::StringSeq getArgs();
+
+};
+
+};
+
+#endif
diff --git a/cpp/test/IceBox/configuration/TestI.cpp b/cpp/test/IceBox/configuration/TestI.cpp
new file mode 100644
index 00000000000..a1b955bedb5
--- /dev/null
+++ b/cpp/test/IceBox/configuration/TestI.cpp
@@ -0,0 +1,29 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+
+using namespace Test;
+
+TestI::TestI(const Ice::StringSeq& args) : _args(args)
+{
+}
+
+std::string
+TestI::getProperty(const std::string& name, const Ice::Current& current)
+{
+ return current.adapter->getCommunicator()->getProperties()->getProperty(name);
+}
+
+Ice::StringSeq
+TestI::getArgs(const Ice::Current& current)
+{
+ return _args;
+}
diff --git a/cpp/test/IceBox/configuration/TestI.h b/cpp/test/IceBox/configuration/TestI.h
new file mode 100644
index 00000000000..aa785722c96
--- /dev/null
+++ b/cpp/test/IceBox/configuration/TestI.h
@@ -0,0 +1,29 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef TEST_I_H
+#define TEST_I_H
+
+#include <Test.h>
+
+class TestI : public ::Test::TestIntf
+{
+public:
+
+ TestI(const Ice::StringSeq&);
+
+ virtual std::string getProperty(const std::string&, const Ice::Current&);
+ virtual Ice::StringSeq getArgs(const Ice::Current&);
+
+private:
+
+ const Ice::StringSeq _args;
+};
+
+#endif
diff --git a/cpp/test/IceBox/configuration/config.icebox b/cpp/test/IceBox/configuration/config.icebox
new file mode 100644
index 00000000000..e0730c3feb9
--- /dev/null
+++ b/cpp/test/IceBox/configuration/config.icebox
@@ -0,0 +1,13 @@
+Ice.Admin.InstanceName=DemoIceBox
+Ice.Admin.Endpoints=tcp -p 9996 -h 127.0.0.1
+Ice.ProgramName=IceBox
+
+IceBox.Service.Service1=TestService:create --Ice.Config=config.service1 --Service1.ArgProp=1 --Service1.Ovrd=2 --Service1.Unset= -a --Arg=2
+IceBox.Service.Service2=TestService:create --Ice.Config=config.service2 --Service1.ArgProp=1 --IceBox.InheritProperties
+
+IceBox.UseSharedCommunicator.Service3=1
+IceBox.Service.Service3=TestService:create --Ice.Config=config.service3
+IceBox.UseSharedCommunicator.Service4=1
+IceBox.Service.Service4=TestService:create --Ice.Config=config.service4 --Service3.Prop=2 --Ice.Trace.Network=3
+
+IceBox.LoadOrder=Service1 Service2 Service3 Service4
diff --git a/cpp/test/IceBox/configuration/config.icebox2 b/cpp/test/IceBox/configuration/config.icebox2
new file mode 100644
index 00000000000..67b703e2205
--- /dev/null
+++ b/cpp/test/IceBox/configuration/config.icebox2
@@ -0,0 +1,16 @@
+Ice.Admin.InstanceName=DemoIceBox
+Ice.Admin.Endpoints=tcp -p 9996 -h 127.0.0.1
+Ice.ProgramName=IceBox2
+
+IceBox.InheritProperties=1
+
+ServerProp=1
+OverrideMe=1
+UnsetMe=1
+
+IceBox.Service.Service1=TestService:create --Ice.Config=config.service1-2 --Service1.ArgProp=2
+
+IceBox.UseSharedCommunicator.Service2=1
+IceBox.Service.Service2=TestService:create --Ice.Config=config.service2-2
+
+IceBox.LoadOrder=Service1 Service2
diff --git a/cpp/test/IceBox/configuration/config.service1 b/cpp/test/IceBox/configuration/config.service1
new file mode 100644
index 00000000000..0f1b89ee285
--- /dev/null
+++ b/cpp/test/IceBox/configuration/config.service1
@@ -0,0 +1,9 @@
+Service1OA.Endpoints=default -p 12010
+
+#Ice.ProgramName
+Service=1
+Service1.Ovrd=1
+Service1.Unset=1
+
+Arg=1
+ArgUnset=2
diff --git a/cpp/test/IceBox/configuration/config.service1-2 b/cpp/test/IceBox/configuration/config.service1-2
new file mode 100644
index 00000000000..b27f68baf91
--- /dev/null
+++ b/cpp/test/IceBox/configuration/config.service1-2
@@ -0,0 +1,10 @@
+Service1OA.Endpoints=default -p 12010
+
+#Ice.ProgramName
+Service1.Prop=1
+Service1.ArgProp=1
+
+OverrideMe=2
+UnsetMe=
+
+
diff --git a/cpp/test/IceBox/configuration/config.service2 b/cpp/test/IceBox/configuration/config.service2
new file mode 100644
index 00000000000..3c89982e0c4
--- /dev/null
+++ b/cpp/test/IceBox/configuration/config.service2
@@ -0,0 +1,4 @@
+Service2OA.Endpoints=default -p 12011
+
+Ice.ProgramName=Test
+Service=2
diff --git a/cpp/test/IceBox/configuration/config.service2-2 b/cpp/test/IceBox/configuration/config.service2-2
new file mode 100644
index 00000000000..0e9f15f74b1
--- /dev/null
+++ b/cpp/test/IceBox/configuration/config.service2-2
@@ -0,0 +1,7 @@
+Service2OA.Endpoints=default -p 12011
+
+#Ice.ProgramName
+Service2.Prop=1
+
+OverrideMe=3
+UnsetMe=
diff --git a/cpp/test/IceBox/configuration/config.service3 b/cpp/test/IceBox/configuration/config.service3
new file mode 100644
index 00000000000..6e6db3dd30b
--- /dev/null
+++ b/cpp/test/IceBox/configuration/config.service3
@@ -0,0 +1,8 @@
+Service3OA.Endpoints=default -p 12012
+
+#Ice.ProgramName
+Service=3
+Prop=2
+Service3.Prop=1
+
+Ice.Trace.Network=2
diff --git a/cpp/test/IceBox/configuration/config.service4 b/cpp/test/IceBox/configuration/config.service4
new file mode 100644
index 00000000000..5c1d0b0bee5
--- /dev/null
+++ b/cpp/test/IceBox/configuration/config.service4
@@ -0,0 +1,6 @@
+Service4OA.Endpoints=default -p 12013
+
+#Ice.ProgramName
+Service=4
+Prop=
+
diff --git a/cpp/test/IceBox/configuration/run.py b/cpp/test/IceBox/configuration/run.py
new file mode 100755
index 00000000000..e631a337b7c
--- /dev/null
+++ b/cpp/test/IceBox/configuration/run.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+import os, sys
+
+for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
+ toplevel = os.path.normpath(toplevel)
+ if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")):
+ break
+else:
+ raise "can't find toplevel directory!"
+
+sys.path.append(os.path.join(toplevel, "config"))
+import TestUtil
+import IceGridAdmin
+
+name = os.path.join("IceBox", "configuration")
+testdir = os.path.dirname(os.path.abspath(__file__))
+icebox = TestUtil.getIceBox(testdir);
+
+TestUtil.addLdPath(testdir)
+
+cwd = os.getcwd()
+os.chdir(testdir)
+
+TestUtil.clientServerTestWithOptionsAndNames(name, "--Ice.Config=config.icebox", "", icebox, "client")
+TestUtil.clientServerTestWithOptionsAndNames(name, "--Ice.Config=config.icebox2", "", icebox, "client")
+
+os.chdir(cwd)
+
+sys.exit(0)
diff --git a/cpp/test/Makefile b/cpp/test/Makefile
index 59dbc105836..9f7fde00912 100644
--- a/cpp/test/Makefile
+++ b/cpp/test/Makefile
@@ -15,6 +15,7 @@ SUBDIRS = IceUtil \
Slice \
Ice \
IceSSL \
+ IceBox \
IceStorm \
Freeze \
FreezeScript \
diff --git a/cpp/test/Makefile.mak b/cpp/test/Makefile.mak
index 1a9d6a70d3b..0e885de1e51 100644
--- a/cpp/test/Makefile.mak
+++ b/cpp/test/Makefile.mak
@@ -15,6 +15,7 @@ SUBDIRS = IceUtil \
Slice \
Ice \
IceSSL \
+ IceBox \
Glacier2 \
Freeze \
IceStorm \