From f265bcb8a0fbc8f946883ba419fa83c5dc40f36a Mon Sep 17 00:00:00 2001 From: Dwayne Boone Date: Fri, 2 Jan 2009 15:25:31 -0330 Subject: Bug 3621 - updated copyright to 2009 --- cpp/src/IceGrid/IceGridNode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpp/src/IceGrid/IceGridNode.cpp') diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp index 1cfef3fab8e..a2d4513d735 100644 --- a/cpp/src/IceGrid/IceGridNode.cpp +++ b/cpp/src/IceGrid/IceGridNode.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. -- cgit v1.2.3 From 92dfedd57038c4cd92dc575fa4cab3658e61559b Mon Sep 17 00:00:00 2001 From: Jose Date: Mon, 5 Jan 2009 23:35:32 +0100 Subject: Fix 3306 - Plugin -> Plug-in --- CHANGES | 6 +++--- RELEASE_NOTES | 4 ++-- cpp/CHANGES | 10 ++++----- cpp/config/convertssl.py | 2 +- cpp/include/Ice/LoggerUtil.h | 2 +- cpp/include/Ice/StringConverter.h | 2 +- cpp/include/IceSSL/Plugin.h | 10 ++++----- cpp/src/Ice/Exception.cpp | 2 +- cpp/src/Ice/Instance.cpp | 6 +++--- cpp/src/Ice/PluginManagerI.cpp | 18 ++++++++-------- cpp/src/Ice/StringConverter.cpp | 2 +- cpp/src/IceBox/ServiceManagerI.cpp | 2 +- cpp/src/IceGrid/IceGridNode.cpp | 2 +- cpp/src/IceSSL/AcceptorI.cpp | 4 ++-- cpp/src/IceSSL/ConnectorI.cpp | 4 ++-- cpp/src/IceSSL/Instance.cpp | 4 ++-- cpp/src/IceSSL/PluginI.cpp | 2 +- cpp/test/Ice/background/Client.cpp | 2 +- cpp/test/Ice/background/Server.cpp | 2 +- cs/CHANGES | 14 ++++++------ cs/INSTALL.VISUAL_C# | 4 ++-- cs/demo/Ice/hello/config.server | 2 +- cs/demo/IceBox/hello/config.client | 2 +- cs/demo/IceBox/hello/config.service | 2 +- cs/src/Ice/Instance.cs | 2 +- cs/src/Ice/PluginManagerI.cs | 22 +++++++++---------- cs/src/IceBox/ServiceManagerI.cs | 2 +- cs/src/IceSSL/AcceptorI.cs | 4 ++-- cs/src/IceSSL/ConnectorI.cs | 4 ++-- cs/src/IceSSL/Instance.cs | 4 ++-- cs/src/IceSSL/Plugin.cs | 8 +++---- cs/test/Ice/background/Client.cs | 2 +- cs/test/Ice/background/Server.cs | 2 +- cs/test/IceSSL/configuration/run.py | 2 +- java/CHANGES | 6 +++--- java/INSTALL | 2 +- java/src/Ice/PluginManagerI.java | 18 ++++++++-------- java/src/IceBox/ServiceManagerI.java | 2 +- java/src/IceInternal/Instance.java | 2 +- java/src/IceSSL/AcceptorI.java | 4 ++-- java/src/IceSSL/ConnectorI.java | 4 ++-- java/src/IceSSL/Instance.java | 4 ++-- java/src/IceSSL/PasswordCallback.java | 2 +- java/src/IceSSL/Plugin.java | 6 +++--- java/test/Ice/background/Client.java | 2 +- java/test/Ice/background/Server.java | 2 +- py/CHANGES | 2 +- py/config/Make.rules.Darwin | 2 +- py/demo/Ice/converter/Client.py | 2 +- py/demo/Ice/converter/README | 2 +- py/modules/IcePy/Communicator.cpp | 2 +- slice/Ice/Communicator.ice | 2 +- slice/Ice/LocalException.ice | 2 +- slice/Ice/Plugin.ice | 40 +++++++++++++++++------------------ vb/CHANGES | 8 +++---- vb/demo/Ice/hello/config.server | 2 +- vb/demo/IceBox/hello/config.client | 2 +- vb/demo/IceBox/hello/config.icebox | 2 +- vb/demo/IceBox/hello/config.service | 2 +- 59 files changed, 143 insertions(+), 143 deletions(-) (limited to 'cpp/src/IceGrid/IceGridNode.cpp') diff --git a/CHANGES b/CHANGES index 47a809be763..78f08291135 100644 --- a/CHANGES +++ b/CHANGES @@ -429,7 +429,7 @@ noted. - The ability to install a logger via the Ice.LoggerPlugin property has been removed. The new mechanism requires that you create an - instance of the Ice::LoggerPlugin class in your plugin factory. + instance of the Ice::LoggerPlugin class in your plug-in factory. Please see the manual for more details. - It is no longer possible to provide input files on the command line @@ -466,7 +466,7 @@ C++ Changes custom string converter and/or wstring converter during communicator initialization. -- The Ice shared library now provides a string converter plugin +- The Ice shared library now provides a string converter plug-in factory: createStringConverter. See the Ice manual for details. - IceUtil::stringToWstring and IceUtil::wstringToString now take @@ -759,7 +759,7 @@ Python Changes 8-bit strings. - Added new Ice/converter demo to illustrate how to use the new Ice - for C++ string converter plugin. This demo is very similar to the + for C++ string converter plug-in. This demo is very similar to the C++ demo. - Fixed a deadlock bug that could occur when a multithreaded client diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 81481a6993f..09643b0b735 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -469,7 +469,7 @@ distribution. hello = (HelloPrx)hello.ice_oneway(); -* The IceSSL plugins for Java and .NET now support a password callback +* The IceSSL plug-ins for Java and .NET now support a password callback interface. You can also specify the class name of a certificate verifier or password callback via configuration properties. @@ -504,7 +504,7 @@ distribution. * It is now possible to use UNC paths on Windows in the configuration of Ice services. -* A string converter plugin has been added to Ice for C++, which is +* A string converter plug-in has been added to Ice for C++, which is particularly useful for the scripting language extensions. * Ice for Python now accepts Unicode objects as arguments to remote diff --git a/cpp/CHANGES b/cpp/CHANGES index 5e18635b29d..3417871babe 100644 --- a/cpp/CHANGES +++ b/cpp/CHANGES @@ -66,8 +66,8 @@ Changes since version 3.2.0 base64 encoding. This syntax is useful if, for example, a client that has the SSL - plugin configured sends a proxy with an SSL endpoint to a server - without the SSL plugin. Prior to this version, the server would + plug-in configured sends a proxy with an SSL endpoint to a server + without the SSL plug-in. Prior to this version, the server would drop the unknown SSL endpoint when it stringified the proxy. As of this version, the server preserves the endpoint and, when the server stringifies a proxy containing an unknown endpoint, it uses the above opaque syntax. @@ -677,7 +677,7 @@ Changes since version 3.0.1 - Added "always" and "session" activation modes to IceGrid. See the Ice manual for more information. -- Changed the entry point of the IceSSL plugin to be +- Changed the entry point of the IceSSL plug-in to be IceSSL:createIceSSL. - Changed the entry point of the IceStorm service to be @@ -816,11 +816,11 @@ Changes since version 3.0.1 proxies. Upgrading your clients to 3.1 is highly recommended to avoid large routing table sizes in Glacier2. -- Replaced the IceSSL plugin. The new plugin no longer uses an XML +- Replaced the IceSSL plug-in. The new plug-in no longer uses an XML configuration file but rather relies solely on properties. A Python script is provided in config/convertssl.py to convert old XML files to the new properties. See the Ice manual for more information on - the plugin. + the plug-in. - Added support for new Slice metadata ("cpp:type:wstring") that generates code to use std::wstring instead of std::string. See the diff --git a/cpp/config/convertssl.py b/cpp/config/convertssl.py index ddc03906e40..c03a9aa0294 100755 --- a/cpp/config/convertssl.py +++ b/cpp/config/convertssl.py @@ -10,7 +10,7 @@ # # This script converts an XML configuration file for earlier versions of -# the IceSSL plugin to the new property format in 3.1. +# the IceSSL plug-in to the new property format in 3.1. # # Usage: # diff --git a/cpp/include/Ice/LoggerUtil.h b/cpp/include/Ice/LoggerUtil.h index 4c102d88ac3..dae6a523532 100644 --- a/cpp/include/Ice/LoggerUtil.h +++ b/cpp/include/Ice/LoggerUtil.h @@ -150,7 +150,7 @@ template ICE_API Trace& operator<<(Trace&, std::ios_base& (*)(std::ios_base&)); // -// A special plugin that installs a logger during a communicator's initialization. +// A special plug-in that installs a logger during a communicator's initialization. // Both initialize and destroy are no-op. See Ice::InitializationData. // diff --git a/cpp/include/Ice/StringConverter.h b/cpp/include/Ice/StringConverter.h index 5011df19e98..4166ad7f781 100644 --- a/cpp/include/Ice/StringConverter.h +++ b/cpp/include/Ice/StringConverter.h @@ -107,7 +107,7 @@ private: // -// A special plugin that sets stringConverter and wstringConverter during +// A special plug-in that sets stringConverter and wstringConverter during // construction (when the provided stringConverter resp. wstringConverter // are not null). Both initialize and destroy are no-op. See Ice::InitializationData. // diff --git a/cpp/include/IceSSL/Plugin.h b/cpp/include/IceSSL/Plugin.h index 4c572bb9113..6834ad7d101 100644 --- a/cpp/include/IceSSL/Plugin.h +++ b/cpp/include/IceSSL/Plugin.h @@ -428,10 +428,10 @@ typedef IceUtil::Handle CertificateVerifierPtr; // so the application can supply an implementation of PasswordPrompt // to take responsibility for obtaining the password. // -// Note that the password is needed during plugin initialization, so +// Note that the password is needed during plug-in initialization, so // in general you will need to delay initialization (by defining // IceSSL.DelayInit=1), configure the PasswordPrompt, then manually -// initialize the plugin. +// initialize the plug-in. // class PasswordPrompt : public IceUtil::Shared { @@ -452,12 +452,12 @@ public: // // Establish the OpenSSL context. This must be done before the - // plugin is initialized, therefore the application must define + // plug-in is initialized, therefore the application must define // the property Ice.InitPlugins=0, set the context, and finally // invoke initializePlugins on the PluginManager. // // When the application supplies its own OpenSSL context, the - // plugin skips its normal property-based configuration. + // plug-in skips its normal property-based configuration. // virtual void setContext(SSL_CTX*) = 0; @@ -475,7 +475,7 @@ public: // // Establish the password prompt object. This must be done before - // the plugin is initialized. + // the plug-in is initialized. // virtual void setPasswordPrompt(const PasswordPromptPtr&) = 0; }; diff --git a/cpp/src/Ice/Exception.cpp b/cpp/src/Ice/Exception.cpp index dd72f15ed82..4b584274039 100644 --- a/cpp/src/Ice/Exception.cpp +++ b/cpp/src/Ice/Exception.cpp @@ -635,7 +635,7 @@ void Ice::PluginInitializationException::ice_print(ostream& out) const { Exception::ice_print(out); - out << ":\nplugin initialization failed"; + out << ":\nplug-in initialization failed"; if(!reason.empty()) { out << ": " << reason; diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index a41030e3065..8c7ad3ed4e8 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -757,7 +757,7 @@ void IceInternal::Instance::setStringConverter(const Ice::StringConverterPtr& stringConverter) { // - // No locking, as it can only be called during plugin loading + // No locking, as it can only be called during plug-in loading // _initData.stringConverter = stringConverter; } @@ -766,7 +766,7 @@ void IceInternal::Instance::setWstringConverter(const Ice::WstringConverterPtr& wstringConverter) { // - // No locking, as it can only be called during plugin loading + // No locking, as it can only be called during plug-in loading // _initData.wstringConverter = wstringConverter; } @@ -775,7 +775,7 @@ void IceInternal::Instance::setLogger(const Ice::LoggerPtr& logger) { // - // No locking, as it can only be called during plugin loading + // No locking, as it can only be called during plug-in loading // _initData.logger = logger; } diff --git a/cpp/src/Ice/PluginManagerI.cpp b/cpp/src/Ice/PluginManagerI.cpp index d19e195b622..a12eff6b937 100644 --- a/cpp/src/Ice/PluginManagerI.cpp +++ b/cpp/src/Ice/PluginManagerI.cpp @@ -29,12 +29,12 @@ Ice::PluginManagerI::initializePlugins() if(_initialized) { InitializationException ex(__FILE__, __LINE__); - ex.reason = "plugins already initialized"; + ex.reason = "plug-ins already initialized"; throw ex; } // - // Invoke initialize() on the plugins, in the order they were loaded. + // Invoke initialize() on the plug-ins, in the order they were loaded. // vector initializedPlugins; try @@ -48,7 +48,7 @@ Ice::PluginManagerI::initializePlugins() catch(...) { // - // Destroy the plugins that have been successfully initialized, in the + // Destroy the plug-ins that have been successfully initialized, in the // reverse order. // for(vector::reverse_iterator p = initializedPlugins.rbegin(); p != initializedPlugins.rend(); ++p) @@ -157,8 +157,8 @@ Ice::PluginManagerI::loadPlugins(int& argc, char* argv[]) // Ice.Plugin.name[.]=entry_point [args] // // If the Ice.PluginLoadOrder property is defined, load the - // specified plugins in the specified order, then load any - // remaining plugins. + // specified plug-ins in the specified order, then load any + // remaining plug-ins. // const string prefix = "Ice.Plugin."; PropertiesPtr properties = _communicator->getProperties(); @@ -172,7 +172,7 @@ Ice::PluginManagerI::loadPlugins(int& argc, char* argv[]) if(_plugins.find(name) != _plugins.end()) { PluginInitializationException ex(__FILE__, __LINE__); - ex.reason = "plugin `" + name + "' already loaded"; + ex.reason = "plug-in `" + name + "' already loaded"; throw ex; } @@ -194,13 +194,13 @@ Ice::PluginManagerI::loadPlugins(int& argc, char* argv[]) else { PluginInitializationException ex(__FILE__, __LINE__); - ex.reason = "plugin `" + name + "' not defined"; + ex.reason = "plug-in `" + name + "' not defined"; throw ex; } } // - // Load any remaining plugins that weren't specified in PluginLoadOrder. + // Load any remaining plug-ins that weren't specified in PluginLoadOrder. // while(!plugins.empty()) @@ -259,7 +259,7 @@ Ice::PluginManagerI::loadPlugins(int& argc, char* argv[]) // // An application can set Ice.InitPlugins=0 if it wants to postpone // initialization until after it has interacted directly with the - // plugins. + // plug-ins. // if(properties->getPropertyAsIntWithDefault("Ice.InitPlugins", 1) > 0) { diff --git a/cpp/src/Ice/StringConverter.cpp b/cpp/src/Ice/StringConverter.cpp index 6fa5382f7d6..52c9dc2ed4b 100644 --- a/cpp/src/Ice/StringConverter.cpp +++ b/cpp/src/Ice/StringConverter.cpp @@ -221,7 +221,7 @@ StringConverterPlugin::destroy() } // -// The entry point for the "string converter" plugin built-in the Ice library +// The entry point for the "string converter" plug-in built-in the Ice library // extern "C" { diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp index a3438795057..0cb8aba1c9d 100644 --- a/cpp/src/IceBox/ServiceManagerI.cpp +++ b/cpp/src/IceBox/ServiceManagerI.cpp @@ -961,7 +961,7 @@ IceBox::ServiceManagerI::createCommunicator(const string& service, Ice::StringSe // // Remaining command line options are passed to the communicator. This is - // necessary for Ice plugin properties (e.g.: IceSSL). + // necessary for Ice plug-in properties (e.g.: IceSSL). // InitializationData initData; initData.properties = properties; diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp index a2d4513d735..1b55a7e2066 100644 --- a/cpp/src/IceGrid/IceGridNode.cpp +++ b/cpp/src/IceGrid/IceGridNode.cpp @@ -521,7 +521,7 @@ NodeService::start(int argc, char* argv[]) catch(const Ice::NotRegisteredException&) { // - // Some plugin removed the Process facet, so we don't replace it. + // Some plug-in removed the Process facet, so we don't replace it. // (unlikely error though) // } diff --git a/cpp/src/IceSSL/AcceptorI.cpp b/cpp/src/IceSSL/AcceptorI.cpp index 1cbfccc5ee6..441e2fb8399 100644 --- a/cpp/src/IceSSL/AcceptorI.cpp +++ b/cpp/src/IceSSL/AcceptorI.cpp @@ -67,12 +67,12 @@ IceInternal::TransceiverPtr IceSSL::AcceptorI::accept() { // - // The plugin may not be initialized. + // The plug-in may not be initialized. // if(!_instance->context()) { PluginInitializationException ex(__FILE__, __LINE__); - ex.reason = "IceSSL: plugin is not initialized"; + ex.reason = "IceSSL: plug-in is not initialized"; throw ex; } diff --git a/cpp/src/IceSSL/ConnectorI.cpp b/cpp/src/IceSSL/ConnectorI.cpp index 9d03d2c1a47..aa034e66a18 100644 --- a/cpp/src/IceSSL/ConnectorI.cpp +++ b/cpp/src/IceSSL/ConnectorI.cpp @@ -25,12 +25,12 @@ IceInternal::TransceiverPtr IceSSL::ConnectorI::connect() { // - // The plugin may not be initialized. + // The plug-in may not be initialized. // if(!_instance->context()) { PluginInitializationException ex(__FILE__, __LINE__); - ex.reason = "IceSSL: plugin is not initialized"; + ex.reason = "IceSSL: plug-in is not initialized"; throw ex; } diff --git a/cpp/src/IceSSL/Instance.cpp b/cpp/src/IceSSL/Instance.cpp index b3e0a77388f..9c4875f6267 100644 --- a/cpp/src/IceSSL/Instance.cpp +++ b/cpp/src/IceSSL/Instance.cpp @@ -233,7 +233,7 @@ IceSSL::Instance::Instance(const CommunicatorPtr& communicator) : // // Register the endpoint factory. We have to do this now, rather than // in initialize, because the communicator may need to interpret - // proxies before the plugin is fully initialized. + // proxies before the plug-in is fully initialized. // _facade->addEndpointFactory(new EndpointFactoryI(this)); @@ -662,7 +662,7 @@ IceSSL::Instance::context(SSL_CTX* context) if(_ctx) { PluginInitializationException ex(__FILE__, __LINE__); - ex.reason = "IceSSL: plugin is already initialized"; + ex.reason = "IceSSL: plug-in is already initialized"; throw ex; } diff --git a/cpp/src/IceSSL/PluginI.cpp b/cpp/src/IceSSL/PluginI.cpp index a8595334547..e06cdb2eec9 100644 --- a/cpp/src/IceSSL/PluginI.cpp +++ b/cpp/src/IceSSL/PluginI.cpp @@ -19,7 +19,7 @@ using namespace Ice; using namespace IceSSL; // -// Plugin factory function. +// Plug-in factory function. // extern "C" { diff --git a/cpp/test/Ice/background/Client.cpp b/cpp/test/Ice/background/Client.cpp index 5c94441501e..d5a4512755c 100644 --- a/cpp/test/Ice/background/Client.cpp +++ b/cpp/test/Ice/background/Client.cpp @@ -46,7 +46,7 @@ main(int argc, char* argv[]) initData.properties->setProperty("Ice.Warn.Connections", "0"); // - // Setup the test transport plugin. + // Setup the test transport plug-in. // initData.properties->setProperty("Ice.Plugin.Test", "TestTransport:createTestTransport"); string defaultProtocol = initData.properties->getPropertyWithDefault("Ice.Default.Protocol", "tcp"); diff --git a/cpp/test/Ice/background/Server.cpp b/cpp/test/Ice/background/Server.cpp index 97f5fefad48..76a316d2f44 100644 --- a/cpp/test/Ice/background/Server.cpp +++ b/cpp/test/Ice/background/Server.cpp @@ -139,7 +139,7 @@ main(int argc, char* argv[]) initData.properties->setProperty("Ice.Warn.Connections", "0"); // - // Setup the test transport plugin. + // Setup the test transport plug-in. // initData.properties->setProperty("Ice.Plugin.Test", "TestTransport:createTestTransport"); string defaultProtocol = initData.properties->getPropertyWithDefault("Ice.Default.Protocol", "tcp"); diff --git a/cs/CHANGES b/cs/CHANGES index 0aff86bab5a..f76ab700fc7 100644 --- a/cs/CHANGES +++ b/cs/CHANGES @@ -44,8 +44,8 @@ Changes since version 3.2.0 base64 encoding. This syntax is useful if, for example, a client that has the SSL - plugin configured sends a proxy with an SSL endpoint to a server - without the SSL plugin. Prior to this version, the server would + plug-in configured sends a proxy with an SSL endpoint to a server + without the SSL plug-in. Prior to this version, the server would drop the unknown SSL endpoint when it stringified the proxy. As of this version, the server preserves the endpoint and, when the server stringifies a proxy containing an unknown endpoint, it uses the above opaque syntax. @@ -108,8 +108,8 @@ Changes since version 3.1.1 logger for all communicators that do not have a logger explicitly set. -- Fixed a bug in the plugin property parsing code: if the file name of - a plugin included a drive letter, the plugin did not load. +- Fixed a bug in the plug-in property parsing code: if the file name of + a plug-in included a drive letter, the plug-in did not load. - Added support for a user-defined signal handler in Ice.Application. A subclass must override the interruptCallback method and invoke @@ -201,9 +201,9 @@ Changes since version 3.1.1 NullReferenceException but instead causes an empty sequence to be sent. -- Fixed a bug where loading an Ice plugin or an IceBox service could +- Fixed a bug where loading an Ice plug-in or an IceBox service could result in a System.NullReferenceException if no constructors are - available to create the plugin or service instance. + available to create the plug-in or service instance. - New Slice metadata for operations: @@ -227,7 +227,7 @@ Changes since version 3.0.1 - Removed removeObjectFactory() from the communicator interface. -- Added an IceSSL plugin for .NET 2.0. See the Ice manual for more +- Added an IceSSL plug-in for .NET 2.0. See the Ice manual for more information. - ObjectAdapter::deactivate() now notifies the locator registry when diff --git a/cs/INSTALL.VISUAL_C# b/cs/INSTALL.VISUAL_C# index fbb3a8780f1..64bc9ee315e 100644 --- a/cs/INSTALL.VISUAL_C# +++ b/cs/INSTALL.VISUAL_C# @@ -114,7 +114,7 @@ To run the demos, you need to have the Ice bin directory in your PATH. See the README file in each demo directory for a description of the demo. -Note that in demos that use IceSSL, the IceSSL plugin configuration +Note that in demos that use IceSSL, the IceSSL plug-in configuration does not contain the fully-qualified name (FQN) for the IceSSL assembly. Instead it just contains the partial name: @@ -123,7 +123,7 @@ assembly. Instead it just contains the partial name: The FQN is found in the *.exe.config files that are generated when the demos are built. If you want to run an application using the IceSSL assembly installed in the GAC without the use of the *.exe.config -files, you must add the FQN to the IceSSL plugin configuration, as +files, you must add the FQN to the IceSSL plug-in configuration, as shown below: Ice.Plugin.IceSSL=IceSSL, Version=@ver@.0, Culture=neutral, PublicKeyToken=1f998c50fec78381:IceSSL.PluginFactory diff --git a/cs/demo/Ice/hello/config.server b/cs/demo/Ice/hello/config.server index 20a3db59c30..3b48cfb8442 100644 --- a/cs/demo/Ice/hello/config.server +++ b/cs/demo/Ice/hello/config.server @@ -45,7 +45,7 @@ Ice.ACM.Server=10 #IceSSL.Trace.Security=1 # -# SSL plugin configuration +# SSL plug-in configuration # Ice.Plugin.IceSSL=IceSSL:IceSSL.PluginFactory IceSSL.DefaultDir=../../../../certs diff --git a/cs/demo/IceBox/hello/config.client b/cs/demo/IceBox/hello/config.client index 20928ca0f08..520c6a99180 100644 --- a/cs/demo/IceBox/hello/config.client +++ b/cs/demo/IceBox/hello/config.client @@ -28,7 +28,7 @@ Ice.Warn.Connections=1 #Ice.Trace.Protocol=1 # -# SSL plugin configuration +# SSL plug-in configuration # Ice.Plugin.IceSSL=IceSSL:IceSSL.PluginFactory IceSSL.DefaultDir=../../../../certs diff --git a/cs/demo/IceBox/hello/config.service b/cs/demo/IceBox/hello/config.service index c4fee179c20..99d2850903a 100644 --- a/cs/demo/IceBox/hello/config.service +++ b/cs/demo/IceBox/hello/config.service @@ -28,7 +28,7 @@ Ice.Warn.Connections=1 #Ice.Trace.Protocol=1 # -# SSL plugin configuration +# SSL plug-in configuration # Ice.Plugin.IceSSL=IceSSL:IceSSL.PluginFactory IceSSL.DefaultDir=../../../../certs diff --git a/cs/src/Ice/Instance.cs b/cs/src/Ice/Instance.cs index 715901c294d..31e493a1b53 100644 --- a/cs/src/Ice/Instance.cs +++ b/cs/src/Ice/Instance.cs @@ -617,7 +617,7 @@ namespace IceInternal setLogger(Ice.Logger logger) { // - // No locking, as it can only be called during plugin loading + // No locking, as it can only be called during plug-in loading // _initData.logger = logger; } diff --git a/cs/src/Ice/PluginManagerI.cs b/cs/src/Ice/PluginManagerI.cs index c54cb3e76c4..4e6834c5edd 100644 --- a/cs/src/Ice/PluginManagerI.cs +++ b/cs/src/Ice/PluginManagerI.cs @@ -28,12 +28,12 @@ namespace Ice if(_initialized) { InitializationException ex = new InitializationException(); - ex.reason = "plugins already initialized"; + ex.reason = "plug-ins already initialized"; throw ex; } // - // Invoke initialize() on the plugins, in the order they were loaded. + // Invoke initialize() on the plug-ins, in the order they were loaded. // ArrayList initializedPlugins = new ArrayList(); try @@ -47,7 +47,7 @@ namespace Ice catch(Exception) { // - // Destroy the plugins that have been successfully initialized, in the + // Destroy the plug-ins that have been successfully initialized, in the // reverse order. // initializedPlugins.Reverse(); @@ -150,8 +150,8 @@ namespace Ice // Ice.Plugin.Logger=logger, Version=0.0.0.0, Culture=neutral:LoginPluginFactory // // If the Ice.PluginLoadOrder property is defined, load the - // specified plugins in the specified order, then load any - // remaining plugins. + // specified plug-ins in the specified order, then load any + // remaining plug-ins. // string prefix = "Ice.Plugin."; Properties properties = _communicator.getProperties(); @@ -168,7 +168,7 @@ namespace Ice if(_plugins.Contains(loadOrder[i])) { PluginInitializationException e = new PluginInitializationException(); - e.reason = "plugin `" + loadOrder[i] + "' already loaded"; + e.reason = "plug-in `" + loadOrder[i] + "' already loaded"; throw e; } @@ -193,13 +193,13 @@ namespace Ice else { PluginInitializationException e = new PluginInitializationException(); - e.reason = "plugin `" + loadOrder[i] + "' not defined"; + e.reason = "plug-in `" + loadOrder[i] + "' not defined"; throw e; } } // - // Load any remaining plugins that weren't specified in PluginLoadOrder. + // Load any remaining plug-ins that weren't specified in PluginLoadOrder. // while(plugins.Count > 0) { @@ -257,7 +257,7 @@ namespace Ice // // An application can set Ice.InitPlugins=0 if it wants to postpone // initialization until after it has interacted directly with the - // plugins. + // plug-ins. // if(properties.getPropertyAsIntWithDefault("Ice.InitPlugins", 1) > 0) { @@ -326,7 +326,7 @@ namespace Ice // // Retrieve the assembly name and the type. // - string err = "unable to load plugin '" + entryPoint + "': "; + string err = "unable to load plug-in '" + entryPoint + "': "; int sepPos = entryPoint.IndexOf(':'); if (sepPos == -1) { @@ -359,7 +359,7 @@ namespace Ice if(!_sslWarnOnce) { _communicator.getLogger().warning( - "IceSSL plugin not loaded: IceSSL is not supported with Mono"); + "IceSSL plug-in not loaded: IceSSL is not supported with Mono"); _sslWarnOnce = true; } return; diff --git a/cs/src/IceBox/ServiceManagerI.cs b/cs/src/IceBox/ServiceManagerI.cs index dd90751e4a7..4b3d53e2ecf 100644 --- a/cs/src/IceBox/ServiceManagerI.cs +++ b/cs/src/IceBox/ServiceManagerI.cs @@ -980,7 +980,7 @@ class ServiceManagerI : ServiceManagerDisp_ // // Remaining command line options are passed to the communicator. This is - // necessary for Ice plugin properties (e.g.: IceSSL). + // necessary for Ice plug-in properties (e.g.: IceSSL). // Ice.InitializationData initData = new Ice.InitializationData(); initData.properties = properties; diff --git a/cs/src/IceSSL/AcceptorI.cs b/cs/src/IceSSL/AcceptorI.cs index 8649272247d..6ebb56c5b7b 100644 --- a/cs/src/IceSSL/AcceptorI.cs +++ b/cs/src/IceSSL/AcceptorI.cs @@ -65,12 +65,12 @@ namespace IceSSL public IAsyncResult beginAccept(AsyncCallback callback, object state) { // - // The plugin may not be fully initialized. + // The plug-in may not be fully initialized. // if(!_instance.initialized()) { Ice.PluginInitializationException ex = new Ice.PluginInitializationException(); - ex.reason = "IceSSL: plugin is not initialized"; + ex.reason = "IceSSL: plug-in is not initialized"; throw ex; } diff --git a/cs/src/IceSSL/ConnectorI.cs b/cs/src/IceSSL/ConnectorI.cs index c4b74483cf6..139c9c74368 100644 --- a/cs/src/IceSSL/ConnectorI.cs +++ b/cs/src/IceSSL/ConnectorI.cs @@ -22,12 +22,12 @@ namespace IceSSL public IceInternal.Transceiver connect() { // - // The plugin may not be fully initialized. + // The plug-in may not be fully initialized. // if(!_instance.initialized()) { Ice.PluginInitializationException ex = new Ice.PluginInitializationException(); - ex.reason = "IceSSL: plugin is not initialized"; + ex.reason = "IceSSL: plug-in is not initialized"; throw ex; } diff --git a/cs/src/IceSSL/Instance.cs b/cs/src/IceSSL/Instance.cs index 411fdf8ca6a..548fccf8f29 100644 --- a/cs/src/IceSSL/Instance.cs +++ b/cs/src/IceSSL/Instance.cs @@ -32,7 +32,7 @@ namespace IceSSL // // Register the endpoint factory. We have to do this now, rather than // in initialize, because the communicator may need to interpret - // proxies before the plugin is fully initialized. + // proxies before the plug-in is fully initialized. // _facade.addEndpointFactory(new EndpointFactoryI(this)); } @@ -261,7 +261,7 @@ namespace IceSSL if(_initialized) { Ice.PluginInitializationException e = new Ice.PluginInitializationException(); - e.reason = "IceSSL: plugin is already initialized"; + e.reason = "IceSSL: plug-in is already initialized"; throw e; } diff --git a/cs/src/IceSSL/Plugin.cs b/cs/src/IceSSL/Plugin.cs index e5739bc07b3..b2217996bce 100644 --- a/cs/src/IceSSL/Plugin.cs +++ b/cs/src/IceSSL/Plugin.cs @@ -26,7 +26,7 @@ namespace IceSSL } // - // A password callback is an alternate way of supplying the plugin with + // A password callback is an alternate way of supplying the plug-in with // passwords that avoids using plaintext configuration properties. // public interface PasswordCallback @@ -53,13 +53,13 @@ namespace IceSSL // // Specify the certificates to use for SSL connections. This - // must be done before the plugin is initialized, therefore + // must be done before the plug-in is initialized, therefore // the application must define the property Ice.InitPlugins=0, // set the certificates, and finally invoke initializePlugins // on the PluginManager. // // When the application supplies its own certificates, the - // plugin skips its normal property-based configuration. + // plug-in skips its normal property-based configuration. // abstract public void setCertificates(X509Certificate2Collection certs); @@ -77,7 +77,7 @@ namespace IceSSL // // Establish the password callback object. This should be - // done before the plugin is initialized. + // done before the plug-in is initialized. // abstract public void setPasswordCallback(PasswordCallback callback); diff --git a/cs/test/Ice/background/Client.cs b/cs/test/Ice/background/Client.cs index 336842d11d4..55f6c85b83f 100644 --- a/cs/test/Ice/background/Client.cs +++ b/cs/test/Ice/background/Client.cs @@ -49,7 +49,7 @@ public class Client initData.properties.setProperty("Ice.Warn.Connections", "0"); // - // Setup the test transport plugin. + // Setup the test transport plug-in. // string defaultProtocol = initData.properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp"); initData.properties.setProperty("Ice.Default.Protocol", "test-" + defaultProtocol); diff --git a/cs/test/Ice/background/Server.cs b/cs/test/Ice/background/Server.cs index 7a781a955ee..01a618207d7 100644 --- a/cs/test/Ice/background/Server.cs +++ b/cs/test/Ice/background/Server.cs @@ -133,7 +133,7 @@ public class Server initData.properties.setProperty("Ice.Warn.Connections", "0"); // - // Setup the test transport plugin. + // Setup the test transport plug-in. // string defaultProtocol = initData.properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp"); initData.properties.setProperty("Ice.Default.Protocol", "test-" + defaultProtocol); diff --git a/cs/test/IceSSL/configuration/run.py b/cs/test/IceSSL/configuration/run.py index 35b666c2827..ff60c099d95 100755 --- a/cs/test/IceSSL/configuration/run.py +++ b/cs/test/IceSSL/configuration/run.py @@ -22,6 +22,6 @@ from scripts import * # # The drive letter needs to be removed on Windows or loading the SSL -# plugin will not work. +# plug-in will not work. # TestUtil.clientServerTest(additionalClientOptions=os.path.splitdrive(os.getcwd())[1]) diff --git a/java/CHANGES b/java/CHANGES index 88989eece0c..28e43ac5801 100644 --- a/java/CHANGES +++ b/java/CHANGES @@ -53,8 +53,8 @@ Changes since version 3.2.0 encapsulation) in base64 encoding. This syntax is useful if, for example, a client that has the SSL - plugin configured sends a proxy with an SSL endpoint to a server - without the SSL plugin. Prior to this version, the server would + plug-in configured sends a proxy with an SSL endpoint to a server + without the SSL plug-in. Prior to this version, the server would drop the unknown SSL endpoint when it stringified the proxy. As of this version, the server preserves the endpoint and, when the server stringifies a proxy containing an unknown endpoint, it uses @@ -277,7 +277,7 @@ Changes since version 3.0.1 - Added identityToString and stringToIdentity to the Communicator interface. -- Added an SSL plugin for Java5 that supports the thread pool +- Added an SSL plug-in for Java5 that supports the thread pool concurrency model. - Added support for specifying an alternate abstract type in diff --git a/java/INSTALL b/java/INSTALL index b6edfa9e1b5..3a78294a206 100644 --- a/java/INSTALL +++ b/java/INSTALL @@ -39,7 +39,7 @@ You can download Java5 and Java6 for Solaris, Windows, and Linux from: Make sure to add javac and java to your PATH. -When using the Ice for Java SSL plugin (IceSSL), you may experience +When using the Ice for Java SSL plug-in (IceSSL), you may experience occasional hangs. The most likely reason is that your system's entropy pool is empty. If you have sufficient system privileges, you can solve this issue by editing the following file diff --git a/java/src/Ice/PluginManagerI.java b/java/src/Ice/PluginManagerI.java index f76789f4a21..0eb405f7638 100644 --- a/java/src/Ice/PluginManagerI.java +++ b/java/src/Ice/PluginManagerI.java @@ -19,12 +19,12 @@ public final class PluginManagerI implements PluginManager if(_initialized) { InitializationException ex = new InitializationException(); - ex.reason = "plugins already initialized"; + ex.reason = "plug-ins already initialized"; throw ex; } // - // Invoke initialize() on the plugins, in the order they were loaded. + // Invoke initialize() on the plug-ins, in the order they were loaded. // java.util.List initializedPlugins = new java.util.ArrayList(); try @@ -40,7 +40,7 @@ public final class PluginManagerI implements PluginManager catch(RuntimeException ex) { // - // Destroy the plugins that have been successfully initialized, in the + // Destroy the plug-ins that have been successfully initialized, in the // reverse order. // java.util.ListIterator i = initializedPlugins.listIterator(initializedPlugins.size()); @@ -135,8 +135,8 @@ public final class PluginManagerI implements PluginManager // Ice.Plugin.name[.]=entry_point [args] // // If the Ice.PluginLoadOrder property is defined, load the - // specified plugins in the specified order, then load any - // remaining plugins. + // specified plug-ins in the specified order, then load any + // remaining plug-ins. // final String prefix = "Ice.Plugin."; Properties properties = _communicator.getProperties(); @@ -148,7 +148,7 @@ public final class PluginManagerI implements PluginManager if(_plugins.containsKey(loadOrder[i])) { PluginInitializationException ex = new PluginInitializationException(); - ex.reason = "plugin `" + loadOrder[i] + "' already loaded"; + ex.reason = "plug-in `" + loadOrder[i] + "' already loaded"; throw ex; } @@ -173,13 +173,13 @@ public final class PluginManagerI implements PluginManager else { PluginInitializationException ex = new PluginInitializationException(); - ex.reason = "plugin `" + loadOrder[i] + "' not defined"; + ex.reason = "plug-in `" + loadOrder[i] + "' not defined"; throw ex; } } // - // Load any remaining plugins that weren't specified in PluginLoadOrder. + // Load any remaining plug-ins that weren't specified in PluginLoadOrder. // while(!plugins.isEmpty()) { @@ -240,7 +240,7 @@ public final class PluginManagerI implements PluginManager // // An application can set Ice.InitPlugins=0 if it wants to postpone // initialization until after it has interacted directly with the - // plugins. + // plug-ins. // if(properties.getPropertyAsIntWithDefault("Ice.InitPlugins", 1) > 0) { diff --git a/java/src/IceBox/ServiceManagerI.java b/java/src/IceBox/ServiceManagerI.java index d327c4bfa9a..87fb274fac1 100644 --- a/java/src/IceBox/ServiceManagerI.java +++ b/java/src/IceBox/ServiceManagerI.java @@ -981,7 +981,7 @@ public class ServiceManagerI extends _ServiceManagerDisp // // Remaining command line options are passed to the communicator. This is - // necessary for Ice plugin properties (e.g.: IceSSL). + // necessary for Ice plug-in properties (e.g.: IceSSL). // Ice.InitializationData initData = new Ice.InitializationData(); initData.properties = properties; diff --git a/java/src/IceInternal/Instance.java b/java/src/IceInternal/Instance.java index e494bb9c4d7..bf5b9831311 100644 --- a/java/src/IceInternal/Instance.java +++ b/java/src/IceInternal/Instance.java @@ -556,7 +556,7 @@ public final class Instance setLogger(Ice.Logger logger) { // - // No locking, as it can only be called during plugin loading + // No locking, as it can only be called during plug-in loading // _initData.logger = logger; } diff --git a/java/src/IceSSL/AcceptorI.java b/java/src/IceSSL/AcceptorI.java index d07846bcc15..4ce1e5f70bf 100644 --- a/java/src/IceSSL/AcceptorI.java +++ b/java/src/IceSSL/AcceptorI.java @@ -47,12 +47,12 @@ final class AcceptorI implements IceInternal.Acceptor accept() { // - // The plugin may not be fully initialized. + // The plug-in may not be fully initialized. // if(!_instance.initialized()) { Ice.PluginInitializationException ex = new Ice.PluginInitializationException(); - ex.reason = "IceSSL: plugin is not initialized"; + ex.reason = "IceSSL: plug-in is not initialized"; throw ex; } diff --git a/java/src/IceSSL/ConnectorI.java b/java/src/IceSSL/ConnectorI.java index 51f490975eb..0da713515fd 100644 --- a/java/src/IceSSL/ConnectorI.java +++ b/java/src/IceSSL/ConnectorI.java @@ -15,12 +15,12 @@ final class ConnectorI implements IceInternal.Connector, java.lang.Comparable connect() { // - // The plugin may not be fully initialized. + // The plug-in may not be fully initialized. // if(!_instance.initialized()) { Ice.PluginInitializationException ex = new Ice.PluginInitializationException(); - ex.reason = "IceSSL: plugin is not initialized"; + ex.reason = "IceSSL: plug-in is not initialized"; throw ex; } diff --git a/java/src/IceSSL/Instance.java b/java/src/IceSSL/Instance.java index 9a53f10e9a9..9c950bae453 100644 --- a/java/src/IceSSL/Instance.java +++ b/java/src/IceSSL/Instance.java @@ -22,7 +22,7 @@ class Instance // // Register the endpoint factory. We have to do this now, rather than // in initialize, because the communicator may need to interpret - // proxies before the plugin is fully initialized. + // proxies before the plug-in is fully initialized. // _facade.addEndpointFactory(new EndpointFactoryI(this)); } @@ -463,7 +463,7 @@ class Instance if(_initialized) { Ice.PluginInitializationException ex = new Ice.PluginInitializationException(); - ex.reason = "IceSSL: plugin is already initialized"; + ex.reason = "IceSSL: plug-in is already initialized"; throw ex; } diff --git a/java/src/IceSSL/PasswordCallback.java b/java/src/IceSSL/PasswordCallback.java index 5a7cbb3db83..be1e9dff4cd 100644 --- a/java/src/IceSSL/PasswordCallback.java +++ b/java/src/IceSSL/PasswordCallback.java @@ -10,7 +10,7 @@ package IceSSL; // -// A password callback is an alternate way of supplying the plugin with +// A password callback is an alternate way of supplying the plug-in with // passwords that avoids using plaintext configuration properties. // public interface PasswordCallback diff --git a/java/src/IceSSL/Plugin.java b/java/src/IceSSL/Plugin.java index c192b8d0953..86ef11d74f8 100644 --- a/java/src/IceSSL/Plugin.java +++ b/java/src/IceSSL/Plugin.java @@ -13,12 +13,12 @@ public interface Plugin extends Ice.Plugin { // // Establish the SSL context. This must be done before the - // plugin is initialized, therefore the application must define + // plug-in is initialized, therefore the application must define // the property Ice.InitPlugins=0, set the context, and finally // invoke initializePlugins on the PluginManager. // // When the application supplies its own SSL context, the - // plugin skips its normal property-based configuration. + // plug-in skips its normal property-based configuration. // void setContext(javax.net.ssl.SSLContext context); @@ -42,7 +42,7 @@ public interface Plugin extends Ice.Plugin // // Establish the password callback object. This should be - // done before the plugin is initialized. + // done before the plug-in is initialized. // void setPasswordCallback(PasswordCallback callback); diff --git a/java/test/Ice/background/Client.java b/java/test/Ice/background/Client.java index 7631b086a2c..91a4be7dbe8 100644 --- a/java/test/Ice/background/Client.java +++ b/java/test/Ice/background/Client.java @@ -40,7 +40,7 @@ public class Client initData.properties.setProperty("Ice.Warn.Connections", "0"); // - // Setup the test transport plugin. + // Setup the test transport plug-in. // initData.properties.setProperty("Ice.Plugin.Test", "PluginFactory"); String defaultProtocol = initData.properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp"); diff --git a/java/test/Ice/background/Server.java b/java/test/Ice/background/Server.java index f444015c944..7e5cdb7d513 100644 --- a/java/test/Ice/background/Server.java +++ b/java/test/Ice/background/Server.java @@ -133,7 +133,7 @@ public class Server initData.properties.setProperty("Ice.Warn.Connections", "0"); // - // Setup the test transport plugin. + // Setup the test transport plug-in. // initData.properties.setProperty("Ice.Plugin.Test", "PluginFactory"); String defaultProtocol = initData.properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp"); diff --git a/py/CHANGES b/py/CHANGES index 0708fec7709..f3324cf3189 100644 --- a/py/CHANGES +++ b/py/CHANGES @@ -357,7 +357,7 @@ Changes since version 3.0.1 Changes since version 3.0.0 --------------------------- -- Fixed a bug where Ice plugin command line options were not parsed. +- Fixed a bug where Ice plug-in command line options were not parsed. - Fixed a bug in the Slice parser that caused problems if an included file contained white space in the file name. diff --git a/py/config/Make.rules.Darwin b/py/config/Make.rules.Darwin index e5b1764e519..3e1a038077c 100644 --- a/py/config/Make.rules.Darwin +++ b/py/config/Make.rules.Darwin @@ -12,7 +12,7 @@ # # -# We require Python to be built as a Framework for the IcePy plugin. +# We require Python to be built as a Framework for the IcePy plug-in. # ifneq ($(PYTHON_HOME),) ifeq ($(shell test ! -f $(PYTHON_HOME)/Python && echo 0),0) diff --git a/py/demo/Ice/converter/Client.py b/py/demo/Ice/converter/Client.py index 7d80e39404a..94030f2322e 100755 --- a/py/demo/Ice/converter/Client.py +++ b/py/demo/Ice/converter/Client.py @@ -97,7 +97,7 @@ try: communicator1 = Ice.initialize(sys.argv, initData) # - # Clear plugin, so no converter + # Clear plug-in, so no converter # initData.properties.setProperty("Ice.Plugin.StringConverter", "") communicator2 = Ice.initialize(sys.argv, initData) diff --git a/py/demo/Ice/converter/README b/py/demo/Ice/converter/README index a008b1b9d39..c07047da017 100644 --- a/py/demo/Ice/converter/README +++ b/py/demo/Ice/converter/README @@ -1,4 +1,4 @@ -This demo illustrates how to use a string converter plugin with Ice +This demo illustrates how to use a string converter plug-in with Ice for Python. In this demo, the client represents an application that uses ISO-Latin-1 as its character set, while the server uses UTF-8. diff --git a/py/modules/IcePy/Communicator.cpp b/py/modules/IcePy/Communicator.cpp index 1d5aacb9692..223cfcde993 100644 --- a/py/modules/IcePy/Communicator.cpp +++ b/py/modules/IcePy/Communicator.cpp @@ -183,7 +183,7 @@ communicatorInit(CommunicatorObject* self, PyObject* args, PyObject* /*kwds*/) // // Remaining command line options are passed to the communicator - // as an argument vector in case they contain plugin properties. + // as an argument vector in case they contain plug-in properties. // int argc = static_cast(seq.size()); char** argv = new char*[argc + 1]; diff --git a/slice/Ice/Communicator.ice b/slice/Ice/Communicator.ice index 2ca68d4b1c0..4d464677612 100644 --- a/slice/Ice/Communicator.ice +++ b/slice/Ice/Communicator.ice @@ -475,7 +475,7 @@ local interface Communicator * Get a proxy to the main facet of the Admin object. When Ice.Admin.DelayCreation * is greater than 0, it is necessary to call getAdmin() after the communicator is * initialized to create the Admin object. Otherwise, the Admin object is created - * automatically after all the plugins are initialized. + * automatically after all the plug-ins are initialized. * * @return The main ("") facet of the Admin object; a null proxy if no * Admin object is configured. diff --git a/slice/Ice/LocalException.ice b/slice/Ice/LocalException.ice index 9991cea9e71..b4cd5cba645 100644 --- a/slice/Ice/LocalException.ice +++ b/slice/Ice/LocalException.ice @@ -897,7 +897,7 @@ local exception FeatureNotSupportedException /** * * This exception indicates a failure in a security subsystem, - * such as the IceSSL plugin. + * such as the IceSSL plug-in. * **/ local exception SecurityException diff --git a/slice/Ice/Plugin.ice b/slice/Ice/Plugin.ice index f5a659f01a8..a872ed658aa 100644 --- a/slice/Ice/Plugin.ice +++ b/slice/Ice/Plugin.ice @@ -17,11 +17,11 @@ module Ice /** * - * A communicator plugin. A plugin generally adds a feature to a + * A communicator plug-in. A plug-in generally adds a feature to a * communicator, such as support for a protocol. * - * The communicator loads its plugins in two stages: the first stage - * creates the plugins, and the second stage invokes [initialize] on + * The communicator loads its plug-ins in two stages: the first stage + * creates the plug-ins, and the second stage invokes [initialize] on * each one. * **/ @@ -44,49 +44,49 @@ local interface Plugin /** * - * Each communicator has a plugin manager to administer the set of - * plugins. + * Each communicator has a plug-in manager to administer the set of + * plug-ins. * **/ local interface PluginManager { /** * - * Initialize the configured plugins. The communicator automatically initializes - * the plugins by default, but an application may need to interact directly with - * a plugin prior to initialization. In this case, the application must set + * Initialize the configured plug-ins. The communicator automatically initializes + * the plug-ins by default, but an application may need to interact directly with + * a plug-in prior to initialization. In this case, the application must set * Ice.InitPlugins=0 and then invoke [initializePlugins] - * manually. The plugins are initialized in the order in which they are loaded. - * If a plugin raises an exception during initialization, the communicator - * invokes destroy on the plugins that have already been initialized. + * manually. The plug-ins are initialized in the order in which they are loaded. + * If a plug-in raises an exception during initialization, the communicator + * invokes destroy on the plug-ins that have already been initialized. * - * @throws InitializationException Raised if the plugins have already been initialized. + * @throws InitializationException Raised if the plug-ins have already been initialized. * **/ void initializePlugins(); /** * - * Obtain a plugin by name. + * Obtain a plug-in by name. * - * @param name The plugin's name. + * @param name The plug-in's name. * - * @return The plugin. + * @return The plug-in. * - * @throws NotRegisteredException Raised if no plugin is found with the given name. + * @throws NotRegisteredException Raised if no plug-in is found with the given name. * **/ Plugin getPlugin(string name); /** * - * Install a new plugin. + * Install a new plug-in. * - * @param name The plugin's name. + * @param name The plug-in's name. * - * @param pi The plugin. + * @param pi The plug-in. * - * @throws AlreadyRegisteredException Raised if a plugin already exists with the given name. + * @throws AlreadyRegisteredException Raised if a plug-in already exists with the given name. * **/ void addPlugin(string name, Plugin pi); diff --git a/vb/CHANGES b/vb/CHANGES index 629fb7c5e52..fae75dc8a66 100644 --- a/vb/CHANGES +++ b/vb/CHANGES @@ -61,8 +61,8 @@ Changes since version 3.1.1 logger for all communicators that do not have a logger explicitly set. -- Fixed a bug in the plugin property parsing code: if the file name of - a plugin included a drive letter, the plugin did not load. +- Fixed a bug in the plug-in property parsing code: if the file name of + a plug-in included a drive letter, the plug-in did not load. - Added support for a user-defined signal handler in Ice.Application. A subclass must override the interruptCallback method and invoke @@ -154,9 +154,9 @@ Changes since version 3.1.1 NullReferenceException but instead causes an empty sequence to be sent. -- Fixed a bug where loading an Ice plugin or an IceBox service could +- Fixed a bug where loading an Ice plug-in or an IceBox service could result in a System.NullReferenceException if no constructors are - available to create the plugin or service instance. + available to create the plug-in or service instance. - New Slice metadata for operations: diff --git a/vb/demo/Ice/hello/config.server b/vb/demo/Ice/hello/config.server index 65e704e21bb..fe9a2074a2a 100644 --- a/vb/demo/Ice/hello/config.server +++ b/vb/demo/Ice/hello/config.server @@ -42,7 +42,7 @@ Ice.ACM.Server=10 #IceSSL.Trace.Security=1 # -# SSL plugin configuration +# SSL plug-in configuration # Ice.Plugin.IceSSL=IceSSL:IceSSL.PluginFactory IceSSL.DefaultDir=../../../../certs diff --git a/vb/demo/IceBox/hello/config.client b/vb/demo/IceBox/hello/config.client index 90f80506f66..9c723be482a 100644 --- a/vb/demo/IceBox/hello/config.client +++ b/vb/demo/IceBox/hello/config.client @@ -28,7 +28,7 @@ Ice.Warn.Connections=1 #Ice.Trace.Protocol=1 # -# SSL plugin configuration +# SSL plug-in configuration # Ice.Plugin.IceSSL=IceSSL:IceSSL.PluginFactory IceSSL.DefaultDir=../../../../certs diff --git a/vb/demo/IceBox/hello/config.icebox b/vb/demo/IceBox/hello/config.icebox index 3f1fdc039a8..bf69d8b2bcd 100644 --- a/vb/demo/IceBox/hello/config.icebox +++ b/vb/demo/IceBox/hello/config.icebox @@ -61,7 +61,7 @@ Ice.Warn.Connections=1 #Ice.Trace.Protocol=1 # -# SSL plugin configuration +# SSL plug-in configuration # Ice.Plugin.IceSSL=IceSSL:IceSSL.PluginFactory IceSSL.DefaultDir=../../../../certs diff --git a/vb/demo/IceBox/hello/config.service b/vb/demo/IceBox/hello/config.service index c9e44b54c58..b204c808cf0 100644 --- a/vb/demo/IceBox/hello/config.service +++ b/vb/demo/IceBox/hello/config.service @@ -29,7 +29,7 @@ Ice.Warn.Connections=1 #Ice.Trace.Protocol=1 # -# SSL plugin configuration +# SSL plug-in configuration # Ice.Plugin.IceSSL=IceSSL:IceSSL.PluginFactory IceSSL.DefaultDir=../../../../certs -- cgit v1.2.3 From b5042ce24aaa2dcff2092046b322ff61c3d9ef8c Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Wed, 7 Jan 2009 19:37:17 +0100 Subject: Squashed commit of the following: commit 8019e6de4480f361a83d8944afec60793454c322 Author: Benoit Foucher Date: Wed Jan 7 17:16:40 2009 +0100 Fixed bug 3516 - Fixed scaling issue when using round-robin replica groups commit 6c36afb32dda8b37b7d5330ed51a439bc73b17db Author: Benoit Foucher Date: Wed Jan 7 17:16:36 2009 +0100 Fixed bug 3230 - IceGrid node leak --- cpp/src/IceGrid/AdapterCache.cpp | 47 +- cpp/src/IceGrid/AdapterCache.h | 13 +- cpp/src/IceGrid/IceGridNode.cpp | 12 +- cpp/src/IceGrid/LocatorI.cpp | 694 ++++++++++++++++++----------- cpp/src/IceGrid/LocatorI.h | 43 +- cpp/src/IceGrid/NodeI.cpp | 10 +- cpp/src/IceGrid/NodeI.h | 2 +- cpp/src/IceGrid/ServerI.cpp | 8 + cpp/src/IceGrid/ServerI.h | 1 + cpp/test/IceGrid/replicaGroup/AllTests.cpp | 104 +++++ 10 files changed, 590 insertions(+), 344 deletions(-) (limited to 'cpp/src/IceGrid/IceGridNode.cpp') diff --git a/cpp/src/IceGrid/AdapterCache.cpp b/cpp/src/IceGrid/AdapterCache.cpp index f6970f4e09e..af24d9da061 100644 --- a/cpp/src/IceGrid/AdapterCache.cpp +++ b/cpp/src/IceGrid/AdapterCache.cpp @@ -231,7 +231,7 @@ ServerAdapterEntry::ServerAdapterEntry(AdapterCache& cache, void ServerAdapterEntry::getLocatorAdapterInfo(LocatorAdapterInfoSeq& adapters, int& nReplicas, bool& replicaGroup, - bool& roundRobin) + bool& roundRobin, const set&) { nReplicas = 1; replicaGroup = false; @@ -242,11 +242,6 @@ ServerAdapterEntry::getLocatorAdapterInfo(LocatorAdapterInfoSeq& adapters, int& adapters.push_back(info); } -void -ServerAdapterEntry::increaseRoundRobinCount(int roundRobinCount) -{ -} - float ServerAdapterEntry::getLeastLoadedNodeLoad(LoadSample loadSample) const { @@ -383,7 +378,7 @@ ReplicaGroupEntry::update(const LoadBalancingPolicyPtr& policy) void ReplicaGroupEntry::getLocatorAdapterInfo(LocatorAdapterInfoSeq& adapters, int& nReplicas, bool& replicaGroup, - bool& roundRobin) + bool& roundRobin, const set& excludes) { vector replicas; bool adaptive = false; @@ -453,32 +448,28 @@ ReplicaGroupEntry::getLocatorAdapterInfo(LocatorAdapterInfoSeq& adapters, int& n // for(vector::const_iterator p = replicas.begin(); p != replicas.end(); ++p) { - try - { - int dummy; - bool dummy2; - bool dummy3; - (*p)->getLocatorAdapterInfo(adapters, dummy, dummy2, dummy3); - } - catch(const AdapterNotExistException&) - { - } - catch(const NodeUnreachableException&) - { - } - catch(const DeploymentException&) + if(!roundRobin || excludes.find((*p)->getId()) == excludes.end()) { + try + { + int dummy; + bool dummy2; + bool dummy3; + (*p)->getLocatorAdapterInfo(adapters, dummy, dummy2, dummy3, set()); + } + catch(const AdapterNotExistException&) + { + } + catch(const NodeUnreachableException&) + { + } + catch(const DeploymentException&) + { + } } } } -void -ReplicaGroupEntry::increaseRoundRobinCount(int count) -{ - Lock sync(*this); - _lastReplica = (_lastReplica + count) % static_cast(_replicas.size()); -} - float ReplicaGroupEntry::getLeastLoadedNodeLoad(LoadSample loadSample) const { diff --git a/cpp/src/IceGrid/AdapterCache.h b/cpp/src/IceGrid/AdapterCache.h index 3a862d12d97..8ee42bc1531 100644 --- a/cpp/src/IceGrid/AdapterCache.h +++ b/cpp/src/IceGrid/AdapterCache.h @@ -43,8 +43,11 @@ public: AdapterEntry(AdapterCache&, const std::string&, const std::string&); - virtual void getLocatorAdapterInfo(LocatorAdapterInfoSeq&, int&, bool&, bool&) = 0; - virtual void increaseRoundRobinCount(int) = 0; + virtual void getLocatorAdapterInfo(LocatorAdapterInfoSeq&, int&, bool&, bool&, const std::set&) = 0; + void getLocatorAdapterInfo(LocatorAdapterInfoSeq& adapters, int& count, bool& replicaGroup, bool& roundRobin) + { + getLocatorAdapterInfo(adapters, count, replicaGroup, roundRobin, std::set()); + } virtual float getLeastLoadedNodeLoad(LoadSample) const = 0; virtual AdapterInfoSeq getAdapterInfo() const = 0; @@ -68,8 +71,7 @@ public: ServerAdapterEntry(AdapterCache&, const std::string&, const std::string&, const std::string&, int, const ServerEntryPtr&); - virtual void getLocatorAdapterInfo(LocatorAdapterInfoSeq&, int&, bool&, bool&); - virtual void increaseRoundRobinCount(int); + virtual void getLocatorAdapterInfo(LocatorAdapterInfoSeq&, int&, bool&, bool&, const std::set&); virtual float getLeastLoadedNodeLoad(LoadSample) const; virtual AdapterInfoSeq getAdapterInfo() const; virtual const std::string& getReplicaGroupId() const { return _replicaGroupId; } @@ -91,8 +93,7 @@ public: ReplicaGroupEntry(AdapterCache&, const std::string&, const std::string&, const LoadBalancingPolicyPtr&); - virtual void getLocatorAdapterInfo(LocatorAdapterInfoSeq&, int&, bool&, bool&); - virtual void increaseRoundRobinCount(int); + virtual void getLocatorAdapterInfo(LocatorAdapterInfoSeq&, int&, bool&, bool&, const std::set&); virtual float getLeastLoadedNodeLoad(LoadSample) const; virtual AdapterInfoSeq getAdapterInfo() const; diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp index 1b55a7e2066..4dc9a62e978 100644 --- a/cpp/src/IceGrid/IceGridNode.cpp +++ b/cpp/src/IceGrid/IceGridNode.cpp @@ -717,12 +717,6 @@ NodeService::stop() // _node->getPlatformInfo().stop(); - // - // Break cylic reference counts. - // - _node->destroy(); - _node = 0; - // // We can now safely shutdown the communicator. // @@ -738,6 +732,12 @@ NodeService::stop() warning(ostr.str()); } + // + // Break cylic reference counts. + // + _node->shutdown(); + _node = 0; + // // And shutdown the collocated registry. // diff --git a/cpp/src/IceGrid/LocatorI.cpp b/cpp/src/IceGrid/LocatorI.cpp index 4e354c5d9bf..d038ccae641 100644 --- a/cpp/src/IceGrid/LocatorI.cpp +++ b/cpp/src/IceGrid/LocatorI.cpp @@ -150,80 +150,144 @@ private: const Ice::ObjectPrx _obj; }; -} - -LocatorI::Request::Request(const Ice::AMD_Locator_findAdapterByIdPtr& amdCB, - const LocatorIPtr& locator, - const string& id, - bool replicaGroup, - bool roundRobin, - const LocatorAdapterInfoSeq& adapters, - int count) : - _amdCB(amdCB), - _locator(locator), - _id(id), - _replicaGroup(replicaGroup), - _roundRobin(roundRobin), - _adapters(adapters), - _traceLevels(locator->getTraceLevels()), - _count(count), - _lastAdapter(_adapters.begin()) +class AdapterRequest : public LocatorI::Request { - assert((_count == 0 && _adapters.empty()) || _count > 0); -} +public: -void -LocatorI::Request::execute() + AdapterRequest(const Ice::AMD_Locator_findAdapterByIdPtr& amdCB, + const LocatorIPtr& locator, + const LocatorAdapterInfo& adapter) : + _amdCB(amdCB), + _locator(locator), + _adapter(adapter), + _traceLevels(locator->getTraceLevels()) + { + assert(_adapter.proxy); + } + + virtual void + execute() + { + _locator->getDirectProxy(_adapter, this); + } + + virtual void + activating(const string&) + { + // Nothing to do. + } + + virtual void + response(const std::string&, const Ice::ObjectPrx& proxy) + { + assert(proxy); + _amdCB->ice_response(proxy->ice_identity(_locator->getCommunicator()->stringToIdentity("dummy"))); + } + + virtual void + exception(const std::string&, const Ice::Exception& ex) + { + if(_traceLevels->locator > 0) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->locatorCat); + out << "couldn't resolve adapter`" << _adapter.id << "' endpoints:\n" << toString(ex); + } + _amdCB->ice_response(0); + } + +private: + + const Ice::AMD_Locator_findAdapterByIdPtr _amdCB; + const LocatorIPtr _locator; + const LocatorAdapterInfo _adapter; + const TraceLevelsPtr _traceLevels; +}; + +class ReplicaGroupRequest : public LocatorI::Request, public IceUtil::Mutex { - // - // If there's no adapters to request, we're done, send the - // response. - // - if(_adapters.empty()) +public: + + ReplicaGroupRequest(const Ice::AMD_Locator_findAdapterByIdPtr& amdCB, + const LocatorIPtr& locator, + const string& id, + const LocatorAdapterInfoSeq& adapters, + int count, + Ice::ObjectPrx firstProxy) : + _amdCB(amdCB), + _locator(locator), + _id(id), + _adapters(adapters), + _traceLevels(locator->getTraceLevels()), + _count(count), + _lastAdapter(_adapters.begin()) { - sendResponse(); - return; + assert(_adapters.empty() || _count > 0); + + if(_adapters.empty()) + { + _count = 0; + } + + // + // If the first adapter proxy is provided, store it in _proxies. + // + if(firstProxy) + { + assert(!_adapters.empty()); + _proxies[_adapters[0].id] = firstProxy; + ++_lastAdapter; + } } - // - // Otherwise, request as many adapters as required. - // - LocatorAdapterInfoSeq adapters; + virtual void + execute() { - Lock sync(*this); - assert(_count > 0 && _lastAdapter != _adapters.end()); - for(unsigned int i = static_cast(_proxies.size()); i < _count; ++i) + // + // Otherwise, request as many adapters as required. + // + LocatorAdapterInfoSeq adapters; { - if(_lastAdapter == _adapters.end()) + Lock sync(*this); + for(unsigned int i = static_cast(_proxies.size()); i < _count; ++i) { - _count = i; - break; + if(_lastAdapter == _adapters.end()) + { + _count = i; + break; + } + assert(_lastAdapter->proxy); + adapters.push_back(*_lastAdapter); + ++_lastAdapter; + } + + // + // If there's no adapters to request, we're done, send the + // response. + // + if(_proxies.size() == _count) + { + sendResponse(); + return; } - assert(_lastAdapter->proxy); - adapters.push_back(*_lastAdapter); - ++_lastAdapter; } - } + - for(LocatorAdapterInfoSeq::const_iterator p = adapters.begin(); p != adapters.end(); ++p) - { - if(_locator->getDirectProxy(*p, this)) + for(LocatorAdapterInfoSeq::const_iterator p = adapters.begin(); p != adapters.end(); ++p) { - activating(); + if(_locator->getDirectProxy(*p, this)) + { + activating(p->id); + } } } -} -void -LocatorI::Request::activating() -{ - // - // An adapter is being activated. If this is a request for a replica group, don't - // wait for the activation to complete. Instead, we query the next adapter which - // might be already active. - // - if(_replicaGroup) + virtual void + activating(const string&) { + // + // An adapter is being activated. Don't wait for the activation to complete. Instead, + // we query the next adapter which might be already active. + // LocatorAdapterInfo adapter; do { @@ -237,150 +301,332 @@ LocatorI::Request::activating() } while(_locator->getDirectProxy(adapter, this)); } -} + + virtual void + exception(const string& id, const Ice::Exception& ex) + { + LocatorAdapterInfo adapter; + { + Lock sync(*this); + if(_proxies.size() == _count) // Nothing to do if we already sent the response. + { + return; + } + + if(!_exception.get()) + { + _exception.reset(ex.ice_clone()); + } + + if(_lastAdapter == _adapters.end()) + { + --_count; // Expect one less adapter proxy if there's no more adapters to query. + + // + // If we received all the required proxies, it's time to send the + // answer back to the client. + // + if(_count == _proxies.size()) + { + sendResponse(); + } + } + else + { + adapter = *_lastAdapter; + ++_lastAdapter; + } + } -void -LocatorI::Request::exception(const string& id, const Ice::Exception& ex) -{ - LocatorAdapterInfo adapter; + if(adapter.proxy) + { + if(_locator->getDirectProxy(adapter, this)) + { + activating(adapter.id); + } + } + } + + virtual void + response(const string& id, const Ice::ObjectPrx& proxy) { Lock sync(*this); + assert(proxy); if(_proxies.size() == _count) // Nothing to do if we already sent the response. { return; } - if(!_exception.get()) + + _proxies[id] = proxy->ice_identity(_locator->getCommunicator()->stringToIdentity("dummy")); + + // + // If we received all the required proxies, it's time to send the + // answer back to the client. + // + if(_proxies.size() == _count) { - _exception.reset(ex.ice_clone()); + sendResponse(); } - - if(_lastAdapter == _adapters.end()) + } + +private: + + void + sendResponse() + { + if(_proxies.size() == 1) + { + _amdCB->ice_response(_proxies.begin()->second); + } + else if(_proxies.empty()) { - --_count; // Expect one less adapter proxy if there's no more adapters to query. - // - // If we received all the required proxies, it's time to send the - // answer back to the client. + // If there's no proxies, it's either because we couldn't contact the adapters or + // because the replica group has no members. // - if(_count == _proxies.size()) + assert(_exception.get() || _adapters.empty()); + if(_traceLevels->locator > 0) { - sendResponse(); + Ice::Trace out(_traceLevels->logger, _traceLevels->locatorCat); + out << "couldn't resolve replica group `" << _id << "' endpoints:\n"; + out << (_exception.get() ? toString(*_exception) : string("replica group is empty")); } + _amdCB->ice_response(0); } - else + else if(_proxies.size() > 1) { - adapter = *_lastAdapter; - ++_lastAdapter; + Ice::EndpointSeq endpoints; + endpoints.reserve(_proxies.size()); + for(LocatorAdapterInfoSeq::const_iterator p = _adapters.begin(); p != _adapters.end(); ++p) + { + map::const_iterator q = _proxies.find(p->id); + if(q != _proxies.end()) + { + Ice::EndpointSeq edpts = q->second->ice_getEndpoints(); + endpoints.insert(endpoints.end(), edpts.begin(), edpts.end()); + } + } + + Ice::ObjectPrx proxy = _locator->getCommunicator()->stringToProxy("dummy:default"); + _amdCB->ice_response(proxy->ice_endpoints(endpoints)); } } - if(adapter.proxy) + const Ice::AMD_Locator_findAdapterByIdPtr _amdCB; + const LocatorIPtr _locator; + const std::string _id; + LocatorAdapterInfoSeq _adapters; + const TraceLevelsPtr _traceLevels; + unsigned int _count; + LocatorAdapterInfoSeq::const_iterator _lastAdapter; + std::map _proxies; + std::auto_ptr _exception; +}; + +class RoundRobinRequest : public LocatorI::Request, public IceUtil::Mutex +{ +public: + + RoundRobinRequest(const Ice::AMD_Locator_findAdapterByIdPtr& amdCB, + const LocatorIPtr& locator, + const string& id, + const LocatorAdapterInfoSeq& adapters, + int count) : + _amdCB(amdCB), + _locator(locator), + _id(id), + _adapters(adapters), + _traceLevels(locator->getTraceLevels()), + _count(count), + _waitForActivation(false) { + assert(_adapters.empty() || _count > 0); + } + + virtual void + execute() + { + if(_adapters.empty()) + { + if(_traceLevels->locator > 0) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->locatorCat); + out << "couldn't resolve replica group `" << _id << "' endpoints:\nreplica group is empty"; + } + _amdCB->ice_response(0); + return; + } + + LocatorAdapterInfo adapter = _adapters[0]; + assert(adapter.proxy); if(_locator->getDirectProxy(adapter, this)) { - activating(); + activating(adapter.id); } } -} -void -LocatorI::Request::response(const string& id, const Ice::ObjectPrx& proxy) -{ - if(!proxy) + virtual void + activating(const string& id) { - exception(id, AdapterNotActiveException()); - return; + LocatorAdapterInfo adapter; + adapter.id = id; + do + { + Lock sync(*this); + if(_adapters.empty() || _waitForActivation) + { + return; + } + _activatingOrFailed.insert(adapter.id); + adapter = nextAdapter(); + } + while(adapter.proxy && _locator->getDirectProxy(adapter, this)); } - Lock sync(*this); - if(_proxies.size() == _count) // Nothing to do if we already sent the response. + virtual void + response(const std::string& id, const Ice::ObjectPrx& proxy) { - return; - } - - _proxies[id] = proxy->ice_identity(_locator->getCommunicator()->stringToIdentity("dummy")); + Lock sync(*this); + assert(proxy); + if(_adapters.empty() || id != _adapters[0].id) + { + return; + } - // - // If we received all the required proxies, it's time to send the - // answer back to the client. - // - if(_proxies.size() == _count) - { - sendResponse(); + if(_count > 1) + { + Ice::ObjectPrx p = proxy->ice_identity(_locator->getCommunicator()->stringToIdentity("dummy")); + LocatorI::RequestPtr request = new ReplicaGroupRequest(_amdCB, _locator, _id, _adapters, _count, p); + request->execute(); + } + else + { + _amdCB->ice_response(proxy->ice_identity(_locator->getCommunicator()->stringToIdentity("dummy"))); + } + _adapters.clear(); } -} -void -LocatorI::Request::sendResponse() -{ - int roundRobinCount = 0; - if(_proxies.size() == 1) + virtual void + exception(const std::string& id, const Ice::Exception& ex) { - if(_roundRobin) + LocatorAdapterInfo adapter; { - for(LocatorAdapterInfoSeq::const_iterator p = _adapters.begin(); p != _adapters.end(); ++p) + Lock sync(*this); + _failed.insert(id); + _activatingOrFailed.insert(id); + + if(!_exception.get()) { - if(_proxies.find(p->id) != _proxies.end()) - { - break; - } - // - // We count the number of object adapters which are inactive until we find - // one active. This count will be used to update the round robin counter. - // - ++roundRobinCount; + _exception.reset(ex.ice_clone()); } + + if(_adapters.empty() || id != _adapters[0].id) + { + return; + } + + adapter = nextAdapter(); } - _amdCB->ice_response(_proxies.begin()->second); - } - else if(_proxies.empty()) - { - // - // If there's no proxies, it's either because we couldn't - // contact the adapters or because the replica group has - // no members. - // - assert(_exception.get() || (_replicaGroup && _adapters.empty())); - if(_traceLevels->locator > 0) + if(adapter.proxy && _locator->getDirectProxy(adapter, this)) { - Ice::Trace out(_traceLevels->logger, _traceLevels->locatorCat); - out << "couldn't resolve " << (_replicaGroup ? "replica group `" : "adapter `") << _id << "' endpoints:\n"; - out << (_exception.get() ? toString(*_exception) : string("replica group is empty")); + activating(adapter.id); } - _amdCB->ice_response(0); } - else if(_proxies.size() > 1) + +private: + + LocatorAdapterInfo + nextAdapter() { - Ice::EndpointSeq endpoints; - endpoints.reserve(_proxies.size()); - for(LocatorAdapterInfoSeq::const_iterator p = _adapters.begin(); p != _adapters.end(); ++p) + bool replicaGroup; + bool roundRobin; + + _adapters.clear(); + + try { - map::const_iterator q = _proxies.find(p->id); - if(q != _proxies.end()) + if(!_waitForActivation) { - Ice::EndpointSeq edpts = q->second->ice_getEndpoints(); - endpoints.insert(endpoints.end(), edpts.begin(), edpts.end()); + _locator->getAdapterInfo(_id, _adapters, _count, replicaGroup, roundRobin, _activatingOrFailed); } - else if(_roundRobin && endpoints.empty()) + + if(_waitForActivation || (_adapters.empty() && _activatingOrFailed.size() > _failed.size())) { // - // We count the number of object adapters which are inactive until we find - // one active. This count will be used to update the round robin counter. + // If there are no more adapters to try and some servers were being activated, we + // try again but this time we wait for the server activation. // - ++roundRobinCount; + _locator->getAdapterInfo(_id, _adapters, _count, replicaGroup, roundRobin, _failed); + _waitForActivation = true; } - } - Ice::ObjectPrx proxy = _locator->getCommunicator()->stringToProxy("dummy:default"); - _amdCB->ice_response(proxy->ice_endpoints(endpoints)); + if(!roundRobin) + { + LocatorI::RequestPtr request; + if(replicaGroup) + { + request = new ReplicaGroupRequest(_amdCB, _locator, _id, _adapters, _count, 0); + } + else + { + assert(!_adapters.empty()); + request = new AdapterRequest(_amdCB, _locator, _adapters[0]); + } + request->execute(); + _adapters.clear(); + return LocatorAdapterInfo(); + } + else if(!_adapters.empty()) + { + return _adapters[0]; + } + else + { + assert(_adapters.empty()); + if(_traceLevels->locator > 0) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->locatorCat); + out << "couldn't resolve replica group `" << _id << "' endpoints:\n"; + out << (_exception.get() ? toString(*_exception) : string("replica group is empty")); + } + _amdCB->ice_response(0); + return LocatorAdapterInfo(); + } + } + catch(const AdapterNotExistException&) + { + assert(_adapters.empty()); + _amdCB->ice_exception(Ice::AdapterNotFoundException()); + return LocatorAdapterInfo(); + } + catch(const Ice::Exception& ex) + { + assert(_adapters.empty()); + if(_traceLevels->locator > 0) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->locatorCat); + out << "couldn't resolve replica group `" << _id << "' endpoints:\n" << toString(ex); + } + _amdCB->ice_response(0); + return LocatorAdapterInfo(); + } } - if(_roundRobin) - { - _locator->removePendingRoundRobinRequest(_id, roundRobinCount); - } -} + const Ice::AMD_Locator_findAdapterByIdPtr _amdCB; + const LocatorIPtr _locator; + const std::string _id; + LocatorAdapterInfoSeq _adapters; + const TraceLevelsPtr _traceLevels; + int _count; + bool _waitForActivation; + set _failed; + set _activatingOrFailed; + std::auto_ptr _exception; +}; + +}; + LocatorI::LocatorI(const Ice::CommunicatorPtr& communicator, const DatabasePtr& database, @@ -444,22 +690,6 @@ LocatorI::findAdapterById_async(const Ice::AMD_Locator_findAdapterByIdPtr& cb, const Ice::Current&) const { LocatorIPtr self = const_cast(this); - bool pending = false; - if(self->addPendingRoundRobinRequest(id, cb, true, pending)) // Add only if there's already round robin requests - // pending. - { - // - // Another request is currently resolving the adapter endpoints. We'll - // answer this request once it's done. - // - return; - } - - // - // If no other request is resolving the adapter endpoints, resolve - // the endpoints now. - // - bool replicaGroup = false; try { @@ -472,36 +702,24 @@ LocatorI::findAdapterById_async(const Ice::AMD_Locator_findAdapterByIdPtr& cb, LocatorAdapterInfoSeq adapters; bool roundRobin; _database->getAdapter(id)->getLocatorAdapterInfo(adapters, count, replicaGroup, roundRobin); - - // - // Round robin replica group requests are serialized. This is - // required to make sure the round robin counter is accurate - // even if some adapters are unreachable (bug 2576). For - // adapters, and replica groups, there's no need to serialize - // the requests. - // + RequestPtr request; if(roundRobin) { - if(self->addPendingRoundRobinRequest(id, cb, false, pending)) - { - return; - } + request = new RoundRobinRequest(cb, self, id, adapters, count); } - else if(pending) + else if(replicaGroup) { - self->removePendingRoundRobinRequest(id, 0); + request = new ReplicaGroupRequest(cb, self, id, adapters, count, 0); + } + else + { + assert(adapters.size() == 1); + request = new AdapterRequest(cb, self, adapters[0]); } - - RequestPtr request = new Request(cb, self, id, replicaGroup, roundRobin, adapters, count); request->execute(); } catch(const AdapterNotExistException&) { - if(pending) - { - self->removePendingRoundRobinRequest(id, 0); - } - try { cb->ice_response(_database->getAdapterDirectProxy(id)); @@ -514,11 +732,6 @@ LocatorI::findAdapterById_async(const Ice::AMD_Locator_findAdapterByIdPtr& cb, } catch(const Ice::Exception& ex) { - if(pending) - { - self->removePendingRoundRobinRequest(id, 0); - } - const TraceLevelsPtr traceLevels = _database->getTraceLevels(); if(traceLevels->locator > 0) { @@ -567,78 +780,6 @@ LocatorI::getTraceLevels() const return _database->getTraceLevels(); } -bool -LocatorI::addPendingRoundRobinRequest(const string& adapterId, - const Ice::AMD_Locator_findAdapterByIdPtr& cb, - bool addIfExists, - bool& pending) -{ - Lock sync(*this); - pending = false; - map >::iterator p = _resolves.find(adapterId); - if(p == _resolves.end()) - { - if(addIfExists) - { - return false; - } - p = _resolves.insert(make_pair(adapterId, deque())).first; - } - else if(p->second.front().get() == cb.get()) - { - pending = true; - return false; - } - - p->second.push_back(cb); - return p->second.size() > 1; -} - -void -LocatorI::removePendingRoundRobinRequest(const string& adapterId, int roundRobinCount) -{ - Ice::AMD_Locator_findAdapterByIdPtr cb; - { - Lock sync(*this); - - // - // Bump the round robin counter. We bump the round robin counter by - // the number of inactive adapters. This ensures that if the first - // adapters are inactive, if the first adapter to be inactive is the - // Nth adapter, the next adapter to be returned will be the Nth + 1. - // - if(roundRobinCount > 0) - { - try - { - _database->getAdapter(adapterId)->increaseRoundRobinCount(roundRobinCount); - } - catch(const Ice::Exception&) - { - // Ignore. - } - } - - map >::iterator p = _resolves.find(adapterId); - assert(p != _resolves.end()); - - p->second.pop_front(); - if(p->second.empty()) - { - _resolves.erase(p); - } - else - { - cb = p->second.front(); - } - } - - if(cb) - { - findAdapterById_async(cb, adapterId); - } -} - bool LocatorI::getDirectProxy(const LocatorAdapterInfo& adapter, const RequestPtr& request) { @@ -673,9 +814,19 @@ LocatorI::getDirectProxyResponse(const LocatorAdapterInfo& adapter, const Ice::O _activating.erase(adapter.id); } - for(PendingRequests::iterator q = requests.begin(); q != requests.end(); ++q) + if(proxy) { - (*q)->response(adapter.id, proxy); + for(PendingRequests::iterator q = requests.begin(); q != requests.end(); ++q) + { + (*q)->response(adapter.id, proxy); + } + } + else + { + for(PendingRequests::iterator q = requests.begin(); q != requests.end(); ++q) + { + (*q)->exception(adapter.id, AdapterNotActiveException()); + } } } @@ -717,7 +868,7 @@ LocatorI::getDirectProxyException(const LocatorAdapterInfo& adapter, const Ice:: { for(PendingRequests::iterator q = requests.begin(); q != requests.end(); ++q) { - (*q)->activating(); + (*q)->activating(adapter.id); } AMI_Adapter_activatePtr amiCB = new AMI_Adapter_activateI(this, adapter); @@ -732,3 +883,14 @@ LocatorI::getDirectProxyException(const LocatorAdapterInfo& adapter, const Ice:: } } } + +void +LocatorI::getAdapterInfo(const string& id, + LocatorAdapterInfoSeq& adapters, + int& count, + bool& replicaGroup, + bool& roundRobin, + const set& excludes) +{ + _database->getAdapter(id)->getLocatorAdapterInfo(adapters, count, replicaGroup, roundRobin, excludes); +} diff --git a/cpp/src/IceGrid/LocatorI.h b/cpp/src/IceGrid/LocatorI.h index 51befd24e85..124b62b7dc1 100644 --- a/cpp/src/IceGrid/LocatorI.h +++ b/cpp/src/IceGrid/LocatorI.h @@ -34,40 +34,14 @@ class LocatorI : public Locator, public IceUtil::Mutex { public: - class Request : public IceUtil::Mutex, public IceUtil::Shared + class Request : public IceUtil::Shared { public: - Request(const Ice::AMD_Locator_findAdapterByIdPtr&, const LocatorIPtr&, const std::string&, bool, bool, - const LocatorAdapterInfoSeq&, int); - - void execute(); - void response(const std::string&, const Ice::ObjectPrx&); - void activating(); - void exception(const std::string&, const Ice::Exception&); - - virtual bool - operator<(const Request& r) const - { - return this < &r; - } - - private: - - void requestAdapter(const LocatorAdapterInfo&); - void sendResponse(); - - const Ice::AMD_Locator_findAdapterByIdPtr _amdCB; - const LocatorIPtr _locator; - const std::string _id; - const bool _replicaGroup; - const bool _roundRobin; - LocatorAdapterInfoSeq _adapters; - const TraceLevelsPtr _traceLevels; - unsigned int _count; - LocatorAdapterInfoSeq::const_iterator _lastAdapter; - std::map _proxies; - std::auto_ptr _exception; + virtual void execute() = 0; + virtual void activating(const std::string&) = 0; + virtual void response(const std::string&, const Ice::ObjectPrx&) = 0; + virtual void exception(const std::string&, const Ice::Exception&) = 0; }; typedef IceUtil::Handle RequestPtr; @@ -87,13 +61,12 @@ public: const Ice::CommunicatorPtr& getCommunicator() const; const TraceLevelsPtr& getTraceLevels() const; - bool addPendingRoundRobinRequest(const std::string&, const Ice::AMD_Locator_findAdapterByIdPtr&, bool, bool&); - void removePendingRoundRobinRequest(const std::string&, int); - bool getDirectProxy(const LocatorAdapterInfo&, const RequestPtr&); void getDirectProxyResponse(const LocatorAdapterInfo&, const Ice::ObjectPrx&); void getDirectProxyException(const LocatorAdapterInfo&, const Ice::Exception&); + void getAdapterInfo(const std::string&, LocatorAdapterInfoSeq&, int&, bool&, bool&, const std::set&); + protected: const Ice::CommunicatorPtr _communicator; @@ -106,8 +79,6 @@ protected: typedef std::map PendingRequestsMap; PendingRequestsMap _pendingRequests; std::set _activating; - - std::map > _resolves; }; } diff --git a/cpp/src/IceGrid/NodeI.cpp b/cpp/src/IceGrid/NodeI.cpp index 6381b39760e..77ed21db79e 100644 --- a/cpp/src/IceGrid/NodeI.cpp +++ b/cpp/src/IceGrid/NodeI.cpp @@ -831,9 +831,17 @@ NodeI::read(const string& filename, Ice::Long pos, int size, Ice::Long& newPos, } void -NodeI::destroy() +NodeI::shutdown() { IceUtil::Mutex::Lock sync(_serversLock); + for(map >::const_iterator p = _serversByApplication.begin(); + p != _serversByApplication.end(); ++p) + { + for(set::const_iterator q = p->second.begin(); q != p->second.end(); ++q) + { + (*q)->shutdown(); + } + } _serversByApplication.clear(); } diff --git a/cpp/src/IceGrid/NodeI.h b/cpp/src/IceGrid/NodeI.h index 087d661a49d..46c6470bb83 100644 --- a/cpp/src/IceGrid/NodeI.h +++ b/cpp/src/IceGrid/NodeI.h @@ -92,7 +92,7 @@ public: virtual Ice::Long getOffsetFromEnd(const std::string&, int, const Ice::Current&) const; virtual bool read(const std::string&, Ice::Long, int, Ice::Long&, Ice::StringSeq&, const Ice::Current&) const; - void destroy(); + void shutdown(); IceUtil::TimerPtr getTimer() const; Ice::CommunicatorPtr getCommunicator() const; diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index 79b5cd80b67..b01219c4e46 100644 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -1693,6 +1693,14 @@ ServerI::terminated(const string& msg, int status) } } +void +ServerI::shutdown() +{ + Lock sync(*this); + assert(_state == ServerI::Inactive); + _timerTask = 0; +} + void ServerI::update() { diff --git a/cpp/src/IceGrid/ServerI.h b/cpp/src/IceGrid/ServerI.h index 375a5c1fc80..9d04b017b7f 100644 --- a/cpp/src/IceGrid/ServerI.h +++ b/cpp/src/IceGrid/ServerI.h @@ -109,6 +109,7 @@ public: void update(); void destroy(); void terminated(const std::string&, int); + void shutdown(); // // A proxy to the Process facet of the real Admin object; called by the AdminFacade servant implementation diff --git a/cpp/test/IceGrid/replicaGroup/AllTests.cpp b/cpp/test/IceGrid/replicaGroup/AllTests.cpp index 3cb2e93e487..2484c62dc1f 100644 --- a/cpp/test/IceGrid/replicaGroup/AllTests.cpp +++ b/cpp/test/IceGrid/replicaGroup/AllTests.cpp @@ -230,17 +230,73 @@ allTests(const Ice::CommunicatorPtr& comm) params["id"] = "Server3"; instantiateServer(admin, "Server", "localnode", params); TestIntfPrx obj = TestIntfPrx::uncheckedCast(comm->stringToProxy("RoundRobin")); + obj = TestIntfPrx::uncheckedCast(obj->ice_locatorCacheTimeout(0)); + obj = TestIntfPrx::uncheckedCast(obj->ice_connectionCached(false)); try { test(obj->getReplicaIdAndShutdown() == "Server1.ReplicatedAdapter"); test(obj->getReplicaIdAndShutdown() == "Server2.ReplicatedAdapter"); test(obj->getReplicaIdAndShutdown() == "Server3.ReplicatedAdapter"); + + admin->enableServer("Server1", false); + admin->enableServer("Server2", false); + admin->enableServer("Server3", false); + + try + { + obj->getReplicaId(); + test(false); + } + catch(const Ice::NoEndpointException&) + { + } + + admin->enableServer("Server1", true); + admin->enableServer("Server2", true); + admin->enableServer("Server3", true); + + set adapterIds; + string previousId; + while(adapterIds.size() != 3) + { + string id = obj->getReplicaId(); + adapterIds.insert(id); + + if(adapterIds.size() == 1) + { + previousId = id; + } + else + { + test(previousId != id); + previousId = id; + } + } + + int i; + for(i = 0; i < 3; i++) + { + if(obj->getReplicaId() == "Server3.ReplicatedAdapter") + { + break; + } + } + test(i != 3); + + test(obj->getReplicaId() == "Server1.ReplicatedAdapter"); + test(obj->getReplicaId() == "Server2.ReplicatedAdapter"); + test(obj->getReplicaId() == "Server3.ReplicatedAdapter"); + + test(obj->getReplicaIdAndShutdown() == "Server1.ReplicatedAdapter"); + test(obj->getReplicaIdAndShutdown() == "Server2.ReplicatedAdapter"); + test(obj->getReplicaIdAndShutdown() == "Server3.ReplicatedAdapter"); } catch(const Ice::LocalException& ex) { cerr << ex << endl; test(false); } + removeServer(admin, "Server1"); removeServer(admin, "Server2"); removeServer(admin, "Server3"); @@ -344,6 +400,42 @@ allTests(const Ice::CommunicatorPtr& comm) test(false); } } + + admin->stopServer("Server1"); + admin->stopServer("Server2"); + admin->stopServer("Server3"); + + admin->enableServer("Server1", false); + admin->enableServer("Server2", false); + admin->enableServer("Server3", false); + + try + { + obj->getReplicaId(); + test(false); + } + catch(const Ice::NoEndpointException&) + { + } + + admin->enableServer("Server1", true); + admin->enableServer("Server2", true); + admin->enableServer("Server3", true); + + replicaIds = serverReplicaIds; + while(!replicaIds.empty()) + { + try + { + replicaIds.erase(obj->getReplicaIdAndShutdown()); + } + catch(const Ice::LocalException& ex) + { + cerr << ex << endl; + test(false); + } + } + removeServer(admin, "Server1"); removeServer(admin, "Server2"); removeServer(admin, "Server3"); @@ -489,6 +581,18 @@ allTests(const Ice::CommunicatorPtr& comm) test(expected.find(replicaId) != expected.end()); replicaIds.erase(replicaId); } + + admin->stopServer("Server1"); + admin->stopServer("Server2"); + admin->stopServer("Server3"); + + obj->ice_locatorCacheTimeout(0)->ice_ping(); + int nRetry = 500; + while(replicaIds.size() != 2 && --nRetry > 0) + { + replicaIds.insert(obj->getReplicaId()); + } + test(replicaIds.size() == 2); } catch(const Ice::LocalException& ex) { -- cgit v1.2.3