diff options
author | Matthew Newhook <matthew@zeroc.com> | 2009-01-09 11:49:20 -0330 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2009-01-09 11:49:20 -0330 |
commit | 9117e9040c02465cb9f0a1e0bcc6aa963f71c61a (patch) | |
tree | ef345adb5612327136e70c8207182e015dfc6349 | |
parent | Fixed NRVO demo depend file (diff) | |
parent | http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=3553. database demo uses w... (diff) | |
download | ice-9117e9040c02465cb9f0a1e0bcc6aa963f71c61a.tar.bz2 ice-9117e9040c02465cb9f0a1e0bcc6aa963f71c61a.tar.xz ice-9117e9040c02465cb9f0a1e0bcc6aa963f71c61a.zip |
Merge commit 'origin/R3_3_branch'
Conflicts:
cs/demo/WCF/latency/Client.cs
cs/demo/WCF/latency_m/Client.cs
cs/demo/WCF/throughput/Client.cs
cs/demo/WCF/throughput_m/Client.cs
cs/demo/WCF/throughput_m/Service.cs
java/demo/Database/library/BookI.java
java/demo/Database/library/BookQueryResultI.java
java/demo/Database/library/Client.java
java/demo/Database/library/ConnectionPool.java
java/demo/Database/library/DispatchInterceptorI.java
java/demo/Database/library/Glacier2Session.ice
java/demo/Database/library/Glacier2SessionManagerI.java
java/demo/Database/library/Grammar.java
java/demo/Database/library/Library.ice
java/demo/Database/library/LibraryI.java
java/demo/Database/library/Parser.java
java/demo/Database/library/ReapThread.java
java/demo/Database/library/RunParser.java
java/demo/Database/library/SQLRequestContext.java
java/demo/Database/library/Scanner.java
java/demo/Database/library/Server.java
java/demo/Database/library/Session.ice
java/demo/Database/library/SessionFactoryI.java
java/demo/Database/library/SessionI.java
java/demo/Database/library/Token.java
java/demo/Database/library/build.xml
java/demo/Database/library/config.client
208 files changed, 1568 insertions, 4545 deletions
@@ -67,6 +67,18 @@ C++ Changes incorrectly be sent compressed or not compressed. +Java Changes +============ + +- Added methods to the IceSSL plug-in to allow keystores, truststores, + and RNG seeds to be specified using input streams. + +- Fixed the IceSSL.ConnectionInfo type so that the "incoming" and + "adapterName" members are public. + +- Added applet demo. + + C# Changes ========== @@ -465,7 +477,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 @@ -502,7 +514,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 @@ -795,7 +807,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/config/Make.common.rules b/config/Make.common.rules index 32cfb6e74b5..88fb0450832 100644 --- a/config/Make.common.rules +++ b/config/Make.common.rules @@ -14,7 +14,7 @@ SHELL = /bin/sh VERSION_MAJOR = 3 VERSION_MINOR = 3 -VERSION = 3.3.0 +VERSION = 3.3.1 SHORT_VERSION = 3.3 SOVERSION = 33 @@ -295,7 +295,7 @@ ifeq ($(installprogram),) endif ifeq ($(mkdir),) - mkdir = mkdir $(1) ; \ + mkdir = mkdir $(1) $(2); \ chmod a+rx $(1) endif @@ -305,13 +305,13 @@ install-common:: @if test ! -d $(prefix) ; \ then \ echo "Creating $(prefix)..." ; \ - $(call mkdir,$(prefix)) ; \ + $(call mkdir,$(prefix), -p) ; \ fi @if test ! -d $(install_slicedir) ; \ then \ echo "Creating $(install_slicedir)..." ; \ - $(call mkdir,$(install_slicedir)) ; \ + $(call mkdir, $(install_slicedir)) ; \ cd $(top_srcdir)/../slice ; \ for subdir in * ; \ do \ diff --git a/config/Make.common.rules.mak b/config/Make.common.rules.mak index 1f2deed8d05..70439976b94 100644 --- a/config/Make.common.rules.mak +++ b/config/Make.common.rules.mak @@ -12,8 +12,8 @@ # ----------------------------------------------------------------------
SHELL = /bin/sh
-VERSION = 3.3.0
-INTVERSION = 3.3.0
+VERSION = 3.3.1
+INTVERSION = 3.3.1
SHORT_VERSION = 3.3
SOVERSION = 33
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/demo/Ice/nrvo/.gitignore b/cpp/demo/Ice/nrvo/.gitignore index ee1193c8569..433c17249b4 100644 --- a/cpp/demo/Ice/nrvo/.gitignore +++ b/cpp/demo/Ice/nrvo/.gitignore @@ -3,5 +3,5 @@ // IMPORTANT: Do not edit this file -- any edits made here will be lost! client server -Throughput.cpp -Throughput.h +Nrvo.cpp +Nrvo.h diff --git a/cpp/doc/swish/swish.conf b/cpp/doc/swish/swish.conf index 4a1c7381fa4..d8525b57482 100644 --- a/cpp/doc/swish/swish.conf +++ b/cpp/doc/swish/swish.conf @@ -1,6 +1,6 @@ Replacerules remove /var/www/html/ -IndexDir /var/www/html/doc/Ice-3.3.0/reference -IndexDir /var/www/html/doc/Ice-3.3.0/manual +IndexDir /var/www/html/doc/Ice-3.3.1/reference +IndexDir /var/www/html/doc/Ice-3.3.1/manual IndexOnly .html FileRules filename is _sindex\.html DefaultContents HTML* diff --git a/cpp/doc/swish/swishcgi.conf b/cpp/doc/swish/swishcgi.conf index 03708c2cb86..0baf1371126 100644 --- a/cpp/doc/swish/swishcgi.conf +++ b/cpp/doc/swish/swishcgi.conf @@ -1,6 +1,6 @@ use lib '/var/www/html/doc/swishdir'; -my $ice_version = '3.3.0'; +my $ice_version = '3.3.1'; my $suffix = '-IceTouch'; my $referer = $ENV{HTTP_REFERER} ? $ENV{HTTP_REFERER} : ''; 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<class Y> 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<CertificateVerifier> 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/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h index c79a1b67321..8b2e99ca0a8 100644 --- a/cpp/include/IceUtil/Config.h +++ b/cpp/include/IceUtil/Config.h @@ -218,7 +218,7 @@ typedef long long Int64; // // The Ice version. // -#define ICE_STRING_VERSION "3.3.0" // "A.B.C", with A=major, B=minor, C=patch -#define ICE_INT_VERSION 30300 // AABBCC, with AA=major, BB=minor, CC=patch +#define ICE_STRING_VERSION "3.3.1" // "A.B.C", with A=major, B=minor, C=patch +#define ICE_INT_VERSION 30301 // AABBCC, with AA=major, BB=minor, CC=patch #endif diff --git a/cpp/src/Freeze/Freeze.rc b/cpp/src/Freeze/Freeze.rc index 14424d9e6f2..7b0f81d2f69 100644 --- a/cpp/src/Freeze/Freeze.rc +++ b/cpp/src/Freeze/Freeze.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -23,12 +23,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Freeze DLL\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", INTERNALNAME
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", ORIGINALFILENAME
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/FreezeScript/DumpDB.rc b/cpp/src/FreezeScript/DumpDB.rc index 071e92a3280..a1a7d9d955f 100644 --- a/cpp/src/FreezeScript/DumpDB.rc +++ b/cpp/src/FreezeScript/DumpDB.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Dump Database\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "dumpdb\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "dumpdb.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/FreezeScript/TransformDB.rc b/cpp/src/FreezeScript/TransformDB.rc index 5fbda99e26e..d0d670dc192 100644 --- a/cpp/src/FreezeScript/TransformDB.rc +++ b/cpp/src/FreezeScript/TransformDB.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Transform Database\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "transformdb\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "transformdb.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/Glacier2/Glacier2.rc b/cpp/src/Glacier2/Glacier2.rc index 379a9626d84..b97221f24de 100644 --- a/cpp/src/Glacier2/Glacier2.rc +++ b/cpp/src/Glacier2/Glacier2.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -23,12 +23,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Glacier2 DLL\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", INTERNALNAME
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", ORIGINALFILENAME
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/Glacier2/Glacier2Router.rc b/cpp/src/Glacier2/Glacier2Router.rc index 4d130898819..3a7895aad39 100644 --- a/cpp/src/Glacier2/Glacier2Router.rc +++ b/cpp/src/Glacier2/Glacier2Router.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Glacier2 Router\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "glacier2router\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "glacier2router.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/Ice/CommunicatorI.cpp b/cpp/src/Ice/CommunicatorI.cpp index 65895a3099b..609926aa1df 100644 --- a/cpp/src/Ice/CommunicatorI.cpp +++ b/cpp/src/Ice/CommunicatorI.cpp @@ -71,7 +71,7 @@ printGCStats(const IceInternal::GCStats& stats) void Ice::CommunicatorI::destroy() { - if(_instance->destroy()) + if(_instance && _instance->destroy()) { IceUtil::StaticMutex::Lock sync(gcMutex); @@ -289,15 +289,7 @@ Ice::CommunicatorI::CommunicatorI(const InitializationData& initData) // destructor is invoked. // const_cast<DynamicLibraryListPtr&>(_dynamicLibraryList) = _instance->dynamicLibraryList(); - } - catch(...) - { - __setNoDelete(false); - throw; - } - __setNoDelete(false); - { // // If this is the first communicator that is created, use that communicator's // property settings to determine whether to start the garbage collector. @@ -316,13 +308,25 @@ Ice::CommunicatorI::CommunicatorI(const InitializationData& initData) } if(++communicatorCount == 1) { - theCollector = new IceInternal::GC(gcInterval, printGCStats); + IceUtil::Handle<IceInternal::GC> collector = new IceInternal::GC(gcInterval, printGCStats); if(gcInterval > 0) { - theCollector->start(); + collector->start(); } + + // + // Assign only if start() succeeds, if it fails this makes sure stop isn't called in destroy(). + // + theCollector = collector; } } + catch(...) + { + destroy(); + __setNoDelete(false); + throw; + } + __setNoDelete(false); } Ice::CommunicatorI::~CommunicatorI() @@ -343,7 +347,7 @@ Ice::CommunicatorI::finishSetup(int& argc, char* argv[]) } catch(...) { - _instance->destroy(); + destroy(); throw; } } 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/Ice.rc b/cpp/src/Ice/Ice.rc index 7df22ac01fe..f6f32f15b0f 100644 --- a/cpp/src/Ice/Ice.rc +++ b/cpp/src/Ice/Ice.rc @@ -2,8 +2,8 @@ #include "EventLoggerMsg.rc"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -24,12 +24,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Ice Core DLL\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", INTERNALNAME
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", ORIGINALFILENAME
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index 0bee4814122..c8041f960e5 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -755,7 +755,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; } @@ -764,7 +764,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; } @@ -773,7 +773,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..0b114402ac8 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<PluginPtr> 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<PluginPtr>::reverse_iterator p = initializedPlugins.rbegin(); p != initializedPlugins.rend(); ++p) @@ -118,14 +118,39 @@ Ice::PluginManagerI::destroy() if(_communicator) { - if(_initialized) { map<string, PluginPtr>::iterator r; for(r = _plugins.begin(); r != _plugins.end(); ++r) { - r->second->destroy(); - r->second = 0; + try + { + r->second->destroy(); + r->second = 0; + } + catch(const std::exception& ex) + { + Warning out(getProcessLogger()); + out << "unexpected exception raised by plug-in '" << r->first << "' destruction.\n"; + out << "exception: " << ex.what(); + } + catch(const std::string& str) + { + Warning out(getProcessLogger()); + out << "unexpected exception raised by plug-in '" << r->first << "' destruction.\n"; + out << "exception: " << str; + } + catch(const char* msg) + { + Warning out(getProcessLogger()); + out << "unexpected exception raised by plug-in '" << r->first << "' destruction.\n"; + out << "exception: " << msg; + } + catch(...) + { + Warning out(getProcessLogger()); + out << "unexpected exception raised by plug-in '" << r->first << "' destruction."; + } } } @@ -157,8 +182,8 @@ Ice::PluginManagerI::loadPlugins(int& argc, char* argv[]) // Ice.Plugin.name[.<language>]=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 +197,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 +219,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 +284,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/IceBox.rc b/cpp/src/IceBox/IceBox.rc index 15d42784409..52d6ced0e5b 100644 --- a/cpp/src/IceBox/IceBox.rc +++ b/cpp/src/IceBox/IceBox.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -23,12 +23,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IceBox DLL\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", INTERNALNAME
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", ORIGINALFILENAME
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/IceBox/IceBoxAdmin.rc b/cpp/src/IceBox/IceBoxAdmin.rc index b46b139a178..0c822016c62 100644 --- a/cpp/src/IceBox/IceBoxAdmin.rc +++ b/cpp/src/IceBox/IceBoxAdmin.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IceBox Admin\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "iceboxadmin\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "iceboxadmin.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/IceBox/IceBoxExe.rc b/cpp/src/IceBox/IceBoxExe.rc index c3c63e2086b..6d37edcb4d7 100644 --- a/cpp/src/IceBox/IceBoxExe.rc +++ b/cpp/src/IceBox/IceBoxExe.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -23,12 +23,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IceBox\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", INTERNALNAME
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", ORIGINALFILENAME
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
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/Activator.cpp b/cpp/src/IceGrid/Activator.cpp index c4fd6f90853..0b99b68a417 100644 --- a/cpp/src/IceGrid/Activator.cpp +++ b/cpp/src/IceGrid/Activator.cpp @@ -608,6 +608,15 @@ Activator::activate(const string& name, throw ex; } + int errorFds[2]; + if(pipe(errorFds) != 0) + { + SyscallException ex(__FILE__, __LINE__); + ex.error = getSystemErrno(); + throw ex; + } + + // // Convert to standard argc/argv. // @@ -650,14 +659,14 @@ Activator::activate(const string& name, { ostringstream os; os << gid; - reportChildError(getSystemErrno(), fds[1], "cannot set process group id", os.str().c_str()); + reportChildError(getSystemErrno(), errorFds[1], "cannot set process group id", os.str().c_str()); } if(setuid(uid) == -1) { ostringstream os; os << uid; - reportChildError(getSystemErrno(), fds[1], "cannot set process user id", os.str().c_str()); + reportChildError(getSystemErrno(), errorFds[1], "cannot set process user id", os.str().c_str()); } // @@ -673,7 +682,7 @@ Activator::activate(const string& name, int maxFd = static_cast<int>(sysconf(_SC_OPEN_MAX)); for(int fd = 3; fd < maxFd; ++fd) { - if(fd != fds[1]) + if(fd != fds[1] && fd != errorFds[1]) { close(fd); } @@ -686,7 +695,7 @@ Activator::activate(const string& name, // if(putenv(strdup(env.argv[i])) != 0) { - reportChildError(errno, fds[1], "cannot set environment variable", env.argv[i]); + reportChildError(errno, errorFds[1], "cannot set environment variable", env.argv[i]); } } @@ -697,18 +706,65 @@ Activator::activate(const string& name, { if(chdir(pwdCStr) == -1) { - reportChildError(errno, fds[1], "cannot change working directory to", pwdCStr); + reportChildError(errno, errorFds[1], "cannot change working directory to", pwdCStr); } } + // + // Close on exec the error message file descriptor. + // + int flags = fcntl(errorFds[1], F_GETFD); + flags |= 1; // FD_CLOEXEC + if(fcntl(errorFds[1], F_SETFD, flags) == -1) + { + close(errorFds[1]); + errorFds[1] = -1; + } + if(execvp(av.argv[0], av.argv) == -1) { - reportChildError(errno, fds[1], "cannot execute", av.argv[0]); + if(errorFds[1] != -1) + { + reportChildError(errno, errorFds[1], "cannot execute", av.argv[0]); + } + else + { + reportChildError(errno, fds[1], "cannot execute", av.argv[0]); + } } } else // Parent process. { close(fds[1]); + close(errorFds[1]); + + // + // Read a potential error message over the error message pipe. + // + char s[16]; + ssize_t rs; + string message; + while((rs = read(errorFds[0], &s, 16)) > 0) + { + message.append(s, rs); + } + + // + // If an error occured before the exec() we do some cleanup and throw. + // + if(!message.empty()) + { + close(fds[0]); + close(errorFds[0]); + waitPid(pid); + throw message; + } + + // + // Otherwise, the exec() was successfull and we don't need the error message + // pipe anymore. + // + close(errorFds[0]); Process process; process.pid = pid; @@ -1250,45 +1306,7 @@ Activator::terminationListener() for(vector<Process>::const_iterator p = terminated.begin(); p != terminated.end(); ++p) { - int status; -#if defined(__linux) - int nRetry = 0; - while(true) // The while loop is necessary for the linux workaround. - { - pid_t pid = waitpid(p->pid, &status, 0); - if(pid < 0) - { - // - // Some Linux distribution have a bogus waitpid() (e.g.: CentOS 4.x). It doesn't - // block and reports an incorrect ECHILD error on the first call. We sleep a - // little and retry to work around this issue (it appears from testing that a - // single retry is enough but to make sure we retry up to 10 times before to throw.) - // - if(errno == ECHILD && nRetry < 10) - { - // Wait 1ms, 11ms, 21ms, etc. - IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(nRetry * 10 + 1)); - ++nRetry; - continue; - } - SyscallException ex(__FILE__, __LINE__); - ex.error = getSystemErrno(); - throw ex; - } - assert(pid == p->pid); - break; - } -#else - pid_t pid = waitpid(p->pid, &status, 0); - if(pid < 0) - { - SyscallException ex(__FILE__, __LINE__); - ex.error = getSystemErrno(); - throw ex; - } - assert(pid == p->pid); -#endif - + int status = waitPid(p->pid); if(_traceLevels->activator > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->activatorCat); @@ -1348,3 +1366,49 @@ Activator::setInterrupt() write(_fdIntrWrite, &c, 1); #endif } + +#ifndef _WIN32 +int +Activator::waitPid(pid_t processPid) +{ + int status; +#if defined(__linux) + int nRetry = 0; + while(true) // The while loop is necessary for the linux workaround. + { + pid_t pid = waitpid(processPid, &status, 0); + if(pid < 0) + { + // + // Some Linux distribution have a bogus waitpid() (e.g.: CentOS 4.x). It doesn't + // block and reports an incorrect ECHILD error on the first call. We sleep a + // little and retry to work around this issue (it appears from testing that a + // single retry is enough but to make sure we retry up to 10 times before to throw.) + // + if(errno == ECHILD && nRetry < 10) + { + // Wait 1ms, 11ms, 21ms, etc. + IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(nRetry * 10 + 1)); + ++nRetry; + continue; + } + SyscallException ex(__FILE__, __LINE__); + ex.error = getSystemErrno(); + throw ex; + } + assert(pid == processPid); + break; + } +#else + pid_t pid = waitpid(processPid, &status, 0); + if(pid < 0) + { + SyscallException ex(__FILE__, __LINE__); + ex.error = getSystemErrno(); + throw ex; + } + assert(pid == processPid); +#endif + return status; +} +#endif diff --git a/cpp/src/IceGrid/Activator.h b/cpp/src/IceGrid/Activator.h index 3fa72249b83..0eb8ecccc16 100644 --- a/cpp/src/IceGrid/Activator.h +++ b/cpp/src/IceGrid/Activator.h @@ -61,6 +61,10 @@ private: void terminationListener(); void clearInterrupt(); void setInterrupt(); + +#ifndef _WIN32 + int waitPid(pid_t); +#endif struct Process { 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<string>&) { 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<string>& excludes) { vector<ServerAdapterEntryPtr> replicas; bool adaptive = false; @@ -453,32 +448,28 @@ ReplicaGroupEntry::getLocatorAdapterInfo(LocatorAdapterInfoSeq& adapters, int& n // for(vector<ServerAdapterEntryPtr>::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<string>()); + } + catch(const AdapterNotExistException&) + { + } + catch(const NodeUnreachableException&) + { + } + catch(const DeploymentException&) + { + } } } } -void -ReplicaGroupEntry::increaseRoundRobinCount(int count) -{ - Lock sync(*this); - _lastReplica = (_lastReplica + count) % static_cast<int>(_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<std::string>&) = 0; + void getLocatorAdapterInfo(LocatorAdapterInfoSeq& adapters, int& count, bool& replicaGroup, bool& roundRobin) + { + getLocatorAdapterInfo(adapters, count, replicaGroup, roundRobin, std::set<std::string>()); + } 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<std::string>&); 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<std::string>&); virtual float getLeastLoadedNodeLoad(LoadSample) const; virtual AdapterInfoSeq getAdapterInfo() const; diff --git a/cpp/src/IceGrid/IceGridAdmin.rc b/cpp/src/IceGrid/IceGridAdmin.rc index b93a5b507d6..2e59fbb4eb9 100644 --- a/cpp/src/IceGrid/IceGridAdmin.rc +++ b/cpp/src/IceGrid/IceGridAdmin.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IceGrid Admin\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "icegridadmin\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "icegridadmin.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp index a2d4513d735..4dc9a62e978 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) // } @@ -718,12 +718,6 @@ NodeService::stop() _node->getPlatformInfo().stop(); // - // Break cylic reference counts. - // - _node->destroy(); - _node = 0; - - // // We can now safely shutdown the communicator. // try @@ -739,6 +733,12 @@ NodeService::stop() } // + // Break cylic reference counts. + // + _node->shutdown(); + _node = 0; + + // // And shutdown the collocated registry. // if(_registry) diff --git a/cpp/src/IceGrid/IceGridNode.rc b/cpp/src/IceGrid/IceGridNode.rc index e2ab0456270..bb5e8f6bd8a 100644 --- a/cpp/src/IceGrid/IceGridNode.rc +++ b/cpp/src/IceGrid/IceGridNode.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IceGrid Node\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "icegridnode\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "icegridnode.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/IceGrid/IceGridRegistry.rc b/cpp/src/IceGrid/IceGridRegistry.rc index d5e6c8d9db7..6c8734ee12c 100644 --- a/cpp/src/IceGrid/IceGridRegistry.rc +++ b/cpp/src/IceGrid/IceGridRegistry.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IceGrid Registry\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "icegridregistry\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "icegridregistry.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
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<unsigned int>(_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<unsigned int>(_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<string, Ice::ObjectPrx>::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<std::string, Ice::ObjectPrx> _proxies; + std::auto_ptr<Ice::Exception> _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<string, Ice::ObjectPrx>::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<string> _failed; + set<string> _activatingOrFailed; + std::auto_ptr<Ice::Exception> _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<LocatorI*>(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) { @@ -568,78 +781,6 @@ LocatorI::getTraceLevels() const } bool -LocatorI::addPendingRoundRobinRequest(const string& adapterId, - const Ice::AMD_Locator_findAdapterByIdPtr& cb, - bool addIfExists, - bool& pending) -{ - Lock sync(*this); - pending = false; - map<string, deque<Ice::AMD_Locator_findAdapterByIdPtr> >::iterator p = _resolves.find(adapterId); - if(p == _resolves.end()) - { - if(addIfExists) - { - return false; - } - p = _resolves.insert(make_pair(adapterId, deque<Ice::AMD_Locator_findAdapterByIdPtr>())).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<string, deque<Ice::AMD_Locator_findAdapterByIdPtr> >::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<string>& 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<std::string, Ice::ObjectPrx> _proxies; - std::auto_ptr<Ice::Exception> _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<Request> 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<std::string>&); + protected: const Ice::CommunicatorPtr _communicator; @@ -106,8 +79,6 @@ protected: typedef std::map<std::string, PendingRequests> PendingRequestsMap; PendingRequestsMap _pendingRequests; std::set<std::string> _activating; - - std::map<std::string, std::deque<Ice::AMD_Locator_findAdapterByIdPtr> > _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<string, set<ServerIPtr> >::const_iterator p = _serversByApplication.begin(); + p != _serversByApplication.end(); ++p) + { + for(set<ServerIPtr>::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 @@ -1694,6 +1694,14 @@ ServerI::terminated(const string& msg, int status) } void +ServerI::shutdown() +{ + Lock sync(*this); + assert(_state == ServerI::Inactive); + _timerTask = 0; +} + +void ServerI::update() { ServerCommandPtr command; 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/src/IceGridLib/IceGrid.rc b/cpp/src/IceGridLib/IceGrid.rc index 05dd987c313..da7d0050c1b 100644 --- a/cpp/src/IceGridLib/IceGrid.rc +++ b/cpp/src/IceGridLib/IceGrid.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -23,12 +23,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IceGrid DLL\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", INTERNALNAME
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", ORIGINALFILENAME
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/IcePatch2/IcePatch2.rc b/cpp/src/IcePatch2/IcePatch2.rc index 1a332ad15cd..ddea01a5a08 100644 --- a/cpp/src/IcePatch2/IcePatch2.rc +++ b/cpp/src/IcePatch2/IcePatch2.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -23,12 +23,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IcePatch2 DLL\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", INTERNALNAME
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", ORIGINALFILENAME
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/IcePatch2/IcePatch2Calc.rc b/cpp/src/IcePatch2/IcePatch2Calc.rc index d8669cbf63c..dc2cad85ee1 100644 --- a/cpp/src/IcePatch2/IcePatch2Calc.rc +++ b/cpp/src/IcePatch2/IcePatch2Calc.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IcePatch2 Calc\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "icepatch2calc\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "icepatch2calc.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/IcePatch2/IcePatch2Client.rc b/cpp/src/IcePatch2/IcePatch2Client.rc index 217e315d03c..3bc39547149 100644 --- a/cpp/src/IcePatch2/IcePatch2Client.rc +++ b/cpp/src/IcePatch2/IcePatch2Client.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IcePatch2 Client\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "icepatch2client\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "icepatch2client.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/IcePatch2/IcePatch2Server.rc b/cpp/src/IcePatch2/IcePatch2Server.rc index 20f04919b87..c5c2de68feb 100644 --- a/cpp/src/IcePatch2/IcePatch2Server.rc +++ b/cpp/src/IcePatch2/IcePatch2Server.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IcePatch2 Server\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "icepatch2server\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "icepatch2server.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/IceSSL/AcceptorI.cpp b/cpp/src/IceSSL/AcceptorI.cpp index 677f8235198..0b52afd93fe 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/IceSSL.rc b/cpp/src/IceSSL/IceSSL.rc index 126224986be..8e5ce643742 100644 --- a/cpp/src/IceSSL/IceSSL.rc +++ b/cpp/src/IceSSL/IceSSL.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -23,12 +23,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IceSSL DLL\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", INTERNALNAME
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", ORIGINALFILENAME
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
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/src/IceStorm/IceStorm.rc b/cpp/src/IceStorm/IceStorm.rc index ca1293614cd..e5cfd561100 100644 --- a/cpp/src/IceStorm/IceStorm.rc +++ b/cpp/src/IceStorm/IceStorm.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -23,12 +23,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IceStorm DLL\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", INTERNALNAME
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", ORIGINALFILENAME
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/IceStorm/IceStormAdmin.rc b/cpp/src/IceStorm/IceStormAdmin.rc index 1d14f08c1ab..33065629bae 100644 --- a/cpp/src/IceStorm/IceStormAdmin.rc +++ b/cpp/src/IceStorm/IceStormAdmin.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IceStorm Admin\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "icestormadmin\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "icestormadmin.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/IceStorm/IceStormMigrate.rc b/cpp/src/IceStorm/IceStormMigrate.rc index 8ab9d0dc857..f3f24994f66 100644 --- a/cpp/src/IceStorm/IceStormMigrate.rc +++ b/cpp/src/IceStorm/IceStormMigrate.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IceStorm Migrate\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "icestormmigrate\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "icestormmigrate.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/IceStorm/IceStormService.rc b/cpp/src/IceStorm/IceStormService.rc index 1a950d549cc..84fc9950959 100644 --- a/cpp/src/IceStorm/IceStormService.rc +++ b/cpp/src/IceStorm/IceStormService.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -23,12 +23,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IceStorm Service DLL\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", INTERNALNAME
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", ORIGINALFILENAME
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/IceUtil/IceUtil.rc b/cpp/src/IceUtil/IceUtil.rc index 14a7933927a..956c6589bc1 100644 --- a/cpp/src/IceUtil/IceUtil.rc +++ b/cpp/src/IceUtil/IceUtil.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -23,12 +23,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Ice Utilities DLL\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", INTERNALNAME
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", ORIGINALFILENAME
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/IceXML/IceXML.rc b/cpp/src/IceXML/IceXML.rc index 1cdb092e022..da67d911da0 100644 --- a/cpp/src/IceXML/IceXML.rc +++ b/cpp/src/IceXML/IceXML.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -23,12 +23,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "IceXML DLL\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", INTERNALNAME
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", ORIGINALFILENAME
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/Slice/Slice.rc b/cpp/src/Slice/Slice.rc index ab6c94bb44b..4e322159365 100644 --- a/cpp/src/Slice/Slice.rc +++ b/cpp/src/Slice/Slice.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -23,12 +23,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Slice Utilities DLL\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", INTERNALNAME
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", ORIGINALFILENAME
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/ca/iceca b/cpp/src/ca/iceca index 06db0827a7f..14d0e13e848 100755 --- a/cpp/src/ca/iceca +++ b/cpp/src/ca/iceca @@ -104,7 +104,7 @@ if sys.argv[script] == "import": # script ../lib). For development purposes we also check ".". # checkLocations = [".", os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "..", "lib")), - "/usr/share/Ice-3.3.0"] + "/usr/share/Ice-3.3.1"] for bindir in checkLocations: bindir = os.path.normpath(bindir) if os.path.exists(os.path.join(bindir, "ImportKey.class")): diff --git a/cpp/src/iceserviceinstall/IceServiceInstall.rc b/cpp/src/iceserviceinstall/IceServiceInstall.rc index e45b08059ca..ec031cee122 100644 --- a/cpp/src/iceserviceinstall/IceServiceInstall.rc +++ b/cpp/src/iceserviceinstall/IceServiceInstall.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Service Installer\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "iceserviceinstall\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "iceserviceinstall.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/slice2cpp/Slice2Cpp.rc b/cpp/src/slice2cpp/Slice2Cpp.rc index d5a4b4a90d5..f7fe1cd95b6 100644 --- a/cpp/src/slice2cpp/Slice2Cpp.rc +++ b/cpp/src/slice2cpp/Slice2Cpp.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Slice To C++ Translator\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "slice2cpp\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "slice2cpp.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/slice2cs/Slice2Cs.rc b/cpp/src/slice2cs/Slice2Cs.rc index 7adbc810180..5d9b7390e83 100644 --- a/cpp/src/slice2cs/Slice2Cs.rc +++ b/cpp/src/slice2cs/Slice2Cs.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Slice To C# Translator\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "slice2cs\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "slice2cs.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/slice2docbook/Slice2Docbook.rc b/cpp/src/slice2docbook/Slice2Docbook.rc index 41b5ba967d6..aa15951a456 100644 --- a/cpp/src/slice2docbook/Slice2Docbook.rc +++ b/cpp/src/slice2docbook/Slice2Docbook.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Slice To Docbook Translator\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "slice2docbook\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "slice2docbook.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/slice2freeze/Slice2Freeze.rc b/cpp/src/slice2freeze/Slice2Freeze.rc index 1807c3c99b6..8e12b314086 100644 --- a/cpp/src/slice2freeze/Slice2Freeze.rc +++ b/cpp/src/slice2freeze/Slice2Freeze.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Slice To Freeze Translator\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "slice2freeze\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "slice2freeze.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/slice2freezej/Slice2FreezeJ.rc b/cpp/src/slice2freezej/Slice2FreezeJ.rc index fa382c34d68..0eb44a45fd7 100644 --- a/cpp/src/slice2freezej/Slice2FreezeJ.rc +++ b/cpp/src/slice2freezej/Slice2FreezeJ.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Slice To Freeze for Java Translator\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "slice2freezej\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "slice2freezej.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/slice2html/Slice2Html.rc b/cpp/src/slice2html/Slice2Html.rc index cfa34c2e18b..bd2e770ce9b 100644 --- a/cpp/src/slice2html/Slice2Html.rc +++ b/cpp/src/slice2html/Slice2Html.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Slice To HTML Translator\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "slice2html\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "slice2html.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/slice2java/Slice2Java.rc b/cpp/src/slice2java/Slice2Java.rc index f338b93635f..5f454c00e63 100644 --- a/cpp/src/slice2java/Slice2Java.rc +++ b/cpp/src/slice2java/Slice2Java.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Slice To Java Translator\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "slice2java\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "slice2java.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/slice2py/Slice2Py.rc b/cpp/src/slice2py/Slice2Py.rc index 9d3a470392a..31db7dfc054 100644 --- a/cpp/src/slice2py/Slice2Py.rc +++ b/cpp/src/slice2py/Slice2Py.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Slice To Python Translator\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "slice2py\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "slice2py.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/slice2rb/Slice2Rb.rc b/cpp/src/slice2rb/Slice2Rb.rc index 8c7d59b4671..6ff1a72c82a 100644 --- a/cpp/src/slice2rb/Slice2Rb.rc +++ b/cpp/src/slice2rb/Slice2Rb.rc @@ -1,8 +1,8 @@ #include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 3,3,1,0
+ PRODUCTVERSION 3,3,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Slice To Ruby Translator\0"
- VALUE "FileVersion", "3.3.0\0"
+ VALUE "FileVersion", "3.3.1\0"
VALUE "InternalName", "slice2rb\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "slice2rb.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.3.0\0"
+ VALUE "ProductVersion", "3.3.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/test/Ice/background/.gitignore b/cpp/test/Ice/background/.gitignore index 70003eefc96..fea0e98422a 100644 --- a/cpp/test/Ice/background/.gitignore +++ b/cpp/test/Ice/background/.gitignore @@ -3,7 +3,7 @@ // IMPORTANT: Do not edit this file -- any edits made here will be lost! client server -libTestTransport.so.3.3.0 +libTestTransport.so.3.3.1 libTestTransport.so.33 libTestTransport.so Test.cpp 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/cpp/test/IceGrid/activation/AllTests.cpp b/cpp/test/IceGrid/activation/AllTests.cpp index 5a87e074cd2..c7d449d93f6 100644 --- a/cpp/test/IceGrid/activation/AllTests.cpp +++ b/cpp/test/IceGrid/activation/AllTests.cpp @@ -480,6 +480,26 @@ allTests(const Ice::CommunicatorPtr& communicator) } threads.resize(0); + + try + { + admin->startServer("invalid-pwd-no-oa"); + test(false); + } + catch(const IceGrid::ServerStartException& ex) + { + test(!ex.reason.empty()); + } + + try + { + admin->startServer("invalid-exe-no-oa"); + test(false); + } + catch(const IceGrid::ServerStartException& ex) + { + test(!ex.reason.empty()); + } } catch(const Ice::LocalException& ex) { diff --git a/cpp/test/IceGrid/activation/application.xml b/cpp/test/IceGrid/activation/application.xml index a7a045774eb..92ba5cc5811 100644 --- a/cpp/test/IceGrid/activation/application.xml +++ b/cpp/test/IceGrid/activation/application.xml @@ -61,7 +61,12 @@ <object identity="${server}" type="Test"/> </adapter> </server> - + <server id="invalid-exe-no-oa" exe="./server2"> + <property name="Ice.Admin.Endpoints" value=""/> + </server> + <server id="invalid-pwd-no-oa" exe="./server" pwd="bogus"> + <property name="Ice.Admin.Endpoints" value=""/> + </server> </node> <node name="node-1"> 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<string> 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) { diff --git a/cpp/test/IceGrid/simple/AllTests.cpp b/cpp/test/IceGrid/simple/AllTests.cpp index cb307f6cfa8..30c35817cfe 100644 --- a/cpp/test/IceGrid/simple/AllTests.cpp +++ b/cpp/test/IceGrid/simple/AllTests.cpp @@ -11,6 +11,7 @@ #include <IceUtil/IceUtil.h> #include <IceGrid/Admin.h> #include <IceGrid/Registry.h> +#include <IceGrid/Locator.h> #include <TestCommon.h> #include <Test.h> @@ -74,6 +75,11 @@ allTests(const Ice::CommunicatorPtr& communicator) test(base); cout << "ok" << endl; + cout << "testing IceGrid.Locator is present... " << flush; + IceGrid::LocatorPrx locator = IceGrid::LocatorPrx::uncheckedCast(base); + test(locator); + cout << "ok" << endl; + cout << "testing checked cast... " << flush; TestIntfPrx obj = TestIntfPrx::checkedCast(base); test(obj); diff --git a/cpp/test/IceUtil/condvar/WorkQueue.cpp b/cpp/test/IceUtil/condvar/WorkQueue.cpp index c6045b2ccbd..274c3329452 100644 --- a/cpp/test/IceUtil/condvar/WorkQueue.cpp +++ b/cpp/test/IceUtil/condvar/WorkQueue.cpp @@ -81,14 +81,7 @@ public: { Monitor<Mutex>::Lock lock(*this); _terminate = true; - if(_broadcast) - { - notifyAll(); - } - else - { - notify(); - } + notifyAll(); } bool @@ -113,102 +106,56 @@ public: assert(!_q.empty()); ret = _q.front(); + if(ret % 100 == 0) + { + cout << "." << flush; + } _q.pop_front(); return true; } -private: - const bool _broadcast; - bool _terminate; - list<int> _q; -}; -typedef Handle<Queue> QueuePtr; - -static IceUtil::StaticMutex coutMutex = ICE_STATIC_MUTEX_INITIALIZER; - -class WatchDog : public Thread, public Monitor<Mutex> -{ -public: - - WatchDog(bool verbose) : - _verbose(verbose), _terminate(false), _touches(0), _timeout(0), _overallTouches(0), _overallTimeout(0) - { - } - - - virtual void - run() + int + get() { - Monitor<Mutex>::Lock sync(*this); - - while(true) + Monitor<Mutex>::Lock lock(*this); + while(_q.empty() && !_terminate) { - timedWait(Time::milliSeconds(1000)); - if(!_terminate && _touches == 0) - { - cout << _overallTouches << "/" << _overallTimeout - << ": DEADLOCK DETECTED" << endl; - abort(); - } - - IceUtil::StaticMutex::Lock outputMutex(coutMutex); - if(_verbose) - { - cout << _touches << "(" << _timeout << ") " << flush; - } - _overallTouches += _touches; - _overallTimeout += _timeout; - _touches = 0; - _timeout = 0; - if(_terminate) - { - return; - } + wait(); } - } - void - touch(bool timeout) - { - Monitor<Mutex>::Lock sync(*this); - _touches++; - if(timeout) + // We only report the termination sentinel when the queue is + // empty. + if(_q.empty()) { - _timeout++; + assert(_terminate); + return -1; } - } - void - terminate() - { - Monitor<Mutex>::Lock sync(*this); - _terminate = true; - notify(); - } - - void - dump() - { - cout << _overallTouches << "/" << _overallTimeout; + assert(!_q.empty()); + int ret = _q.front(); + if(ret % 100 == 0) + { + cout << "." << flush; + } + _q.pop_front(); + return ret; } private: - - bool _verbose; + const bool _broadcast; bool _terminate; - int _touches; - int _timeout; - long _overallTouches; - long _overallTimeout; + list<int> _q; }; -typedef Handle<WatchDog> WatchDogPtr; +typedef Handle<Queue> QueuePtr; + +static IceUtil::StaticMutex coutMutex = ICE_STATIC_MUTEX_INITIALIZER; class TestThread : public Thread { public: - TestThread(const CountDownPtr& cd, const WatchDogPtr& dog, const QueuePtr& q) : - _cd(cd), _dog(dog), _q(q) + TestThread(const CountDownPtr& cd, const QueuePtr& q, bool poll) : + _cd(cd), _q(q), _poll(poll) { } virtual void @@ -218,9 +165,14 @@ public: while(true) { int res = 0; - // This is a poll. - bool tout = _q->timedGet(res, Time::milliSeconds(1)); - _dog->touch(!tout); + if(_poll) + { + _q->timedGet(res, Time::milliSeconds(10)); + } + else + { + res = _q->get(); + } if(res == -1) { return; @@ -230,8 +182,8 @@ public: private: const CountDownPtr _cd; - const WatchDogPtr _dog; const QueuePtr _q; + const bool _poll; }; typedef Handle<TestThread> TestThreadPtr; @@ -253,9 +205,9 @@ public: { while(true) { - _q->put(_v); + _q->put(_v++); + ThreadControl::yield(); } - ThreadControl::yield(); } else { @@ -302,12 +254,10 @@ main(int argc, char** argv) int n = atoi(opts.optArg("n").c_str()); bool verbose = opts.isSet("v"); - cout << "running signal/broadcast timeout test... " << flush; + cout << "running signal/broadcast timeout test" << flush; QueuePtr signalQ = new Queue(false); - WatchDogPtr signalDog = new WatchDog(verbose); QueuePtr broadcastQ = new Queue(true); - WatchDogPtr broadcastDog = new WatchDog(verbose); CountDownPtr cd = new CountDown(210); list<TestThreadPtr> testThreads; @@ -316,7 +266,7 @@ main(int argc, char** argv) for(i = 0; i < 100; i++) { - TestThreadPtr p = new TestThread(cd, signalDog, signalQ); + TestThreadPtr p = new TestThread(cd, signalQ, i % 2); p->start(); testThreads.push_back(p); } @@ -329,7 +279,7 @@ main(int argc, char** argv) for(i = 0; i < 100; i++) { - TestThreadPtr p = new TestThread(cd, broadcastDog, broadcastQ); + TestThreadPtr p = new TestThread(cd, broadcastQ, i % 2); p->start(); testThreads.push_back(p); } @@ -341,9 +291,6 @@ main(int argc, char** argv) } cd->waitZero(); - signalDog->start(); - broadcastDog->start(); - while(!enqThreads.empty()) { EnqueueThreadPtr p = enqThreads.front(); @@ -361,22 +308,7 @@ main(int argc, char** argv) p->getThreadControl().join(); } - if(verbose) - { - cout << endl; - } - broadcastDog->terminate(); - broadcastDog->getThreadControl().join(); - - signalDog->terminate(); - signalDog->getThreadControl().join(); - - cout << "broadcast ("; - broadcastDog->dump(); - - cout << ") signal ("; - signalDog->dump(); - cout << ") ok" << endl; + cout << " ok" << endl; return 0; } diff --git a/cpp/test/IceUtil/condvar/run.py b/cpp/test/IceUtil/condvar/run.py index 33387d3fa79..50c762bf86b 100755 --- a/cpp/test/IceUtil/condvar/run.py +++ b/cpp/test/IceUtil/condvar/run.py @@ -22,19 +22,13 @@ from scripts import * workqueue = os.path.join(os.getcwd(), "workqueue") -print "starting workqueue...", client = TestUtil.spawnClient(workqueue) -print "ok" client.waitTestSuccess() match = os.path.join(os.getcwd(), "match") -print "starting signal match...", client = TestUtil.spawnClient(match) -print "ok" client.waitTestSuccess() -print "starting broadcast match...", client = TestUtil.spawnClient(match + " -b") -print "ok" client.waitTestSuccess() diff --git a/cpp/test/Slice/errorDetection/DummyAtGlobalLevel.ice b/cpp/test/Slice/errorDetection/DummyAtGlobalLevel.ice index 95bc0690efe..7b880eb3817 100644 --- a/cpp/test/Slice/errorDetection/DummyAtGlobalLevel.ice +++ b/cpp/test/Slice/errorDetection/DummyAtGlobalLevel.ice @@ -7,7 +7,6 @@ // // ********************************************************************** - interface Foo { void op() throws UndefinedException; 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/demo/WCF/README b/cs/demo/WCF/README deleted file mode 100644 index 5ad8277bd84..00000000000 --- a/cs/demo/WCF/README +++ /dev/null @@ -1,20 +0,0 @@ -Demos in this directory: - -- latency - - A simple latency test that measures the basic call dispatch delay of WCF. - -- latency_m - - The same demo, but with a multi-threaded server. - -- throughput - - A simple WCF throughput demo that allows you to send sequences of - various types between client and server and to measure the maximum - bandwidth that can be achieved using serialized synchronous - requests. - -- throughput_m - - The same demo, but with a multi-threaded server. diff --git a/cs/demo/WCF/latency/Client.cs b/cs/demo/WCF/latency/Client.cs deleted file mode 100755 index 871bd9faacf..00000000000 --- a/cs/demo/WCF/latency/Client.cs +++ /dev/null @@ -1,164 +0,0 @@ -// ********************************************************************** -// -// 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. -// -// ********************************************************************** -
-using System;
-using System.ServiceModel;
-using System.ServiceModel.Description;
-
-public class Client
-{
- static void menu()
- {
- Console.WriteLine("usage:\n"
- + "\n"
- + "r: run latency test with selected transport\n"
- + "\n"
- + "select transport to use:\n"
- + "1: TCP, binary encoded (default)\n"
- + "2: HTTP, SOAP encoded\n"
- + "\n"
- + "other commands\n"
- + "s: shutdown server\n"
- + "x: exit\n"
- + "?: help\n");
- }
-
- public static int Main(string[] args)
- {
- const int repetitions = 100000;
-
- string addr = null;
- string tcpPort = "10001";
- string httpPort = "10002";
-
- if(args.Length == 0)
- {
- addr = "127.0.0.1";
- }
- else if(args.Length == 1)
- {
- addr = args[0];
- }
- else if(args.Length == 3)
- {
- addr = args[0];
- tcpPort = args[1];
- httpPort = args[2];
- }
- else
- {
- Console.Error.WriteLine("usage: client [host [tcpPort httpPort]]");
- Environment.Exit(1);
- }
-
- Service.Latency tcpProxy = null;
- Service.Latency httpProxy = null;
-
- try
- {
- NetTcpBinding tcpBinding = new NetTcpBinding(SecurityMode.None);
- EndpointAddress tcpAddr = new EndpointAddress("net.tcp://" + addr + ":" + tcpPort);
- ChannelFactory<Service.Latency> tcpFac = new ChannelFactory<Service.Latency>(tcpBinding, tcpAddr);
- tcpProxy = tcpFac.CreateChannel();
-
- WSHttpBinding httpBinding = new WSHttpBinding(SecurityMode.None);
- EndpointAddress httpAddr = new EndpointAddress("http://" + addr + ":" + httpPort);
- ChannelFactory<Service.Latency> httpFac = new ChannelFactory<Service.Latency>(httpBinding, httpAddr);
- httpProxy = httpFac.CreateChannel();
- }
- catch(Exception ex)
- {
- Console.Error.WriteLine(ex);
- Environment.Exit(1);
- }
-
- try
- {
- Console.Write("Warming up...");
- Console.Out.Flush();
- for(int i = 0; i < 20000; ++i)
- {
- tcpProxy.o();
- }
- for(int i = 0; i < 20000; ++i)
- {
- httpProxy.o();
- }
- }
- catch(Exception ex)
- {
- Console.Error.WriteLine(ex);
- Environment.Exit(1);
- }
-
- menu();
-
- Service.Latency proxy = tcpProxy;
-
- String line = null;
- do
- {
- try
- {
- Console.Write("==> ");
- Console.Out.Flush();
- line = Console.ReadLine();
- if(line == null)
- {
- break;
- }
-
- if(line.Equals("1"))
- {
- Console.WriteLine("Using TCP");
- proxy = tcpProxy;
- }
- else if(line.Equals("2"))
- {
- Console.WriteLine("Using HTTP");
- proxy = httpProxy;
- }
- else if(line.Equals("r"))
- {
- Console.WriteLine("Pinging server " + repetitions + " times via " +
- (proxy == tcpProxy ? "TCP" : "HTTP") + ". (This may take a while.)");
- DateTime startTime = DateTime.Now;
- for(int i = 0; i < repetitions; ++i)
- {
- proxy.o();
- }
- TimeSpan elapsed = DateTime.Now - startTime;
- Console.WriteLine(elapsed.TotalMilliseconds + "ms" );
- }
- else if(line.Equals("s"))
- {
- proxy.shutdown();
- }
- else if(line.Equals("x"))
- {
- // Nothing to do, will exit below.
- }
- else if(line.Equals("?"))
- {
- menu();
- }
- else
- {
- Console.WriteLine("unknown command `" + line + "'");
- }
- }
- catch(Exception ex)
- {
- Console.Error.WriteLine(ex);
- }
- } while(!line.Equals("x"));
-
- return 0;
- }
-} diff --git a/cs/demo/WCF/latency/README b/cs/demo/WCF/latency/README deleted file mode 100644 index 3a561d33f9d..00000000000 --- a/cs/demo/WCF/latency/README +++ /dev/null @@ -1,27 +0,0 @@ -A simple latency test that measures the basic call dispatch delay of WCF. - -To run the demo, first start the server: - -$ server.exe - -In a separate window, start the client: - -$ client.exe - -By default, the client and server use the loopback interface (127.0.0.1). -You can specify a different interface on the command line, for example: - -$ server.exe 192.168.4.2 - -$ client.exe 192.168.4.2 - -By default server listens on port 10001 for binary messages, -and on port 10002 for SOAP messages. You can specify different -ports on the command line: - -$ server.exe serverhost.xyz.com 11111 11112 - -$ client.exe serverhost.xyz.com 11111 11112 - -Under Vista, you must run the server as administrator. - diff --git a/cs/demo/WCF/latency/Server.cs b/cs/demo/WCF/latency/Server.cs deleted file mode 100755 index 80fae643000..00000000000 --- a/cs/demo/WCF/latency/Server.cs +++ /dev/null @@ -1,84 +0,0 @@ -// ********************************************************************** -// -// 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. -// -// ********************************************************************** -
-using System;
-using System.ServiceModel;
-using System.Threading;
-
-class LatencyI : Service.Latency
-{
- public virtual void o()
- {
- }
-
- public virtual void shutdown()
- {
- Monitor.Enter(_sync);
- Monitor.Pulse(_sync);
- Monitor.Exit(_sync);
- }
-
- public static Object _sync;
-};
-
-class Server
-{
- public static int Main(string[] args)
- {
- string addr = null;
- string tcpPort = "10001";
- string httpPort = "10002";
-
- if(args.Length == 0)
- {
- addr = "127.0.0.1";
- }
- else if(args.Length == 1)
- {
- addr = args[0];
- }
- else if(args.Length == 3)
- {
- addr = args[0];
- tcpPort = args[1];
- httpPort = args[2];
- }
- else
- {
- Console.Error.WriteLine("usage: server [host [tcpPort httpPort]]");
- Environment.Exit(1);
- }
-
- try
- {
- ServiceHost host = new ServiceHost(typeof(LatencyI));
- LatencyI._sync = host;
-
- Uri uri = new Uri("net.tcp://" + addr + ":" + tcpPort);
- NetTcpBinding tcpBinding = new NetTcpBinding(SecurityMode.None);
- host.AddServiceEndpoint(typeof(Service.Latency), tcpBinding, uri);
-
- uri = new Uri("http://" + addr + ":" + httpPort);
- WSHttpBinding httpBinding = new WSHttpBinding(SecurityMode.None);
- host.AddServiceEndpoint(typeof(Service.Latency), httpBinding, uri);
-
- Monitor.Enter(host);
- host.Open();
- Monitor.Wait(host);
- Monitor.Exit(host);
- host.Close();
- }
- catch(Exception ex)
- {
- Console.Error.WriteLine(ex);
- Environment.Exit(1);
- }
- return 0;
- }
-}
diff --git a/cs/demo/WCF/latency/Service.cs b/cs/demo/WCF/latency/Service.cs deleted file mode 100755 index 89daae1566a..00000000000 --- a/cs/demo/WCF/latency/Service.cs +++ /dev/null @@ -1,21 +0,0 @@ -// ********************************************************************** -// -// 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. -// -// ********************************************************************** -
-namespace Service
-{
- [System.ServiceModel.ServiceContract]
- interface Latency
- {
- [System.ServiceModel.OperationContract]
- void o();
-
- [System.ServiceModel.OperationContract]
- void shutdown();
- }
-}
diff --git a/cs/demo/WCF/latency/latency.sln b/cs/demo/WCF/latency/latency.sln deleted file mode 100755 index 231b4af17df..00000000000 --- a/cs/demo/WCF/latency/latency.sln +++ /dev/null @@ -1,26 +0,0 @@ -
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "latencyC", "latencyC.csproj", "{024C6B2C-63CC-42C0-B921-E9F9E775C04A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "latencyS", "latencyS.csproj", "{7EC9882D-EDE1-482D-A635-EB3B5352BBB5}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {024C6B2C-63CC-42C0-B921-E9F9E775C04A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {024C6B2C-63CC-42C0-B921-E9F9E775C04A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {024C6B2C-63CC-42C0-B921-E9F9E775C04A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {024C6B2C-63CC-42C0-B921-E9F9E775C04A}.Release|Any CPU.Build.0 = Release|Any CPU
- {7EC9882D-EDE1-482D-A635-EB3B5352BBB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7EC9882D-EDE1-482D-A635-EB3B5352BBB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7EC9882D-EDE1-482D-A635-EB3B5352BBB5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7EC9882D-EDE1-482D-A635-EB3B5352BBB5}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/cs/demo/WCF/latency/latencyC.csproj b/cs/demo/WCF/latency/latencyC.csproj deleted file mode 100755 index bfcf395ecf2..00000000000 --- a/cs/demo/WCF/latency/latencyC.csproj +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{024C6B2C-63CC-42C0-B921-E9F9E775C04A}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>latencyC</RootNamespace>
- <AssemblyName>client</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <NoWin32Manifest>true</NoWin32Manifest>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Client.cs" />
- <Compile Include="Service.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file diff --git a/cs/demo/WCF/latency/latencyS.csproj b/cs/demo/WCF/latency/latencyS.csproj deleted file mode 100755 index 76a5c867a0f..00000000000 --- a/cs/demo/WCF/latency/latencyS.csproj +++ /dev/null @@ -1,98 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{7EC9882D-EDE1-482D-A635-EB3B5352BBB5}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>latencyS</RootNamespace>
- <AssemblyName>server</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <TargetZone>LocalIntranet</TargetZone>
- <GenerateManifests>false</GenerateManifests>
- <NoWin32Manifest>true</NoWin32Manifest>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Server.cs" />
- <Compile Include="Service.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="Properties\app.manifest" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
- <Visible>False</Visible>
- <ProductName>Windows Installer 3.1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file diff --git a/cs/demo/WCF/latency_m/Client.cs b/cs/demo/WCF/latency_m/Client.cs deleted file mode 100755 index 871bd9faacf..00000000000 --- a/cs/demo/WCF/latency_m/Client.cs +++ /dev/null @@ -1,164 +0,0 @@ -// ********************************************************************** -// -// 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. -// -// ********************************************************************** -
-using System;
-using System.ServiceModel;
-using System.ServiceModel.Description;
-
-public class Client
-{
- static void menu()
- {
- Console.WriteLine("usage:\n"
- + "\n"
- + "r: run latency test with selected transport\n"
- + "\n"
- + "select transport to use:\n"
- + "1: TCP, binary encoded (default)\n"
- + "2: HTTP, SOAP encoded\n"
- + "\n"
- + "other commands\n"
- + "s: shutdown server\n"
- + "x: exit\n"
- + "?: help\n");
- }
-
- public static int Main(string[] args)
- {
- const int repetitions = 100000;
-
- string addr = null;
- string tcpPort = "10001";
- string httpPort = "10002";
-
- if(args.Length == 0)
- {
- addr = "127.0.0.1";
- }
- else if(args.Length == 1)
- {
- addr = args[0];
- }
- else if(args.Length == 3)
- {
- addr = args[0];
- tcpPort = args[1];
- httpPort = args[2];
- }
- else
- {
- Console.Error.WriteLine("usage: client [host [tcpPort httpPort]]");
- Environment.Exit(1);
- }
-
- Service.Latency tcpProxy = null;
- Service.Latency httpProxy = null;
-
- try
- {
- NetTcpBinding tcpBinding = new NetTcpBinding(SecurityMode.None);
- EndpointAddress tcpAddr = new EndpointAddress("net.tcp://" + addr + ":" + tcpPort);
- ChannelFactory<Service.Latency> tcpFac = new ChannelFactory<Service.Latency>(tcpBinding, tcpAddr);
- tcpProxy = tcpFac.CreateChannel();
-
- WSHttpBinding httpBinding = new WSHttpBinding(SecurityMode.None);
- EndpointAddress httpAddr = new EndpointAddress("http://" + addr + ":" + httpPort);
- ChannelFactory<Service.Latency> httpFac = new ChannelFactory<Service.Latency>(httpBinding, httpAddr);
- httpProxy = httpFac.CreateChannel();
- }
- catch(Exception ex)
- {
- Console.Error.WriteLine(ex);
- Environment.Exit(1);
- }
-
- try
- {
- Console.Write("Warming up...");
- Console.Out.Flush();
- for(int i = 0; i < 20000; ++i)
- {
- tcpProxy.o();
- }
- for(int i = 0; i < 20000; ++i)
- {
- httpProxy.o();
- }
- }
- catch(Exception ex)
- {
- Console.Error.WriteLine(ex);
- Environment.Exit(1);
- }
-
- menu();
-
- Service.Latency proxy = tcpProxy;
-
- String line = null;
- do
- {
- try
- {
- Console.Write("==> ");
- Console.Out.Flush();
- line = Console.ReadLine();
- if(line == null)
- {
- break;
- }
-
- if(line.Equals("1"))
- {
- Console.WriteLine("Using TCP");
- proxy = tcpProxy;
- }
- else if(line.Equals("2"))
- {
- Console.WriteLine("Using HTTP");
- proxy = httpProxy;
- }
- else if(line.Equals("r"))
- {
- Console.WriteLine("Pinging server " + repetitions + " times via " +
- (proxy == tcpProxy ? "TCP" : "HTTP") + ". (This may take a while.)");
- DateTime startTime = DateTime.Now;
- for(int i = 0; i < repetitions; ++i)
- {
- proxy.o();
- }
- TimeSpan elapsed = DateTime.Now - startTime;
- Console.WriteLine(elapsed.TotalMilliseconds + "ms" );
- }
- else if(line.Equals("s"))
- {
- proxy.shutdown();
- }
- else if(line.Equals("x"))
- {
- // Nothing to do, will exit below.
- }
- else if(line.Equals("?"))
- {
- menu();
- }
- else
- {
- Console.WriteLine("unknown command `" + line + "'");
- }
- }
- catch(Exception ex)
- {
- Console.Error.WriteLine(ex);
- }
- } while(!line.Equals("x"));
-
- return 0;
- }
-} diff --git a/cs/demo/WCF/latency_m/README b/cs/demo/WCF/latency_m/README deleted file mode 100644 index 79ade7dfadd..00000000000 --- a/cs/demo/WCF/latency_m/README +++ /dev/null @@ -1,29 +0,0 @@ -A simple latency test that measures the basic call dispatch delay of WCF. -This version uses a threaded server, so requests from multiple clients -proceed in parallel. - -To run the demo, first start the server: - -$ server.exe - -In a separate window, start the client: - -$ client.exe - -By default, the client and server use the loopback interface (127.0.0.1). -You can specify a different interface on the command line, for example: - -$ server.exe 192.168.4.2 - -$ client.exe 192.168.4.2 - -By default server listens on port 10001 for binary messages, -and on port 10002 for SOAP messages. You can specify different -ports on the command line: - -$ server.exe serverhost.xyz.com 11111 11112 - -$ client.exe serverhost.xyz.com 11111 11112 - -Under Vista, you must run the server as administrator. - diff --git a/cs/demo/WCF/latency_m/Server.cs b/cs/demo/WCF/latency_m/Server.cs deleted file mode 100644 index 8baef234fa7..00000000000 --- a/cs/demo/WCF/latency_m/Server.cs +++ /dev/null @@ -1,87 +0,0 @@ -// ********************************************************************** -// -// 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. -// -// ********************************************************************** -
-using System;
-using System.ServiceModel;
-using System.Threading;
-
-[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple,
- InstanceContextMode = InstanceContextMode.Single)]
-class LatencyI : Service.Latency
-{
- public virtual void o()
- {
- }
-
- public virtual void shutdown()
- {
- Monitor.Enter(_sync);
- Monitor.Pulse(_sync);
- Monitor.Exit(_sync);
- }
-
- public static Object _sync;
-};
-
-class Server
-{
- public static int Main(string[] args)
- {
- System.Console.WriteLine("starting up");
- string addr = null;
- string tcpPort = "10001";
- string httpPort = "10002";
-
- if(args.Length == 0)
- {
- addr = "127.0.0.1";
- }
- else if(args.Length == 1)
- {
- addr = args[0];
- }
- else if(args.Length == 3)
- {
- addr = args[0];
- tcpPort = args[1];
- httpPort = args[2];
- }
- else
- {
- Console.Error.WriteLine("usage: server [host [tcpPort httpPort]]");
- Environment.Exit(1);
- }
-
- try
- {
- ServiceHost host = new ServiceHost(typeof(LatencyI));
- LatencyI._sync = host;
-
- Uri uri = new Uri("net.tcp://" + addr + ":" + tcpPort);
- NetTcpBinding tcpBinding = new NetTcpBinding(SecurityMode.None);
- host.AddServiceEndpoint(typeof(Service.Latency), tcpBinding, uri);
-
- uri = new Uri("http://" + addr + ":" + httpPort);
- WSHttpBinding httpBinding = new WSHttpBinding(SecurityMode.None);
- host.AddServiceEndpoint(typeof(Service.Latency), httpBinding, uri);
-
- Monitor.Enter(host);
- host.Open();
- Monitor.Wait(host);
- Monitor.Exit(host);
- host.Close();
- }
- catch(Exception ex)
- {
- Console.Error.WriteLine(ex);
- Environment.Exit(1);
- }
- return 0;
- }
-}
diff --git a/cs/demo/WCF/latency_m/Service.cs b/cs/demo/WCF/latency_m/Service.cs deleted file mode 100755 index 89daae1566a..00000000000 --- a/cs/demo/WCF/latency_m/Service.cs +++ /dev/null @@ -1,21 +0,0 @@ -// ********************************************************************** -// -// 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. -// -// ********************************************************************** -
-namespace Service
-{
- [System.ServiceModel.ServiceContract]
- interface Latency
- {
- [System.ServiceModel.OperationContract]
- void o();
-
- [System.ServiceModel.OperationContract]
- void shutdown();
- }
-}
diff --git a/cs/demo/WCF/latency_m/latencyC_m.csproj b/cs/demo/WCF/latency_m/latencyC_m.csproj deleted file mode 100755 index 3b56d42414a..00000000000 --- a/cs/demo/WCF/latency_m/latencyC_m.csproj +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{024C6B2C-63CC-42C0-B921-E9F9E775C04B}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>latencyC_m</RootNamespace>
- <AssemblyName>client</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <NoWin32Manifest>true</NoWin32Manifest>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Client.cs" />
- <Compile Include="Service.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file diff --git a/cs/demo/WCF/latency_m/latencyS_m.csproj b/cs/demo/WCF/latency_m/latencyS_m.csproj deleted file mode 100755 index f139ab03628..00000000000 --- a/cs/demo/WCF/latency_m/latencyS_m.csproj +++ /dev/null @@ -1,98 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{7EC9882D-EDE1-482D-A635-EB3B5352BBB6}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>latencyS_m</RootNamespace>
- <AssemblyName>server</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <TargetZone>LocalIntranet</TargetZone>
- <GenerateManifests>false</GenerateManifests>
- <NoWin32Manifest>true</NoWin32Manifest>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Server.cs" />
- <Compile Include="Service.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="Properties\app.manifest" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
- <Visible>False</Visible>
- <ProductName>Windows Installer 3.1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file diff --git a/cs/demo/WCF/latency_m/latency_m.sln b/cs/demo/WCF/latency_m/latency_m.sln deleted file mode 100755 index 640acd6b713..00000000000 --- a/cs/demo/WCF/latency_m/latency_m.sln +++ /dev/null @@ -1,26 +0,0 @@ -
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "latencyC_m", "latencyC_m.csproj", "{024C6B2C-63CC-42C0-B921-E9F9E775C04B}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "latencyS_m", "latencyS_m.csproj", "{7EC9882D-EDE1-482D-A635-EB3B5352BBB6}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {024C6B2C-63CC-42C0-B921-E9F9E775C04B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {024C6B2C-63CC-42C0-B921-E9F9E775C04B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {024C6B2C-63CC-42C0-B921-E9F9E775C04B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {024C6B2C-63CC-42C0-B921-E9F9E775C04B}.Release|Any CPU.Build.0 = Release|Any CPU
- {7EC9882D-EDE1-482D-A635-EB3B5352BBB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7EC9882D-EDE1-482D-A635-EB3B5352BBB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7EC9882D-EDE1-482D-A635-EB3B5352BBB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7EC9882D-EDE1-482D-A635-EB3B5352BBB6}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/cs/demo/WCF/throughput/Client.cs b/cs/demo/WCF/throughput/Client.cs deleted file mode 100755 index 7146aebb688..00000000000 --- a/cs/demo/WCF/throughput/Client.cs +++ /dev/null @@ -1,441 +0,0 @@ -// ********************************************************************** -// -// 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. -// -// ********************************************************************** -
-using System;
-using System.ServiceModel;
-using System.ServiceModel.Description;
-using Service;
-using System.Collections;
-
-class Client
-{
- static void menu()
- {
- Console.WriteLine("usage:\n"
- + "\n"
- + "select transport to use:\n"
- + "a: TCP, binary encoded (default)\n"
- + "b: HTTP, SOAP encoded\n"
- + "\n"
- + "toggle type of data to send:\n"
- + "1: sequence of bytes (default)\n"
- + "2: sequence of strings (\"hello\")\n"
- + "3: sequence of structs with a string (\"hello\") and a double\n"
- + "4: sequence of structs with two ints and a double\n"
- + "\n"
- + "select test to run:\n"
- + "t: Send sequence\n"
- + "r: Receive sequence\n"
- + "e: Echo (send and receive) sequence\n"
- + "\n"
- + "other commands\n"
- + "s: shutdown server\n"
- + "x: exit\n"
- + "?: help\n");
- }
-
- public static int Main(string[] args)
- {
- const int repetitions = 100;
-
- string addr = null;
- string tcpPort = "10001";
- string httpPort = "10002";
-
- if (args.Length == 0)
- {
- addr = "127.0.0.1";
- }
- else if (args.Length == 1)
- {
- addr = args[0];
- }
- else if (args.Length == 3)
- {
- addr = args[0];
- tcpPort = args[1];
- httpPort = args[2];
- }
- else
- {
- Console.Error.WriteLine("usage: client [host [tcpPort httpPort]]");
- Environment.Exit(1);
- }
-
- Test tcpProxy = null;
- Test httpProxy = null;
-
- try
- {
- NetTcpBinding tcpBinding = new NetTcpBinding(SecurityMode.None);
- tcpBinding.MaxReceivedMessageSize = 10000000;
- tcpBinding.ReaderQuotas.MaxArrayLength = 1000000;
- EndpointAddress tcpAddr = new EndpointAddress("net.tcp://" + addr + ":" + tcpPort);
- ChannelFactory<Test> tcpFac = new ChannelFactory<Test>(tcpBinding, tcpAddr);
- IEnumerator e = tcpFac.Endpoint.Contract.Operations.GetEnumerator();
- while(e.MoveNext())
- {
- OperationDescription od = (OperationDescription)e.Current;
- DataContractSerializerOperationBehavior dataContractBehavior =
- od.Behaviors.Find<DataContractSerializerOperationBehavior>();
- if(dataContractBehavior != null)
- {
- dataContractBehavior.MaxItemsInObjectGraph = 1000000;
- }
- }
- tcpProxy = tcpFac.CreateChannel();
-
- WSHttpBinding httpBinding = new WSHttpBinding(SecurityMode.None);
- httpBinding.MaxReceivedMessageSize = 10000000;
- httpBinding.ReaderQuotas.MaxArrayLength = 1000000;
- EndpointAddress httpAddr = new EndpointAddress("http://" + addr + ":" + httpPort);
- ChannelFactory<Test> httpFac = new ChannelFactory<Test>(httpBinding, httpAddr);
- e = httpFac.Endpoint.Contract.Operations.GetEnumerator();
- while(e.MoveNext())
- {
- OperationDescription od = (OperationDescription)e.Current;
- DataContractSerializerOperationBehavior dataContractBehavior =
- od.Behaviors.Find<DataContractSerializerOperationBehavior>();
- if(dataContractBehavior != null)
- {
- dataContractBehavior.MaxItemsInObjectGraph = 1000000;
- }
- }
- httpProxy = httpFac.CreateChannel();
- }
- catch(Exception ex)
- {
- Console.Error.WriteLine(ex);
- Environment.Exit(1);
- }
-
- byte[] byteSeq = new byte[Sizes.ByteSeqSize];
-
- string[] stringSeq = new string[Sizes.StringSeqSize];
- for (int i = 0; i < Sizes.StringSeqSize; ++i)
- {
- stringSeq[i] = new string('a', 5);
- }
-
- StringDouble[] structSeq = new StringDouble[Sizes.StringDoubleSeqSize];
- for (int i = 0; i < Sizes.StringDoubleSeqSize; ++i)
- {
- structSeq[i].s = new string('a', 5);
- structSeq[i].d = 3.14;
- }
-
- Fixed[] fixedSeq = new Fixed[Sizes.FixedSeqSize];
- for(int i = 0; i < Sizes.FixedSeqSize; ++i)
- {
-
- fixedSeq[i].i = 0;
- fixedSeq[i].j = 0;
- fixedSeq[i].d = 0;
- }
-
- try
- {
- Console.Write("Warming up...");
- Console.Out.Flush();
-
- byte[] byteS = new byte[1];
- string[] stringS = new string[1];
- StringDouble[] structS = new StringDouble[1];
- Fixed[] fixedS = new Fixed[1];
-
- for (int i = 0; i < 10000; ++i)
- {
- tcpProxy.sendByteSeq(byteS);
- tcpProxy.recvByteSeq();
- tcpProxy.echoByteSeq(byteS);
- httpProxy.sendByteSeq(byteS);
- httpProxy.recvByteSeq();
- httpProxy.echoByteSeq(byteS);
- }
-
- for (int i = 0; i < 10000; ++i)
- {
- tcpProxy.sendStringSeq(stringS);
- tcpProxy.recvStringSeq();
- tcpProxy.echoStringSeq(stringS);
- httpProxy.sendStringSeq(stringS);
- httpProxy.recvStringSeq();
- httpProxy.echoStringSeq(stringS);
- }
-
- for (int i = 0; i < 10000; ++i)
- {
- tcpProxy.sendStructSeq(structS);
- tcpProxy.recvStructSeq();
- tcpProxy.echoStructSeq(structS);
- httpProxy.sendStructSeq(structS);
- httpProxy.recvStructSeq();
- httpProxy.echoStructSeq(structS);
- }
-
- for (int i = 0; i < 10000; ++i)
- {
- tcpProxy.sendFixedSeq(fixedS);
- tcpProxy.recvFixedSeq();
- tcpProxy.echoFixedSeq(fixedS);
- httpProxy.sendFixedSeq(fixedS);
- httpProxy.recvFixedSeq();
- httpProxy.echoFixedSeq(fixedS);
- }
- }
- catch (Exception ex)
- {
- Console.Error.WriteLine(ex);
- Environment.Exit(1);
- }
- Console.WriteLine();
-
- menu();
-
- //
- // By default, use TCP with byte sequence.
- //
- Test proxy = tcpProxy;
- char currentType = '1';
- int seqSize = Sizes.ByteSeqSize;
-
- String line = null;
- do
- {
- try
- {
- Console.Write("==> ");
- Console.Out.Flush();
- line = Console.ReadLine();
- if(line == null)
- {
- break;
- }
-
- if(line.Equals("a"))
- {
- Console.WriteLine("Using TCP");
- proxy = tcpProxy;
- }
- else if(line.Equals("b"))
- {
- Console.WriteLine("Using HTTP");
- proxy = httpProxy;
- }
- else if(line.Equals("1") || line.Equals("2") || line.Equals("3") || line.Equals("4"))
- {
- currentType = line[0];
- switch(currentType)
- {
- case '1':
- {
- Console.WriteLine("using byte sequences");
- seqSize = Sizes.ByteSeqSize;
- break;
- }
- case '2':
- {
- Console.WriteLine("using string sequences");
- seqSize = Sizes.StringSeqSize;
- break;
- }
- case '3':
- {
- Console.WriteLine("using variable-length struct sequences");
- seqSize = Sizes.StringDoubleSeqSize;
- break;
- }
- case '4':
- {
- Console.WriteLine("using fixed-length struct sequences");
- seqSize = Sizes.FixedSeqSize;
- break;
- }
- }
- }
- else if(line.Equals("t") || line.Equals("r") || line.Equals("e"))
- {
- char c = line[0];
- switch (c)
- {
- case 't':
- {
- Console.Write("sending");
- break;
- }
- case 'r':
- {
- Console.Write("receiving");
- break;
- }
- case 'e':
- {
- Console.Write("sending and receiving");
- break;
- }
- }
-
- Console.Write(" " + repetitions);
-
- switch(currentType)
- {
- case '1':
- {
- Console.Write(" byte");
- break;
- }
- case '2':
- {
- Console.Write(" string");
- break;
- }
- case '3':
- {
- Console.Write(" variable-length struct");
- break;
- }
- case '4':
- {
- Console.Write(" fixed-length struct");
- break;
- }
- }
- Console.WriteLine(" sequences of size " + seqSize + " via " +
- (proxy == tcpProxy ? "TCP" : "HTTP") + "...");
-
- DateTime startTime = DateTime.Now;
-
- for(int i = 0; i < repetitions; ++i)
- {
- switch(currentType)
- {
- case '1':
- {
- switch(c)
- {
- case 't':
- {
- proxy.sendByteSeq(byteSeq);
- break;
- }
- case 'r':
- {
- proxy.recvByteSeq();
- break;
- }
- case 'e':
- {
- proxy.echoByteSeq(byteSeq);
- break;
- }
- }
- break;
- }
-
- case '2':
- {
- switch(c)
- {
- case 't':
- {
- proxy.sendStringSeq(stringSeq);
- break;
- }
- case 'r':
- {
- proxy.recvStringSeq();
- break;
- }
- case 'e':
- {
- proxy.echoStringSeq(stringSeq);
- break;
- }
- }
- break;
- }
-
- case '3':
- {
- switch(c)
- {
- case 't':
- {
- proxy.sendStructSeq(structSeq);
- break;
- }
- case 'r':
- {
- proxy.recvStructSeq();
- break;
- }
- case 'e':
- {
- proxy.echoStructSeq(structSeq);
- break;
- }
- }
- break;
- }
-
- case '4':
- {
- switch(c)
- {
- case 't':
- {
- proxy.sendFixedSeq(fixedSeq);
- break;
- }
- case 'r':
- {
- proxy.recvFixedSeq();
- break;
- }
- case 'e':
- {
- proxy.echoFixedSeq(fixedSeq);
- break;
- }
- }
- break;
- }
- }
- }
-
- TimeSpan elapsed = DateTime.Now - startTime;
- Console.WriteLine("time for " + repetitions + " sequences: " + elapsed.TotalMilliseconds + "ms");
- Console.WriteLine("time per sequence: " + ((double)(elapsed.TotalMilliseconds / repetitions)) + "ms");
- }
- else if(line.Equals("s"))
- {
- proxy.shutdown();
- }
- else if(line.Equals("x"))
- {
- // Nothing to do, will exit below.
- }
- else if(line.Equals("?"))
- {
- menu();
- }
- else
- {
- Console.WriteLine("unknown command `" + line + "'");
- }
- }
- catch(Exception ex)
- {
- Console.Error.WriteLine(ex);
- }
- } while(!line.Equals("x"));
-
- return 0;
- }
-} diff --git a/cs/demo/WCF/throughput/README b/cs/demo/WCF/throughput/README deleted file mode 100644 index 5f3a48038ce..00000000000 --- a/cs/demo/WCF/throughput/README +++ /dev/null @@ -1,29 +0,0 @@ -A simple WCF throughput demo that allows you to send sequences of various -types between client and server and to measure the maximum bandwidth -that can be achieved using serialized synchronous requests. - -To run the demo, first start the server: - -$ server.exe - -In a separate window, start the client: - -$ client.exe - -By default, the client and server use the loopback interface (127.0.0.1). -You can specify a different interface on the command line, for example: - -$ server.exe 192.168.4.2 - -$ client.exe 192.168.4.2 - -By default server listens on port 10001 for binary messages, -and on port 10002 for SOAP messages. You can specify different -ports on the command line: - -$ server.exe serverhost.xyz.com 11111 11112 - -$ client.exe serverhost.xyz.com 11111 11112 - -Under Vista, you must run the server as administrator. - diff --git a/cs/demo/WCF/throughput/Server.cs b/cs/demo/WCF/throughput/Server.cs deleted file mode 100755 index c52242e1c8e..00000000000 --- a/cs/demo/WCF/throughput/Server.cs +++ /dev/null @@ -1,190 +0,0 @@ -// ********************************************************************** -// -// 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. -// -// ********************************************************************** -
-using System;
-using System.ServiceModel;
-using System.ServiceModel.Description;
-using System.ServiceModel.Channels;
-using System.Threading;
-using Service;
-using System.Collections;
-
-class TestI : Service.Test
-{
- TestI()
- {
- _byteSeq = new byte[Sizes.ByteSeqSize];
-
- _stringSeq = new string[Sizes.StringSeqSize];
- for(int i = 0; i < Sizes.StringSeqSize; ++i)
- {
- _stringSeq[i] = new string('a', 5);
- }
-
- _structSeq = new StringDouble[Sizes.StringDoubleSeqSize];
- for(int i = 0; i < Sizes.StringDoubleSeqSize; ++i)
- {
- _structSeq[i].s = new string('a', 5);
- _structSeq[i].d = 3.14;
- }
-
- _fixedSeq = new Fixed[Sizes.FixedSeqSize];
- for (int i = 0; i < Sizes.FixedSeqSize; ++i)
- {
-
- _fixedSeq[i].i = 0;
- _fixedSeq[i].j = 0;
- _fixedSeq[i].d = 0;
- }
- }
-
- public virtual void sendByteSeq(byte[] seq)
- {
- }
-
- public virtual byte[] recvByteSeq()
- {
- return _byteSeq;
- }
-
- public virtual byte[] echoByteSeq(byte[] seq)
- {
- return seq;
- }
-
- public virtual void sendStringSeq(string[] seq)
- {
- }
-
- public virtual string[] recvStringSeq()
- {
- return _stringSeq;
- }
-
- public virtual string[] echoStringSeq(string[] seq)
- {
- return seq;
- }
-
- public virtual void sendStructSeq(StringDouble[] seq)
- {
- }
-
- public virtual StringDouble[] recvStructSeq()
- {
- return _structSeq;
- }
-
- public virtual StringDouble[] echoStructSeq(StringDouble[] seq)
- {
- return seq;
- }
-
- public virtual void sendFixedSeq(Fixed[] seq)
- {
- }
-
- public virtual Fixed[] recvFixedSeq()
- {
- return _fixedSeq;
- }
-
- public virtual Fixed[] echoFixedSeq(Fixed[] seq)
- {
- return seq;
- }
-
- public virtual void shutdown()
- {
- Monitor.Enter(_sync);
- Monitor.Pulse(_sync);
- Monitor.Exit(_sync);
- }
-
- public static object _sync;
-
- private byte[] _byteSeq;
- private string[] _stringSeq;
- private StringDouble[] _structSeq;
- private Fixed[] _fixedSeq;
-};
-
-class Server
-{
- public static int Main(string[] args)
- {
- string addr = null;
- string tcpPort = "10001";
- string httpPort = "10002";
-
- if (args.Length == 0)
- {
- addr = "127.0.0.1";
- }
- else if (args.Length == 1)
- {
- addr = args[0];
- }
- else if (args.Length == 3)
- {
- addr = args[0];
- tcpPort = args[1];
- httpPort = args[2];
- }
- else
- {
- Console.Error.WriteLine("usage: server [host [tcpPort httpPort]]");
- Environment.Exit(1);
- }
-
- ServiceHost host = new ServiceHost(typeof(TestI));
- TestI._sync = host;
-
- Uri tcpUri = new Uri("net.tcp://" + addr + ":" + tcpPort);
- NetTcpBinding tcpBinding = new NetTcpBinding(SecurityMode.None);
- tcpBinding.MaxReceivedMessageSize = 10000000;
- tcpBinding.ReaderQuotas.MaxArrayLength = 1000000;
- ServiceEndpoint ep = host.AddServiceEndpoint(typeof(Test), tcpBinding, tcpUri);
- IEnumerator e = ep.Contract.Operations.GetEnumerator();
- while(e.MoveNext())
- {
- OperationDescription od = (OperationDescription)e.Current;
- DataContractSerializerOperationBehavior dataContractBehavior =
- od.Behaviors.Find<DataContractSerializerOperationBehavior>();
- if(dataContractBehavior != null)
- {
- dataContractBehavior.MaxItemsInObjectGraph = 1000000;
- }
- }
-
- Uri httpUri = new Uri("http://" + addr + ":" + httpPort);
- WSHttpBinding httpBinding = new WSHttpBinding(SecurityMode.None);
- httpBinding.MaxReceivedMessageSize = 10000000;
- httpBinding.ReaderQuotas.MaxArrayLength = 1000000;
- ep = host.AddServiceEndpoint(typeof(Test), httpBinding, httpUri);
- e = ep.Contract.Operations.GetEnumerator();
- while(e.MoveNext())
- {
- OperationDescription od = (OperationDescription)e.Current;
- DataContractSerializerOperationBehavior dataContractBehavior =
- od.Behaviors.Find<DataContractSerializerOperationBehavior>();
- if(dataContractBehavior != null)
- {
- dataContractBehavior.MaxItemsInObjectGraph = 1000000;
- }
- }
-
- Monitor.Enter(host);
- host.Open();
- Monitor.Wait(host);
- Monitor.Exit(host);
- host.Close();
- return 0;
- }
-}
diff --git a/cs/demo/WCF/throughput/Service.cs b/cs/demo/WCF/throughput/Service.cs deleted file mode 100755 index 981a6a88461..00000000000 --- a/cs/demo/WCF/throughput/Service.cs +++ /dev/null @@ -1,76 +0,0 @@ -// ********************************************************************** -// -// 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. -// -// ********************************************************************** -
-
-using System;
-using System.Runtime;
-using System.Runtime.Serialization;
-using System.ServiceModel;
-
-namespace Service
-{
- public class Sizes
- {
- public const int ByteSeqSize = 500000;
- public const int StringSeqSize = 50000;
- public const int StringDoubleSeqSize = 50000;
- public const int FixedSeqSize = 50000;
- }
-
- [DataContract]
- public struct StringDouble
- {
- [DataMember] public string s;
- [DataMember] public double d;
- };
-
-
- [DataContract]
- struct Fixed
- {
- [DataMember] public int i;
- [DataMember] public int j;
- [DataMember] public double d;
- };
-
- [ServiceContract]
- interface Test
- {
- [OperationContract]
- void sendByteSeq(byte[] seq);
- [OperationContract]
- byte[] recvByteSeq();
- [OperationContract]
- byte[] echoByteSeq(byte[] seq);
-
- [OperationContract]
- void sendStringSeq(string[] seq);
- [OperationContract]
- string[] recvStringSeq();
- [OperationContract]
- string[] echoStringSeq(string[] seq);
-
- [OperationContract]
- void sendStructSeq(StringDouble[] seq);
- [OperationContract]
- StringDouble[] recvStructSeq();
- [OperationContract]
- StringDouble[] echoStructSeq(StringDouble[] seq);
-
- [OperationContract]
- void sendFixedSeq(Fixed[] seq);
- [OperationContract]
- Fixed[] recvFixedSeq();
- [OperationContract]
- Fixed[] echoFixedSeq(Fixed[] seq);
-
- [OperationContract]
- void shutdown();
- };
-}
diff --git a/cs/demo/WCF/throughput/throughput.sln b/cs/demo/WCF/throughput/throughput.sln deleted file mode 100755 index 563bd20aa7e..00000000000 --- a/cs/demo/WCF/throughput/throughput.sln +++ /dev/null @@ -1,26 +0,0 @@ -
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "throughputC", "throughputC.csproj", "{006E1B28-B29A-4A6D-A6BF-1C322CE1CBEA}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "throughputS", "throughputS.csproj", "{22DB1F08-8117-4ADD-AF10-27C0FD32B342}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {006E1B28-B29A-4A6D-A6BF-1C322CE1CBEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {006E1B28-B29A-4A6D-A6BF-1C322CE1CBEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {006E1B28-B29A-4A6D-A6BF-1C322CE1CBEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {006E1B28-B29A-4A6D-A6BF-1C322CE1CBEA}.Release|Any CPU.Build.0 = Release|Any CPU
- {22DB1F08-8117-4ADD-AF10-27C0FD32B342}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {22DB1F08-8117-4ADD-AF10-27C0FD32B342}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {22DB1F08-8117-4ADD-AF10-27C0FD32B342}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {22DB1F08-8117-4ADD-AF10-27C0FD32B342}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/cs/demo/WCF/throughput/throughputC.csproj b/cs/demo/WCF/throughput/throughputC.csproj deleted file mode 100755 index 7acfa74c5b7..00000000000 --- a/cs/demo/WCF/throughput/throughputC.csproj +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{006E1B28-B29A-4A6D-A6BF-1C322CE1CBEA}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>throughputC</RootNamespace>
- <AssemblyName>client</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <NoWin32Manifest>true</NoWin32Manifest>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Runtime.Serialization">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Client.cs" />
- <Compile Include="Service.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file diff --git a/cs/demo/WCF/throughput/throughputS.csproj b/cs/demo/WCF/throughput/throughputS.csproj deleted file mode 100755 index b059052f71e..00000000000 --- a/cs/demo/WCF/throughput/throughputS.csproj +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{22DB1F08-8117-4ADD-AF10-27C0FD32B342}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>throughputS</RootNamespace>
- <AssemblyName>server</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <NoWin32Manifest>true</NoWin32Manifest>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Runtime.Serialization">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Server.cs" />
- <Compile Include="Service.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file diff --git a/cs/demo/WCF/throughput_m/Client.cs b/cs/demo/WCF/throughput_m/Client.cs deleted file mode 100755 index 7146aebb688..00000000000 --- a/cs/demo/WCF/throughput_m/Client.cs +++ /dev/null @@ -1,441 +0,0 @@ -// ********************************************************************** -// -// 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. -// -// ********************************************************************** -
-using System;
-using System.ServiceModel;
-using System.ServiceModel.Description;
-using Service;
-using System.Collections;
-
-class Client
-{
- static void menu()
- {
- Console.WriteLine("usage:\n"
- + "\n"
- + "select transport to use:\n"
- + "a: TCP, binary encoded (default)\n"
- + "b: HTTP, SOAP encoded\n"
- + "\n"
- + "toggle type of data to send:\n"
- + "1: sequence of bytes (default)\n"
- + "2: sequence of strings (\"hello\")\n"
- + "3: sequence of structs with a string (\"hello\") and a double\n"
- + "4: sequence of structs with two ints and a double\n"
- + "\n"
- + "select test to run:\n"
- + "t: Send sequence\n"
- + "r: Receive sequence\n"
- + "e: Echo (send and receive) sequence\n"
- + "\n"
- + "other commands\n"
- + "s: shutdown server\n"
- + "x: exit\n"
- + "?: help\n");
- }
-
- public static int Main(string[] args)
- {
- const int repetitions = 100;
-
- string addr = null;
- string tcpPort = "10001";
- string httpPort = "10002";
-
- if (args.Length == 0)
- {
- addr = "127.0.0.1";
- }
- else if (args.Length == 1)
- {
- addr = args[0];
- }
- else if (args.Length == 3)
- {
- addr = args[0];
- tcpPort = args[1];
- httpPort = args[2];
- }
- else
- {
- Console.Error.WriteLine("usage: client [host [tcpPort httpPort]]");
- Environment.Exit(1);
- }
-
- Test tcpProxy = null;
- Test httpProxy = null;
-
- try
- {
- NetTcpBinding tcpBinding = new NetTcpBinding(SecurityMode.None);
- tcpBinding.MaxReceivedMessageSize = 10000000;
- tcpBinding.ReaderQuotas.MaxArrayLength = 1000000;
- EndpointAddress tcpAddr = new EndpointAddress("net.tcp://" + addr + ":" + tcpPort);
- ChannelFactory<Test> tcpFac = new ChannelFactory<Test>(tcpBinding, tcpAddr);
- IEnumerator e = tcpFac.Endpoint.Contract.Operations.GetEnumerator();
- while(e.MoveNext())
- {
- OperationDescription od = (OperationDescription)e.Current;
- DataContractSerializerOperationBehavior dataContractBehavior =
- od.Behaviors.Find<DataContractSerializerOperationBehavior>();
- if(dataContractBehavior != null)
- {
- dataContractBehavior.MaxItemsInObjectGraph = 1000000;
- }
- }
- tcpProxy = tcpFac.CreateChannel();
-
- WSHttpBinding httpBinding = new WSHttpBinding(SecurityMode.None);
- httpBinding.MaxReceivedMessageSize = 10000000;
- httpBinding.ReaderQuotas.MaxArrayLength = 1000000;
- EndpointAddress httpAddr = new EndpointAddress("http://" + addr + ":" + httpPort);
- ChannelFactory<Test> httpFac = new ChannelFactory<Test>(httpBinding, httpAddr);
- e = httpFac.Endpoint.Contract.Operations.GetEnumerator();
- while(e.MoveNext())
- {
- OperationDescription od = (OperationDescription)e.Current;
- DataContractSerializerOperationBehavior dataContractBehavior =
- od.Behaviors.Find<DataContractSerializerOperationBehavior>();
- if(dataContractBehavior != null)
- {
- dataContractBehavior.MaxItemsInObjectGraph = 1000000;
- }
- }
- httpProxy = httpFac.CreateChannel();
- }
- catch(Exception ex)
- {
- Console.Error.WriteLine(ex);
- Environment.Exit(1);
- }
-
- byte[] byteSeq = new byte[Sizes.ByteSeqSize];
-
- string[] stringSeq = new string[Sizes.StringSeqSize];
- for (int i = 0; i < Sizes.StringSeqSize; ++i)
- {
- stringSeq[i] = new string('a', 5);
- }
-
- StringDouble[] structSeq = new StringDouble[Sizes.StringDoubleSeqSize];
- for (int i = 0; i < Sizes.StringDoubleSeqSize; ++i)
- {
- structSeq[i].s = new string('a', 5);
- structSeq[i].d = 3.14;
- }
-
- Fixed[] fixedSeq = new Fixed[Sizes.FixedSeqSize];
- for(int i = 0; i < Sizes.FixedSeqSize; ++i)
- {
-
- fixedSeq[i].i = 0;
- fixedSeq[i].j = 0;
- fixedSeq[i].d = 0;
- }
-
- try
- {
- Console.Write("Warming up...");
- Console.Out.Flush();
-
- byte[] byteS = new byte[1];
- string[] stringS = new string[1];
- StringDouble[] structS = new StringDouble[1];
- Fixed[] fixedS = new Fixed[1];
-
- for (int i = 0; i < 10000; ++i)
- {
- tcpProxy.sendByteSeq(byteS);
- tcpProxy.recvByteSeq();
- tcpProxy.echoByteSeq(byteS);
- httpProxy.sendByteSeq(byteS);
- httpProxy.recvByteSeq();
- httpProxy.echoByteSeq(byteS);
- }
-
- for (int i = 0; i < 10000; ++i)
- {
- tcpProxy.sendStringSeq(stringS);
- tcpProxy.recvStringSeq();
- tcpProxy.echoStringSeq(stringS);
- httpProxy.sendStringSeq(stringS);
- httpProxy.recvStringSeq();
- httpProxy.echoStringSeq(stringS);
- }
-
- for (int i = 0; i < 10000; ++i)
- {
- tcpProxy.sendStructSeq(structS);
- tcpProxy.recvStructSeq();
- tcpProxy.echoStructSeq(structS);
- httpProxy.sendStructSeq(structS);
- httpProxy.recvStructSeq();
- httpProxy.echoStructSeq(structS);
- }
-
- for (int i = 0; i < 10000; ++i)
- {
- tcpProxy.sendFixedSeq(fixedS);
- tcpProxy.recvFixedSeq();
- tcpProxy.echoFixedSeq(fixedS);
- httpProxy.sendFixedSeq(fixedS);
- httpProxy.recvFixedSeq();
- httpProxy.echoFixedSeq(fixedS);
- }
- }
- catch (Exception ex)
- {
- Console.Error.WriteLine(ex);
- Environment.Exit(1);
- }
- Console.WriteLine();
-
- menu();
-
- //
- // By default, use TCP with byte sequence.
- //
- Test proxy = tcpProxy;
- char currentType = '1';
- int seqSize = Sizes.ByteSeqSize;
-
- String line = null;
- do
- {
- try
- {
- Console.Write("==> ");
- Console.Out.Flush();
- line = Console.ReadLine();
- if(line == null)
- {
- break;
- }
-
- if(line.Equals("a"))
- {
- Console.WriteLine("Using TCP");
- proxy = tcpProxy;
- }
- else if(line.Equals("b"))
- {
- Console.WriteLine("Using HTTP");
- proxy = httpProxy;
- }
- else if(line.Equals("1") || line.Equals("2") || line.Equals("3") || line.Equals("4"))
- {
- currentType = line[0];
- switch(currentType)
- {
- case '1':
- {
- Console.WriteLine("using byte sequences");
- seqSize = Sizes.ByteSeqSize;
- break;
- }
- case '2':
- {
- Console.WriteLine("using string sequences");
- seqSize = Sizes.StringSeqSize;
- break;
- }
- case '3':
- {
- Console.WriteLine("using variable-length struct sequences");
- seqSize = Sizes.StringDoubleSeqSize;
- break;
- }
- case '4':
- {
- Console.WriteLine("using fixed-length struct sequences");
- seqSize = Sizes.FixedSeqSize;
- break;
- }
- }
- }
- else if(line.Equals("t") || line.Equals("r") || line.Equals("e"))
- {
- char c = line[0];
- switch (c)
- {
- case 't':
- {
- Console.Write("sending");
- break;
- }
- case 'r':
- {
- Console.Write("receiving");
- break;
- }
- case 'e':
- {
- Console.Write("sending and receiving");
- break;
- }
- }
-
- Console.Write(" " + repetitions);
-
- switch(currentType)
- {
- case '1':
- {
- Console.Write(" byte");
- break;
- }
- case '2':
- {
- Console.Write(" string");
- break;
- }
- case '3':
- {
- Console.Write(" variable-length struct");
- break;
- }
- case '4':
- {
- Console.Write(" fixed-length struct");
- break;
- }
- }
- Console.WriteLine(" sequences of size " + seqSize + " via " +
- (proxy == tcpProxy ? "TCP" : "HTTP") + "...");
-
- DateTime startTime = DateTime.Now;
-
- for(int i = 0; i < repetitions; ++i)
- {
- switch(currentType)
- {
- case '1':
- {
- switch(c)
- {
- case 't':
- {
- proxy.sendByteSeq(byteSeq);
- break;
- }
- case 'r':
- {
- proxy.recvByteSeq();
- break;
- }
- case 'e':
- {
- proxy.echoByteSeq(byteSeq);
- break;
- }
- }
- break;
- }
-
- case '2':
- {
- switch(c)
- {
- case 't':
- {
- proxy.sendStringSeq(stringSeq);
- break;
- }
- case 'r':
- {
- proxy.recvStringSeq();
- break;
- }
- case 'e':
- {
- proxy.echoStringSeq(stringSeq);
- break;
- }
- }
- break;
- }
-
- case '3':
- {
- switch(c)
- {
- case 't':
- {
- proxy.sendStructSeq(structSeq);
- break;
- }
- case 'r':
- {
- proxy.recvStructSeq();
- break;
- }
- case 'e':
- {
- proxy.echoStructSeq(structSeq);
- break;
- }
- }
- break;
- }
-
- case '4':
- {
- switch(c)
- {
- case 't':
- {
- proxy.sendFixedSeq(fixedSeq);
- break;
- }
- case 'r':
- {
- proxy.recvFixedSeq();
- break;
- }
- case 'e':
- {
- proxy.echoFixedSeq(fixedSeq);
- break;
- }
- }
- break;
- }
- }
- }
-
- TimeSpan elapsed = DateTime.Now - startTime;
- Console.WriteLine("time for " + repetitions + " sequences: " + elapsed.TotalMilliseconds + "ms");
- Console.WriteLine("time per sequence: " + ((double)(elapsed.TotalMilliseconds / repetitions)) + "ms");
- }
- else if(line.Equals("s"))
- {
- proxy.shutdown();
- }
- else if(line.Equals("x"))
- {
- // Nothing to do, will exit below.
- }
- else if(line.Equals("?"))
- {
- menu();
- }
- else
- {
- Console.WriteLine("unknown command `" + line + "'");
- }
- }
- catch(Exception ex)
- {
- Console.Error.WriteLine(ex);
- }
- } while(!line.Equals("x"));
-
- return 0;
- }
-} diff --git a/cs/demo/WCF/throughput_m/README b/cs/demo/WCF/throughput_m/README deleted file mode 100644 index f385c2e9782..00000000000 --- a/cs/demo/WCF/throughput_m/README +++ /dev/null @@ -1,31 +0,0 @@ -A simple WCF throughput demo that allows you to send sequences of various -types between client and server and to measure the maximum bandwidth -that can be achieved using serialized synchronous requests. -This version uses a threaded server, so requests from multiple clients -proceed in parallel. - -To run the demo, first start the server: - -$ server.exe - -In a separate window, start the client: - -$ client.exe - -By default, the client and server use the loopback interface (127.0.0.1). -You can specify a different interface on the command line, for example: - -$ server.exe 192.168.4.2 - -$ client.exe 192.168.4.2 - -By default server listens on port 10001 for binary messages, -and on port 10002 for SOAP messages. You can specify different -ports on the command line: - -$ server.exe serverhost.xyz.com 11111 11112 - -$ client.exe serverhost.xyz.com 11111 11112 - -Under Vista, you must run the server as administrator. - diff --git a/cs/demo/WCF/throughput_m/Server.cs b/cs/demo/WCF/throughput_m/Server.cs deleted file mode 100755 index b18e56f0aef..00000000000 --- a/cs/demo/WCF/throughput_m/Server.cs +++ /dev/null @@ -1,192 +0,0 @@ -// ********************************************************************** -// -// 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. -// -// ********************************************************************** -
-using System;
-using System.ServiceModel;
-using System.ServiceModel.Description;
-using System.ServiceModel.Channels;
-using System.Threading;
-using Service;
-using System.Collections;
-
-[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple,
- InstanceContextMode = InstanceContextMode.Single)]
-class TestI : Service.Test
-{
- TestI()
- {
- _byteSeq = new byte[Sizes.ByteSeqSize];
-
- _stringSeq = new string[Sizes.StringSeqSize];
- for(int i = 0; i < Sizes.StringSeqSize; ++i)
- {
- _stringSeq[i] = new string('a', 5);
- }
-
- _structSeq = new StringDouble[Sizes.StringDoubleSeqSize];
- for(int i = 0; i < Sizes.StringDoubleSeqSize; ++i)
- {
- _structSeq[i].s = new string('a', 5);
- _structSeq[i].d = 3.14;
- }
-
- _fixedSeq = new Fixed[Sizes.FixedSeqSize];
- for (int i = 0; i < Sizes.FixedSeqSize; ++i)
- {
-
- _fixedSeq[i].i = 0;
- _fixedSeq[i].j = 0;
- _fixedSeq[i].d = 0;
- }
- }
-
- public virtual void sendByteSeq(byte[] seq)
- {
- }
-
- public virtual byte[] recvByteSeq()
- {
- return _byteSeq;
- }
-
- public virtual byte[] echoByteSeq(byte[] seq)
- {
- return seq;
- }
-
- public virtual void sendStringSeq(string[] seq)
- {
- }
-
- public virtual string[] recvStringSeq()
- {
- return _stringSeq;
- }
-
- public virtual string[] echoStringSeq(string[] seq)
- {
- return seq;
- }
-
- public virtual void sendStructSeq(StringDouble[] seq)
- {
- }
-
- public virtual StringDouble[] recvStructSeq()
- {
- return _structSeq;
- }
-
- public virtual StringDouble[] echoStructSeq(StringDouble[] seq)
- {
- return seq;
- }
-
- public virtual void sendFixedSeq(Fixed[] seq)
- {
- }
-
- public virtual Fixed[] recvFixedSeq()
- {
- return _fixedSeq;
- }
-
- public virtual Fixed[] echoFixedSeq(Fixed[] seq)
- {
- return seq;
- }
-
- public virtual void shutdown()
- {
- Monitor.Enter(_sync);
- Monitor.Pulse(_sync);
- Monitor.Exit(_sync);
- }
-
- public static object _sync;
-
- private byte[] _byteSeq;
- private string[] _stringSeq;
- private StringDouble[] _structSeq;
- private Fixed[] _fixedSeq;
-};
-
-class Server
-{
- public static int Main(string[] args)
- {
- string addr = null;
- string tcpPort = "10001";
- string httpPort = "10002";
-
- if (args.Length == 0)
- {
- addr = "127.0.0.1";
- }
- else if (args.Length == 1)
- {
- addr = args[0];
- }
- else if (args.Length == 3)
- {
- addr = args[0];
- tcpPort = args[1];
- httpPort = args[2];
- }
- else
- {
- Console.Error.WriteLine("usage: server [host [tcpPort httpPort]]");
- Environment.Exit(1);
- }
-
- ServiceHost host = new ServiceHost(typeof(TestI));
- TestI._sync = host;
-
- Uri tcpUri = new Uri("net.tcp://" + addr + ":" + tcpPort);
- NetTcpBinding tcpBinding = new NetTcpBinding(SecurityMode.None);
- tcpBinding.MaxReceivedMessageSize = 10000000;
- tcpBinding.ReaderQuotas.MaxArrayLength = 1000000;
- ServiceEndpoint ep = host.AddServiceEndpoint(typeof(Test), tcpBinding, tcpUri);
- IEnumerator e = ep.Contract.Operations.GetEnumerator();
- while(e.MoveNext())
- {
- OperationDescription od = (OperationDescription)e.Current;
- DataContractSerializerOperationBehavior dataContractBehavior =
- od.Behaviors.Find<DataContractSerializerOperationBehavior>();
- if(dataContractBehavior != null)
- {
- dataContractBehavior.MaxItemsInObjectGraph = 1000000;
- }
- }
-
- Uri httpUri = new Uri("http://" + addr + ":" + httpPort);
- WSHttpBinding httpBinding = new WSHttpBinding(SecurityMode.None);
- httpBinding.MaxReceivedMessageSize = 10000000;
- httpBinding.ReaderQuotas.MaxArrayLength = 1000000;
- ep = host.AddServiceEndpoint(typeof(Test), httpBinding, httpUri);
- e = ep.Contract.Operations.GetEnumerator();
- while(e.MoveNext())
- {
- OperationDescription od = (OperationDescription)e.Current;
- DataContractSerializerOperationBehavior dataContractBehavior =
- od.Behaviors.Find<DataContractSerializerOperationBehavior>();
- if(dataContractBehavior != null)
- {
- dataContractBehavior.MaxItemsInObjectGraph = 1000000;
- }
- }
-
- Monitor.Enter(host);
- host.Open();
- Monitor.Wait(host);
- Monitor.Exit(host);
- host.Close();
- return 0;
- }
-}
diff --git a/cs/demo/WCF/throughput_m/Service.cs b/cs/demo/WCF/throughput_m/Service.cs deleted file mode 100755 index ec75f359d3b..00000000000 --- a/cs/demo/WCF/throughput_m/Service.cs +++ /dev/null @@ -1,75 +0,0 @@ -// ********************************************************************** -// -// 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. -// -// ********************************************************************** -
-using System;
-using System.Runtime;
-using System.Runtime.Serialization;
-using System.ServiceModel;
-
-namespace Service
-{
- public class Sizes
- {
- public const int ByteSeqSize = 500000;
- public const int StringSeqSize = 50000;
- public const int StringDoubleSeqSize = 50000;
- public const int FixedSeqSize = 50000;
- }
-
- [DataContract]
- public struct StringDouble
- {
- [DataMember] public string s;
- [DataMember] public double d;
- };
-
-
- [DataContract]
- struct Fixed
- {
- [DataMember] public int i;
- [DataMember] public int j;
- [DataMember] public double d;
- };
-
- [ServiceContract]
- interface Test
- {
- [OperationContract]
- void sendByteSeq(byte[] seq);
- [OperationContract]
- byte[] recvByteSeq();
- [OperationContract]
- byte[] echoByteSeq(byte[] seq);
-
- [OperationContract]
- void sendStringSeq(string[] seq);
- [OperationContract]
- string[] recvStringSeq();
- [OperationContract]
- string[] echoStringSeq(string[] seq);
-
- [OperationContract]
- void sendStructSeq(StringDouble[] seq);
- [OperationContract]
- StringDouble[] recvStructSeq();
- [OperationContract]
- StringDouble[] echoStructSeq(StringDouble[] seq);
-
- [OperationContract]
- void sendFixedSeq(Fixed[] seq);
- [OperationContract]
- Fixed[] recvFixedSeq();
- [OperationContract]
- Fixed[] echoFixedSeq(Fixed[] seq);
-
- [OperationContract]
- void shutdown();
- };
-}
diff --git a/cs/demo/WCF/throughput_m/throughputC_m.csproj b/cs/demo/WCF/throughput_m/throughputC_m.csproj deleted file mode 100755 index d9f643d6639..00000000000 --- a/cs/demo/WCF/throughput_m/throughputC_m.csproj +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{006E1B28-B29A-4A6D-A6BF-1C322CE1CBEB}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>throughputC_m</RootNamespace>
- <AssemblyName>client</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <NoWin32Manifest>true</NoWin32Manifest>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Runtime.Serialization">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Client.cs" />
- <Compile Include="Service.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file diff --git a/cs/demo/WCF/throughput_m/throughputS_m.csproj b/cs/demo/WCF/throughput_m/throughputS_m.csproj deleted file mode 100755 index 84edac60cf6..00000000000 --- a/cs/demo/WCF/throughput_m/throughputS_m.csproj +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{22DB1F08-8117-4ADD-AF10-27C0FD32B343}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>throughputS_m</RootNamespace>
- <AssemblyName>server</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <NoWin32Manifest>true</NoWin32Manifest>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Runtime.Serialization">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Server.cs" />
- <Compile Include="Service.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file diff --git a/cs/demo/WCF/throughput_m/throughput_m.sln b/cs/demo/WCF/throughput_m/throughput_m.sln deleted file mode 100755 index 91029bcc822..00000000000 --- a/cs/demo/WCF/throughput_m/throughput_m.sln +++ /dev/null @@ -1,26 +0,0 @@ -
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBD}") = "throughputC_m", "throughputC_m.csproj", "{006E1B28-B29A-4A6D-A6BF-1C322CE1CBEB}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBD}") = "throughputS_m", "throughputS_m.csproj", "{22DB1F08-8117-4ADD-AF10-27C0FD32B343}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {006E1B28-B29A-4A6D-A6BF-1C322CE1CBEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {006E1B28-B29A-4A6D-A6BF-1C322CE1CBEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {006E1B28-B29A-4A6D-A6BF-1C322CE1CBEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {006E1B28-B29A-4A6D-A6BF-1C322CE1CBEB}.Release|Any CPU.Build.0 = Release|Any CPU
- {22DB1F08-8117-4ADD-AF10-27C0FD32B343}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {22DB1F08-8117-4ADD-AF10-27C0FD32B343}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {22DB1F08-8117-4ADD-AF10-27C0FD32B343}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {22DB1F08-8117-4ADD-AF10-27C0FD32B343}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/cs/lib/pkgconfig/Glacier2.pc b/cs/lib/pkgconfig/Glacier2.pc index 89eee8c4f58..f3174ea3bdf 100644 --- a/cs/lib/pkgconfig/Glacier2.pc +++ b/cs/lib/pkgconfig/Glacier2.pc @@ -1,4 +1,4 @@ -version = 3.3.0 +version = 3.3.1 mono_root = /usr name = Glacier2 diff --git a/cs/lib/pkgconfig/Ice.pc b/cs/lib/pkgconfig/Ice.pc index 83b78a7932f..2883c30b337 100644 --- a/cs/lib/pkgconfig/Ice.pc +++ b/cs/lib/pkgconfig/Ice.pc @@ -1,4 +1,4 @@ -version = 3.3.0 +version = 3.3.1 mono_root = /usr name = Ice diff --git a/cs/lib/pkgconfig/IceBox.pc b/cs/lib/pkgconfig/IceBox.pc index df792c9c635..49ada9ab609 100644 --- a/cs/lib/pkgconfig/IceBox.pc +++ b/cs/lib/pkgconfig/IceBox.pc @@ -1,4 +1,4 @@ -version = 3.3.0 +version = 3.3.1 mono_root = /usr name = IceBox diff --git a/cs/lib/pkgconfig/IceGrid.pc b/cs/lib/pkgconfig/IceGrid.pc index 1da36becba9..7de2b7dee6e 100644 --- a/cs/lib/pkgconfig/IceGrid.pc +++ b/cs/lib/pkgconfig/IceGrid.pc @@ -1,4 +1,4 @@ -version = 3.3.0 +version = 3.3.1 mono_root = /usr name = IceGrid diff --git a/cs/lib/pkgconfig/IcePatch2.pc b/cs/lib/pkgconfig/IcePatch2.pc index 62d638c233c..b10238a1d84 100644 --- a/cs/lib/pkgconfig/IcePatch2.pc +++ b/cs/lib/pkgconfig/IcePatch2.pc @@ -1,4 +1,4 @@ -version = 3.3.0 +version = 3.3.1 mono_root = /usr name = IcePatch2 diff --git a/cs/lib/pkgconfig/IceStorm.pc b/cs/lib/pkgconfig/IceStorm.pc index 6c05de93996..6570ab44d3e 100644 --- a/cs/lib/pkgconfig/IceStorm.pc +++ b/cs/lib/pkgconfig/IceStorm.pc @@ -1,4 +1,4 @@ -version = 3.3.0 +version = 3.3.1 mono_root = /usr name = IceStorm diff --git a/cs/src/Glacier2/AssemblyInfo.cs b/cs/src/Glacier2/AssemblyInfo.cs index 2bea9352595..2394b1ccc26 100644 --- a/cs/src/Glacier2/AssemblyInfo.cs +++ b/cs/src/Glacier2/AssemblyInfo.cs @@ -21,5 +21,5 @@ using System.Runtime.CompilerServices; [assembly: AssemblyCopyright("Copyright (c) 2003-2009 ZeroC, Inc.")] [assembly: AssemblyTrademark("Ice")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("3.3.0")] +[assembly: AssemblyVersion("3.3.1")] [assembly: AssemblyDelaySign(false)] diff --git a/cs/src/Ice/Acceptor.cs b/cs/src/Ice/Acceptor.cs index ef1ee69d184..b6289480d02 100644 --- a/cs/src/Ice/Acceptor.cs +++ b/cs/src/Ice/Acceptor.cs @@ -15,7 +15,6 @@ namespace IceInternal public interface Acceptor { - Socket fd(); void close(); void listen(); IAsyncResult beginAccept(AsyncCallback callback, object state); diff --git a/cs/src/Ice/AssemblyInfo.cs b/cs/src/Ice/AssemblyInfo.cs index b155c78fa59..9fd787d33a6 100644 --- a/cs/src/Ice/AssemblyInfo.cs +++ b/cs/src/Ice/AssemblyInfo.cs @@ -21,5 +21,5 @@ using System.Runtime.CompilerServices; [assembly: AssemblyCopyright("Copyright (c) 2003-2009 ZeroC, Inc.")] [assembly: AssemblyTrademark("Ice")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("3.3.0")] +[assembly: AssemblyVersion("3.3.1")] [assembly: AssemblyDelaySign(false)] diff --git a/cs/src/Ice/Instance.cs b/cs/src/Ice/Instance.cs index 403b1226519..4ec26a788f2 100644 --- a/cs/src/Ice/Instance.cs +++ b/cs/src/Ice/Instance.cs @@ -612,7 +612,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..d5606c5e820 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 @@ -44,10 +44,10 @@ namespace Ice initializedPlugins.Add(p); } } - catch(Exception) + catch(System.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(); @@ -57,7 +57,7 @@ namespace Ice { p.destroy(); } - catch(Exception) + catch(System.Exception) { // Ignore. } @@ -115,9 +115,21 @@ namespace Ice { if(_communicator != null) { - foreach(Plugin plugin in _plugins.Values) + if(_initialized) { - plugin.destroy(); + foreach(DictionaryEntry entry in _plugins) + { + try + { + Plugin plugin = (Plugin) entry.Value; + plugin.destroy(); + } + catch(System.Exception ex) + { + Ice.Util.getProcessLogger().warning("unexpected exception raised by plug-in '" + entry.Key.ToString() + "' destruction.\n"); + Ice.Util.getProcessLogger().warning("exception: " + ex.ToString()); + } + } } _communicator = null; @@ -150,8 +162,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 +180,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 +205,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 +269,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 +338,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 +371,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/Ice/TcpAcceptor.cs b/cs/src/Ice/TcpAcceptor.cs index 674b819ef08..381fba770b0 100644 --- a/cs/src/Ice/TcpAcceptor.cs +++ b/cs/src/Ice/TcpAcceptor.cs @@ -17,11 +17,6 @@ namespace IceInternal class TcpAcceptor : Acceptor { - public virtual Socket fd() - { - return _fd; - } - public virtual void close() { Socket fd; diff --git a/cs/src/Ice/TcpTransceiver.cs b/cs/src/Ice/TcpTransceiver.cs index a53a1447228..01532065159 100644 --- a/cs/src/Ice/TcpTransceiver.cs +++ b/cs/src/Ice/TcpTransceiver.cs @@ -18,12 +18,6 @@ namespace IceInternal sealed class TcpTransceiver : Transceiver { - public Socket fd() - { - Debug.Assert(_fd != null); - return _fd; - } - public bool restartable() { return true; diff --git a/cs/src/Ice/Transceiver.cs b/cs/src/Ice/Transceiver.cs index 2b9490e961e..3cc96f08bc0 100644 --- a/cs/src/Ice/Transceiver.cs +++ b/cs/src/Ice/Transceiver.cs @@ -39,8 +39,6 @@ namespace IceInternal public interface Transceiver { - Socket fd(); - // // Return true if read operations can be safely restarted. // diff --git a/cs/src/Ice/UdpTransceiver.cs b/cs/src/Ice/UdpTransceiver.cs index dee4b524b68..2763d973007 100644 --- a/cs/src/Ice/UdpTransceiver.cs +++ b/cs/src/Ice/UdpTransceiver.cs @@ -18,12 +18,6 @@ namespace IceInternal sealed class UdpTransceiver : Transceiver { - public Socket fd() - { - Debug.Assert(_fd != null); - return _fd; - } - public bool restartable() { return true; diff --git a/cs/src/Ice/Util.cs b/cs/src/Ice/Util.cs index 51a22c6ef13..32a24e7188f 100644 --- a/cs/src/Ice/Util.cs +++ b/cs/src/Ice/Util.cs @@ -303,12 +303,12 @@ namespace Ice public static string stringVersion() { - return "3.3.0"; // "A.B.C", with A=major, B=minor, C=patch + return "3.3.1"; // "A.B.C", with A=major, B=minor, C=patch } public static int intVersion() { - return 30300; // AABBCC, with AA=major, BB=minor, CC=patch + return 30301; // AABBCC, with AA=major, BB=minor, CC=patch } private static object _processLoggerMutex = new object(); diff --git a/cs/src/IceBox/AssemblyInfo.cs b/cs/src/IceBox/AssemblyInfo.cs index 2ad03959c8d..d3875c5ad3c 100644 --- a/cs/src/IceBox/AssemblyInfo.cs +++ b/cs/src/IceBox/AssemblyInfo.cs @@ -21,5 +21,5 @@ using System.Runtime.CompilerServices; [assembly: AssemblyCopyright("Copyright (c) 2003-2009 ZeroC, Inc.")] [assembly: AssemblyTrademark("Ice")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("3.3.0")] +[assembly: AssemblyVersion("3.3.1")] [assembly: AssemblyDelaySign(false)] 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/IceGrid/AssemblyInfo.cs b/cs/src/IceGrid/AssemblyInfo.cs index d8887673d1b..08576ffe0c1 100644 --- a/cs/src/IceGrid/AssemblyInfo.cs +++ b/cs/src/IceGrid/AssemblyInfo.cs @@ -21,5 +21,5 @@ using System.Runtime.CompilerServices; [assembly: AssemblyCopyright("Copyright (c) 2003-2009 ZeroC, Inc.")] [assembly: AssemblyTrademark("Ice")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("3.3.0")] +[assembly: AssemblyVersion("3.3.1")] [assembly: AssemblyDelaySign(false)] diff --git a/cs/src/IceGrid/Makefile.mak b/cs/src/IceGrid/Makefile.mak index aa2b845848c..ee9d242ae20 100644 --- a/cs/src/IceGrid/Makefile.mak +++ b/cs/src/IceGrid/Makefile.mak @@ -21,6 +21,7 @@ GEN_SRCS = $(GDIR)\Admin.cs \ $(GDIR)\Descriptor.cs \
$(GDIR)\Exception.cs \
$(GDIR)\FileParser.cs \
+ $(GDIR)\Locator.cs \
$(GDIR)\Query.cs \
$(GDIR)\Registry.cs \
$(GDIR)\Session.cs \
diff --git a/cs/src/IcePatch2/AssemblyInfo.cs b/cs/src/IcePatch2/AssemblyInfo.cs index 7e1049174eb..abff628fff2 100644 --- a/cs/src/IcePatch2/AssemblyInfo.cs +++ b/cs/src/IcePatch2/AssemblyInfo.cs @@ -21,5 +21,5 @@ using System.Runtime.CompilerServices; [assembly: AssemblyCopyright("Copyright (c) 2003-2009 ZeroC, Inc.")] [assembly: AssemblyTrademark("Ice")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("3.3.0")] +[assembly: AssemblyVersion("3.3.1")] [assembly: AssemblyDelaySign(false)] diff --git a/cs/src/IceSSL/AcceptorI.cs b/cs/src/IceSSL/AcceptorI.cs index e2693441dcc..c3affa483b4 100644 --- a/cs/src/IceSSL/AcceptorI.cs +++ b/cs/src/IceSSL/AcceptorI.cs @@ -19,11 +19,6 @@ namespace IceSSL class AcceptorI : IceInternal.Acceptor { - public Socket fd() - { - return _fd; - } - public void close() { Socket fd; @@ -65,12 +60,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/AssemblyInfo.cs b/cs/src/IceSSL/AssemblyInfo.cs index 6929e3c35e1..4c02451d399 100644 --- a/cs/src/IceSSL/AssemblyInfo.cs +++ b/cs/src/IceSSL/AssemblyInfo.cs @@ -21,5 +21,5 @@ using System.Runtime.CompilerServices; [assembly: AssemblyCopyright("Copyright (c) 2003-2009 ZeroC, Inc.")] [assembly: AssemblyTrademark("Ice")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("3.3.0")] +[assembly: AssemblyVersion("3.3.1")] [assembly: AssemblyDelaySign(false)] diff --git a/cs/src/IceSSL/ConnectorI.cs b/cs/src/IceSSL/ConnectorI.cs index e1a9cfc28d2..8ebe3d7ddb1 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/src/IceSSL/TransceiverI.cs b/cs/src/IceSSL/TransceiverI.cs index c047d6c6c1d..4b14f63ccb6 100644 --- a/cs/src/IceSSL/TransceiverI.cs +++ b/cs/src/IceSSL/TransceiverI.cs @@ -22,12 +22,6 @@ namespace IceSSL sealed class TransceiverI : IceInternal.Transceiver { - public Socket fd() - { - Debug.Assert(_fd != null); - return _fd; - } - public bool restartable() { return false; diff --git a/cs/src/IceStorm/AssemblyInfo.cs b/cs/src/IceStorm/AssemblyInfo.cs index c5c2b7d65ca..21a9430397f 100644 --- a/cs/src/IceStorm/AssemblyInfo.cs +++ b/cs/src/IceStorm/AssemblyInfo.cs @@ -21,5 +21,5 @@ using System.Runtime.CompilerServices; [assembly: AssemblyCopyright("Copyright (c) 2003-2009 ZeroC, Inc.")] [assembly: AssemblyTrademark("Ice")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("3.3.0")] +[assembly: AssemblyVersion("3.3.1")] [assembly: AssemblyDelaySign(false)] diff --git a/cs/test/Ice/background/Acceptor.cs b/cs/test/Ice/background/Acceptor.cs index 21de4030980..75913dff7a7 100644 --- a/cs/test/Ice/background/Acceptor.cs +++ b/cs/test/Ice/background/Acceptor.cs @@ -12,11 +12,6 @@ using System.Net.Sockets; internal class Acceptor : IceInternal.Acceptor { - public Socket fd() - { - return _acceptor.fd(); - } - public void close() { _acceptor.close(); 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/Ice/background/Transceiver.cs b/cs/test/Ice/background/Transceiver.cs index b796095f59c..3b113550fc5 100644 --- a/cs/test/Ice/background/Transceiver.cs +++ b/cs/test/Ice/background/Transceiver.cs @@ -12,11 +12,6 @@ using System.Net.Sockets; internal class Transceiver : IceInternal.Transceiver { - public Socket fd() - { - return _transceiver.fd(); - } - public bool restartable() { return _transceiver.restartable(); diff --git a/cs/test/IceGrid/simple/AllTests.cs b/cs/test/IceGrid/simple/AllTests.cs index 0153e9abc93..27dfd52ae8e 100644 --- a/cs/test/IceGrid/simple/AllTests.cs +++ b/cs/test/IceGrid/simple/AllTests.cs @@ -77,6 +77,11 @@ public class AllTests test(@base != null); Console.Out.WriteLine("ok"); + Console.Out.Write("testing IceGrid.Locator is present... "); + IceGrid.LocatorPrx locator = IceGrid.LocatorPrxHelper.uncheckedCast(@base); + test(locator != null); + Console.Out.WriteLine("ok"); + Console.Out.Write("testing checked cast... "); Console.Out.Flush(); TestIntfPrx obj = TestIntfPrxHelper.checkedCast(@base); 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/demoscript/Util.py b/demoscript/Util.py index 87da1e8e15d..bc5418248b7 100644 --- a/demoscript/Util.py +++ b/demoscript/Util.py @@ -323,7 +323,8 @@ def run(demos, root = False): --preferIPv4 Prefer IPv4 stack (java only)." --fast Run an abbreviated version of the demos." --script Generate a script to run the demos. - --env Dump the environment.""" % (sys.argv[0]) + --env Dump the environment." + --noenv Do not automatically modify environment.""" % (sys.argv[0]) sys.exit(2) global keepGoing @@ -331,7 +332,7 @@ def run(demos, root = False): try: opts, args = getopt.getopt(sys.argv[1:], "lr:R:", [ "filter=", "rfilter=", "start=", "loop", "fast", "trace=", "debug", "host=", "mode=", - "continue", "ice-home=", "x64", "preferIPv4", "env", "script"]) + "continue", "ice-home=", "x64", "preferIPv4", "env", "noenv", "script"]) except getopt.GetoptError: usage() @@ -341,7 +342,6 @@ def run(demos, root = False): start = 0 loop = False - env = False arg = "" filters = [] script = False @@ -356,8 +356,7 @@ def run(demos, root = False): global preferIPv4 preferIPv4 = True arg += " " + o - elif o == "--env": - env = True + elif o in ("--env", "--noenv"): arg += " " + o elif o in ("-c", "--continue"): keepGoing = True @@ -520,10 +519,10 @@ def addLdPath(libpath): def processCmdLine(): def usage(): - print "usage: " + sys.argv[0] + " --x64 --preferIPv4 --env --fast --trace=output --debug --host host --mode=[debug|release] --ice-home=<dir>" + print "usage: " + sys.argv[0] + " --x64 --preferIPv4 --env --noenv --fast --trace=output --debug --host host --mode=[debug|release] --ice-home=<dir>" sys.exit(2) try: - opts, args = getopt.getopt(sys.argv[1:], "", ["env", "x64", "preferIPv4", "fast", "trace=", "debug", "host=", "mode=", "ice-home="]) + opts, args = getopt.getopt(sys.argv[1:], "", ["env", "noenv", "x64", "preferIPv4", "fast", "trace=", "debug", "host=", "mode=", "ice-home="]) except getopt.GetoptError: usage() @@ -543,6 +542,7 @@ def processCmdLine(): x64 = False tracefile = None env = False + noenv = False for o, a in opts: if o == "--debug": @@ -556,6 +556,8 @@ def processCmdLine(): host = a if o == "--env": env = True + if o == "--noenv": + noenv = True if o == "--fast": fast = True if o == "--x64": @@ -575,7 +577,7 @@ def processCmdLine(): defaultHost = None if not iceHome and os.environ.get("USE_BIN_DIST", "no") == "yes" or os.environ.get("ICE_HOME", "") != "": - if not os.environ.get("ICE_HOME", None): + if os.environ.get("ICE_HOME", "") != "": iceHome = os.environ["ICE_HOME"] elif isLinux(): iceHome = "/usr" @@ -583,7 +585,8 @@ def processCmdLine(): if not x64: x64 = isWin32() and os.environ.get("XTARGET") == "x64" or os.environ.get("LP64") == "yes" - configurePaths() + if not noenv: + configurePaths() if env: dumpenv() diff --git a/distribution/bin/makemsi.py b/distribution/bin/makemsi.py index bcc539bbf71..f8d1a8dffe5 100755 --- a/distribution/bin/makemsi.py +++ b/distribution/bin/makemsi.py @@ -12,7 +12,7 @@ import getopt, os, re, shutil, string, sys, zipfile, fileinput import logging, cStringIO, glob import textwrap -iceVersion = '3.3.0' +iceVersion = '3.3.1' looksVersion = '2.1.4' formsVersion = '1.2.0' diff --git a/distribution/bin/makethirdpartiesmsi.py b/distribution/bin/makethirdpartiesmsi.py index a1dfb3a655f..48fe594c44d 100755 --- a/distribution/bin/makethirdpartiesmsi.py +++ b/distribution/bin/makethirdpartiesmsi.py @@ -16,7 +16,7 @@ resources = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), "..", "s sys.path.append(resources) import components -iceVersion = '3.3.0' +iceVersion = '3.3.1' # # Current default third party library versions. diff --git a/distribution/src/common/build.properties b/distribution/src/common/build.properties index a7d3eb26dc9..eea43fab104 100644 --- a/distribution/src/common/build.properties +++ b/distribution/src/common/build.properties @@ -7,7 +7,7 @@ # # ********************************************************************** -ice.version = 3.3.0 +ice.version = 3.3.1 # # Define debug as on if you want to build with debug information. diff --git a/distribution/src/rpm/ice.spec b/distribution/src/rpm/ice.spec index d746bb8eaa2..b9400ae6dee 100644 --- a/distribution/src/rpm/ice.spec +++ b/distribution/src/rpm/ice.spec @@ -35,7 +35,7 @@ %endif Name: ice -Version: 3.3.0 +Version: 3.3.1 Summary: Files common to all Ice packages Release: 1%{?dist} License: GPL with exceptions @@ -48,7 +48,7 @@ Source1: Ice-rpmbuild-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %define soversion 33 -%define dotnetversion 3.3.0 +%define dotnetversion 3.3..1.1.1.1.1.1 %define dotnetpolicyversion 3.3 %define formsversion 1.2.0 diff --git a/fixVersion.py b/fixVersion.py index cc819fe2d0d..910826f70f0 100755 --- a/fixVersion.py +++ b/fixVersion.py @@ -54,6 +54,11 @@ FixUtil.fileMatchAndReplace(os.path.join(ice_dir, "distribution", "src", "rpm", FixUtil.majorVersion(version) + "." + FixUtil.minorVersion(version) + "." + \ "." + FixUtil.patchVersion(version))]) +FixUtil.fileMatchAndReplace(os.path.join(ice_dir, "distribution", "src", "common", "build.properties"), + [("ice\.version[\t\s]*= " + FixUtil.vpatMatch, version)]) + +for f in FixUtil.find(os.path.join(ice_dir, "distribution", "bin"), "*.py"): + FixUtil.fileMatchAndReplace(f, [("iceVersion[\t\s]*= '" + FixUtil.vpatMatch, version)]) # # Fix version in C++ sources # @@ -69,6 +74,9 @@ if ice_home: FixUtil.fileMatchAndReplace(os.path.join(ice_home, "doc", "swish", "swish.conf"), [("doc/Ice-" + FixUtil.vpatMatch, version)]) + FixUtil.fileMatchAndReplace(os.path.join(ice_home, "doc", "swish", "swishcgi.conf"), + [("ice_version[\t\s]*= '" + FixUtil.vpatMatch, version)]) + FixUtil.fileMatchAndReplace(os.path.join(ice_home, "demo", "IceStorm", "clock", "config.icebox"), [("IceStormService,([0-9]+b?)", FixUtil.soVersion(version))]) @@ -88,9 +96,6 @@ if ice_home: FixUtil.fileMatchAndReplace(os.path.join(ice_home, "config", "templates.xml"), [("IceStormService,([0-9]+b?)", FixUtil.soVersion(version))]) - FixUtil.fileMatchAndReplace(os.path.join(ice_home, "test", "IceStorm", "repgrid", "application.xml"), - [("IceStormService,([0-9]+b?)", FixUtil.soVersion(version))]) - for f in FixUtil.find(os.path.join(ice_home, "src"), "*.rc"): FixUtil.fileMatchAndReplace(f, [("\"FileVersion\", \"" + FixUtil.vpatMatch, version), \ ("\"ProductVersion\", \"" + FixUtil.vpatMatch, version), \ @@ -107,6 +112,9 @@ if icej_home: FixUtil.fileMatchAndReplace(os.path.join(icej_home, "config", "build.properties"), [("ice\.version[\t\s]*= " + FixUtil.vpatMatch, version)]) + FixUtil.fileMatchAndReplace(os.path.join(icej_home, "config", "build.properties"), + [("C:/Ice-" + FixUtil.vpatMatch, version)]) + FixUtil.fileMatchAndReplace(os.path.join(icej_home, "src", "IceUtil", "Version.java"), [("ICE_STRING_VERSION = \"" + FixUtil.vpatMatch +"\"", version), \ ("ICE_INT_VERSION = ([0-9]*)", FixUtil.intVersion(version))]) @@ -180,10 +188,6 @@ if icepy_home: FixUtil.fileMatchAndReplace(os.path.join(icepy_home, "demo", "IceStorm", "clock", "config.icebox"), [("IceStormService,([0-9]+b?)", FixUtil.soVersion(version))]) - FixUtil.fileMatchAndReplace(os.path.join(icepy_home, "demo", "Ice", "bidir", "Server.py"), - [("Ice-" + FixUtil.vpatMatch, version)]) - FixUtil.fileMatchAndReplace(os.path.join(icepy_home, "demo", "Ice", "bidir", "Client.py"), - [("Ice-" + FixUtil.vpatMatch, version)]) # # Fix version in IceRuby # 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/config/build.properties b/java/config/build.properties index e3f8ca595ff..ce46f1d3adb 100644 --- a/java/config/build.properties +++ b/java/config/build.properties @@ -7,7 +7,7 @@ # # ********************************************************************** -ice.version = 3.3.0 +ice.version = 3.3.1 db.version = 4.6.21 # @@ -38,5 +38,5 @@ debug = on # jgoodies.forms = /usr/share/java/forms-1.2.0.jar jgoodies.looks = /usr/share/java/looks-2.1.4.jar -#jgoodies.forms = C:/Ice-3.3.0-ThirdParty-VC80/lib/forms-1.2.0.jar -#jgoodies.looks = C:/Ice-3.3.0-ThirdParty-VC80/lib/looks-2.1.4.jar +#jgoodies.forms = C:/Ice-3.3.1-ThirdParty-VC80/lib/forms-1.2.0.jar +#jgoodies.looks = C:/Ice-3.3.1-ThirdParty-VC80/lib/looks-2.1.4.jar diff --git a/java/demo/Database/.DS_Store b/java/demo/Database/.DS_Store Binary files differnew file mode 100644 index 00000000000..ca6143d6f15 --- /dev/null +++ b/java/demo/Database/.DS_Store diff --git a/java/demo/Database/library/Glacier2Session.ice b/java/demo/Database/library/Glacier2Session.ice index 5a9ab2dd252..1dce2feae44 100644 --- a/java/demo/Database/library/Glacier2Session.ice +++ b/java/demo/Database/library/Glacier2Session.ice @@ -1,6 +1,10 @@ // ********************************************************************** // +<<<<<<< HEAD:java/demo/Database/library/Glacier2Session.ice // Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. +======= +// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +>>>>>>> origin/R3_3_branch:java/demo/Database/library/Glacier2Session.ice // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. diff --git a/java/demo/Database/library/Library.ice b/java/demo/Database/library/Library.ice index a26dbe20b01..8d647be0360 100644 --- a/java/demo/Database/library/Library.ice +++ b/java/demo/Database/library/Library.ice @@ -1,6 +1,10 @@ // ********************************************************************** // +<<<<<<< HEAD:java/demo/Database/library/Library.ice // Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. +======= +// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +>>>>>>> origin/R3_3_branch:java/demo/Database/library/Library.ice // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. diff --git a/java/demo/Database/library/RunParser.java b/java/demo/Database/library/RunParser.java index e616218df9e..17a21db127e 100644 --- a/java/demo/Database/library/RunParser.java +++ b/java/demo/Database/library/RunParser.java @@ -21,56 +21,6 @@ class RunParser public void refresh(); } - static class Glacier2SessionAdapter implements SessionAdapter - { - public LibraryPrx getLibrary() - { - return _session.getLibrary(); - } - - public void destroy() - { - _session.destroy(); - } - - public void refresh() - { - _session.refresh(); - } - - Glacier2SessionAdapter(Glacier2SessionPrx session) - { - _session = session; - } - - private Glacier2SessionPrx _session; - } - - static class DemoSessionAdapter implements SessionAdapter - { - public LibraryPrx getLibrary() - { - return _session.getLibrary(); - } - - public void destroy() - { - _session.destroy(); - } - - public void refresh() - { - _session.refresh(); - } - - DemoSessionAdapter(SessionPrx session) - { - _session = session; - } - - private SessionPrx _session; - } - static private class SessionRefreshThread extends Thread { SessionRefreshThread(Ice.Logger logger, long timeout, SessionAdapter session) @@ -124,7 +74,7 @@ class RunParser runParser(String appName, String[] args, Ice.Communicator communicator) { SessionAdapter session; - Glacier2.RouterPrx router = Glacier2.RouterPrxHelper.uncheckedCast(communicator.getDefaultRouter()); + final Glacier2.RouterPrx router = Glacier2.RouterPrxHelper.uncheckedCast(communicator.getDefaultRouter()); long timeout; if(router != null) { @@ -166,7 +116,36 @@ class RunParser ex.printStackTrace(); } } - session = new Glacier2SessionAdapter(Glacier2SessionPrxHelper.uncheckedCast(glacier2session)); + final Glacier2SessionPrx sess = Glacier2SessionPrxHelper.uncheckedCast(glacier2session); + session = new SessionAdapter() + { + public LibraryPrx getLibrary() + { + return sess.getLibrary(); + } + + public void destroy() + { + try + { + router.destroySession(); + } + catch(Glacier2.SessionNotExistException ex) + { + } + catch(Ice.ConnectionLostException ex) + { + // + // Expected: the router closed the connection. + // + } + } + + public void refresh() + { + sess.refresh(); + } + }; } else { @@ -178,7 +157,24 @@ class RunParser return 1; } - session = new DemoSessionAdapter(factory.create()); + final SessionPrx sess = factory.create(); + session = new SessionAdapter() + { + public LibraryPrx getLibrary() + { + return sess.getLibrary(); + } + + public void destroy() + { + sess.destroy(); + } + + public void refresh() + { + sess.refresh(); + } + }; timeout = factory.getSessionTimeout()/2; } SessionRefreshThread refresh = new SessionRefreshThread(communicator.getLogger(), timeout, session); diff --git a/java/demo/Database/library/Session.ice b/java/demo/Database/library/Session.ice index 5640227eb05..8c223c370f4 100644 --- a/java/demo/Database/library/Session.ice +++ b/java/demo/Database/library/Session.ice @@ -1,6 +1,10 @@ // ********************************************************************** // +<<<<<<< HEAD:java/demo/Database/library/Session.ice // Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. +======= +// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +>>>>>>> origin/R3_3_branch:java/demo/Database/library/Session.ice // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. diff --git a/java/demo/Database/library/build.xml b/java/demo/Database/library/build.xml index 915b235a438..5d894d4610c 100644 --- a/java/demo/Database/library/build.xml +++ b/java/demo/Database/library/build.xml @@ -1,7 +1,11 @@ <!-- ********************************************************************** +<<<<<<< HEAD:java/demo/Database/library/build.xml Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. +======= + Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +>>>>>>> origin/R3_3_branch:java/demo/Database/library/build.xml This copy of Ice is licensed to you under the terms described in the ICE_LICENSE file included in this distribution. diff --git a/java/demo/Database/library/config.client b/java/demo/Database/library/config.client index 9f0fa65a663..ca71c17ee16 100644 --- a/java/demo/Database/library/config.client +++ b/java/demo/Database/library/config.client @@ -25,7 +25,11 @@ Ice.RetryIntervals=-1 # # Warn about connection exceptions # +<<<<<<< HEAD:java/demo/Database/library/config.client Ice.Warn.Connections=1 +======= +#Ice.Warn.Connections=1 +>>>>>>> origin/R3_3_branch:java/demo/Database/library/config.client # # Network Tracing diff --git a/java/demo/Ice/applet/.gitignore b/java/demo/Ice/applet/.gitignore new file mode 100644 index 00000000000..e5786e5ddd4 --- /dev/null +++ b/java/demo/Ice/applet/.gitignore @@ -0,0 +1 @@ +Hello.jar diff --git a/java/demo/Ice/applet/HelloApplet.java b/java/demo/Ice/applet/HelloApplet.java index 2de5b0ba04d..504f775a148 100644 --- a/java/demo/Ice/applet/HelloApplet.java +++ b/java/demo/Ice/applet/HelloApplet.java @@ -43,7 +43,27 @@ public class HelloApplet extends JApplet Ice.InitializationData initData = new Ice.InitializationData(); initData.properties = Ice.Util.createProperties(); initData.properties.setProperty("Ice.ACM.Client", "10"); + initData.properties.setProperty("Ice.Trace.Network", "3"); + initData.properties.setProperty("IceSSL.Trace.Security", "3"); + initData.properties.setProperty("IceSSL.Password", "password"); + initData.properties.setProperty("Ice.InitPlugins", "0"); + initData.properties.setProperty("Ice.Plugin.IceSSL", "IceSSL.PluginFactory"); _communicator = Ice.Util.initialize(initData); + + // + // We delayed the initialization of the IceSSL plug-in by setting Ice.InitPlugins=0. + // Now we obtain a reference to the plugin so that we can supply a keystore and + // truststore using a resource file. + // + IceSSL.Plugin plugin = (IceSSL.Plugin)_communicator.getPluginManager().getPlugin("IceSSL"); + java.io.InputStream certs = getClass().getClassLoader().getResourceAsStream("client.jks"); + plugin.setKeystoreStream(certs); + plugin.setTruststoreStream(certs); + + // + // Finally, we're ready to complete the initialization. + // + _communicator.getPluginManager().initializePlugins(); } catch(Throwable ex) { diff --git a/java/demo/Ice/applet/README b/java/demo/Ice/applet/README index 83e3cfc5e84..c5edfad259f 100644 --- a/java/demo/Ice/applet/README +++ b/java/demo/Ice/applet/README @@ -1,5 +1,7 @@ This demo presents an unsigned applet that shows how to make -asynchronous Ice invocations in a graphical application. +asynchronous Ice invocations in a graphical application. It also +demonstrates how to configure IceSSL using a resource file as the +keystore. The demo includes a start page (hello.html) that you will need to publish on a web server. This page assumes that the demo applet is diff --git a/java/demo/Ice/applet/build.xml b/java/demo/Ice/applet/build.xml index 0f3ea00c870..495021109ad 100644 --- a/java/demo/Ice/applet/build.xml +++ b/java/demo/Ice/applet/build.xml @@ -52,6 +52,9 @@ <include name="Demo/**"/> <include name="HelloApplet*"/> </jar> + <jar jarfile="Hello.jar" update="true" basedir="${top.dir}/../certs"> + <include name="client.jks"/> + </jar> </target> <target name="proguard-jar" depends="jar" if="proguard-found"> @@ -77,6 +80,7 @@ <proguard configuration="applet.pro"> <injar path="${class.dir}"/> + <injar path="${top.dir}/../certs/client.jks"/> <injar refid="ice.classpath" filter="!META-INF/**"/> <outjar path="Hello.jar"/> <libraryjar path="${library.jars}"/> diff --git a/java/demo/RMI/README b/java/demo/RMI/README deleted file mode 100644 index 50bf06f8b2f..00000000000 --- a/java/demo/RMI/README +++ /dev/null @@ -1,12 +0,0 @@ -Demos in this directory: - -- latency - - A simple latency test that measures the basic call dispatch delay of RMI. - -- throughput - - A simple RMI throughput demo that allows you to send sequences of - various types between client and server and to measure the maximum - bandwidth that can be achieved using serialized synchronous - requests. diff --git a/java/demo/RMI/build.xml b/java/demo/RMI/build.xml deleted file mode 100644 index d7424212ffe..00000000000 --- a/java/demo/RMI/build.xml +++ /dev/null @@ -1,24 +0,0 @@ -<!-- - ********************************************************************** - - 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. - - ********************************************************************** ---> - -<project name="demo" default="all" basedir="."> - - <target name="all"> - <ant dir="latency"/> - <ant dir="throughput"/> - </target> - - <target name="clean"> - <ant dir="latency" target="clean"/> - <ant dir="throughput" target="clean"/> - </target> - -</project> diff --git a/java/demo/RMI/throughput/Client.java b/java/demo/RMI/throughput/Client.java deleted file mode 100755 index f54ea3e6c21..00000000000 --- a/java/demo/RMI/throughput/Client.java +++ /dev/null @@ -1,421 +0,0 @@ -// ********************************************************************** -// -// 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. -// -// ********************************************************************** - -import java.rmi.registry.LocateRegistry; -import java.rmi.registry.Registry; - -public class Client -{ - private static void - menu() - { - System.out.println( - "usage:\n" + - "\n" + - "toggle type of data to send:\n" + - "1: sequence of bytes (default)\n" + - "2: sequence of strings (\"hello\")\n" + - "3: sequence of structs with a string (\"hello\") and a double\n" + - "4: sequence of structs with two ints and a double\n" + - "\n" + - "select test to run:\n" + - "t: Send sequence\n" + - "r: Receive sequence\n" + - "e: Echo (send and receive) sequence\n" + - "\n" + - "other commands:\n" + - "s: shutdown server\n" + - "x: exit\n" + - "?: help\n"); - } - - public int - run(String args[]) throws java.lang.Exception - { - String registryHost; - if(args.length == 0) - { - registryHost = "127.0.0.1"; - } - else if(args.length == 1) - { - registryHost = args[0]; - } - else - { - System.err.println("usage: java Client [registryHost]"); - return 1; - } - - - if(System.getSecurityManager() == null) - { - System.setSecurityManager(new SecurityManager()); - } - Registry registry = LocateRegistry.getRegistry(registryHost); - Throughput throughput = (Throughput)registry.lookup("throughput"); - - byte[] byteSeq = new byte[Throughput.ByteSeqSize]; - - String[] stringSeq = new String[Throughput.StringSeqSize]; - for(int i = 0; i < Throughput.StringSeqSize; ++i) - { - stringSeq[i] = new String("hello"); - } - - Throughput.StringDouble[] structSeq = new Throughput.StringDouble[Throughput.StringDoubleSeqSize]; - for(int i = 0; i < Throughput.StringDoubleSeqSize; ++i) - { - structSeq[i] = new Throughput.StringDouble(); - structSeq[i].s = new String("Hello"); - structSeq[i].d = 3.14; - } - - Throughput.Fixed[] fixedSeq = new Throughput.Fixed[Throughput.FixedSeqSize]; - for(int i = 0; i < Throughput.FixedSeqSize; ++i) - { - fixedSeq[i] = new Throughput.Fixed(); - fixedSeq[i].i = 0; - fixedSeq[i].j = 0; - fixedSeq[i].d = 0; - } - - { - byte[] emptyBytes= new byte[1]; - String[] emptyStrings = new String[1]; - Throughput.StringDouble[] emptyStructs = new Throughput.StringDouble[1]; - emptyStructs[0] = new Throughput.StringDouble(); - Throughput.Fixed[] emptyFixed = new Throughput.Fixed[1]; - emptyFixed[0] = new Throughput.Fixed(); - - System.out.print("warming up..."); - System.out.flush(); - for(int i = 0; i < 100; i++) - { - throughput.sendByteSeq(emptyBytes); - throughput.recvByteSeq(); - throughput.echoByteSeq(emptyBytes); - - throughput.sendStringSeq(emptyStrings); - throughput.recvStringSeq(); - throughput.echoFixedSeq(emptyFixed); - - throughput.sendStructSeq(emptyStructs); - throughput.recvStructSeq(); - throughput.echoStructSeq(emptyStructs); - - throughput.sendFixedSeq(emptyFixed); - throughput.recvFixedSeq(); - throughput.echoStringSeq(emptyStrings); - } - System.out.println(); - } - - menu(); - - java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(System.in)); - - char currentType = '1'; - int seqSize = Throughput.ByteSeqSize; - - String line = null; - do - { - try - { - System.out.print("==> "); - System.out.flush(); - line = in.readLine(); - if(line == null) - { - break; - } - - long tmsec = System.currentTimeMillis(); - final int repetitions = 100; - - if(line.equals("1") || line.equals("2") || line.equals("3") || line.equals("4")) - { - currentType = line.charAt(0); - - switch(currentType) - { - case '1': - { - System.out.println("using byte sequences"); - seqSize = Throughput.ByteSeqSize; - break; - } - - case '2': - { - System.out.println("using string sequences"); - seqSize = Throughput.StringSeqSize; - break; - } - - case '3': - { - System.out.println("using variable-length struct sequences"); - seqSize = Throughput.StringDoubleSeqSize; - break; - } - - case '4': - { - System.out.println("using fixed-length struct sequences"); - seqSize = Throughput.FixedSeqSize; - break; - } - } - } - else if(line.equals("t") || line.equals("o") || line.equals("r") || line.equals("e")) - { - char c = line.charAt(0); - - switch(c) - { - case 't': - { - System.out.print("sending"); - break; - } - - case 'r': - { - System.out.print("receiving"); - break; - } - - case 'e': - { - System.out.print("sending and receiving"); - break; - } - } - - System.out.print(" " + repetitions); - switch(currentType) - { - case '1': - { - System.out.print(" byte"); - break; - } - - case '2': - { - System.out.print(" string"); - break; - } - - case '3': - { - System.out.print(" variable-length struct"); - break; - } - - case '4': - { - System.out.print(" fixed-length struct"); - break; - } - } - - System.out.print(" sequences of size " + seqSize + "..."); - - - for(int i = 0; i < repetitions; ++i) - { - switch(currentType) - { - case '1': - { - switch(c) - { - case 't': - { - throughput.sendByteSeq(byteSeq); - break; - } - - case 'r': - { - throughput.recvByteSeq(); - break; - } - - case 'e': - { - throughput.echoByteSeq(byteSeq); - break; - } - } - break; - } - - case '2': - { - switch(c) - { - case 't': - { - throughput.sendStringSeq(stringSeq); - break; - } - - case 'r': - { - throughput.recvStringSeq(); - break; - } - - case 'e': - { - throughput.echoStringSeq(stringSeq); - break; - } - } - break; - } - - case '3': - { - switch(c) - { - case 't': - { - throughput.sendStructSeq(structSeq); - break; - } - - case 'r': - { - throughput.recvStructSeq(); - break; - } - - case 'e': - { - throughput.echoStructSeq(structSeq); - break; - } - } - break; - } - - case '4': - { - switch(c) - { - case 't': - { - throughput.sendFixedSeq(fixedSeq); - break; - } - - case 'r': - { - throughput.recvFixedSeq(); - break; - } - - case 'e': - { - throughput.echoFixedSeq(fixedSeq); - break; - } - } - break; - } - } - } - - double dmsec = System.currentTimeMillis() - tmsec; - System.out.println("time for " + repetitions + " sequences: " + dmsec + "ms"); - System.out.println("time per sequence: " + dmsec / repetitions + "ms"); - int size = 0; - switch(currentType) - { - case '1': - { - size = 1; - break; - } - - case '2': - { - size = stringSeq[0].length(); - break; - } - - case '3': - { - size = structSeq[0].s.length() + 8; - break; - } - - case '4': - { - size = 16; // Two ints and a double. - break; - } - } - double mbit = repetitions * seqSize * size * 8.0 / dmsec / 1000.0; - if(c == 'e') - { - mbit *= 2; - } - System.out.println("throughput: " + new java.text.DecimalFormat("#.##").format(mbit) + "Mbps"); - } - else if(line.equals("s")) - { - throughput.shutdown(); - } - else if(line.equals("x")) - { - // Nothing to do - } - else if(line.equals("?")) - { - menu(); - } - else - { - System.out.println("unknown command `" + line + "'"); - menu(); - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - while(!line.equals("x")); - - return 0; - } - - public static void - main(String[] args) - { - Client app = new Client(); - int status; - try - { - status = app.run(args); - } - catch(Exception e) - { - System.err.println(e); - status = 1; - } - System.exit(status); - } -} diff --git a/java/demo/RMI/throughput/README b/java/demo/RMI/throughput/README deleted file mode 100755 index 82fa2178612..00000000000 --- a/java/demo/RMI/throughput/README +++ /dev/null @@ -1,26 +0,0 @@ -A simple RMI throughput demo that allows you to send sequences of various -types between client and server and to measure the maximum bandwidth -that can be achieved using serialized synchronous requests. - -To run the demo, start the RMI registry: - -$ rmiregistry - -In a separate window, start the server: - -$ java -Djava.rmi.server.hostname=127.0.0.1 -Djava.rmi.server.codebase=file:/c:/path/to/ice/java/demo/RMI/throughput/classes/ -Djava.security.policy=policy Server - -You need to edit the path on the command line to specify this directory. -Under Vista, you must run the server as administrator. - -In a separate window, start the client: - -$ client.exe --Djava.security.policy=policy Client - -If you want to run client and server on different machines, you -can specify the hsot on which you started the registry on -the client's command line, for example: - -$ client.exe --Djava.security.policy=policy Client 192.168.4.2 - -This directs the client to connect to the registry at the specified IP address. diff --git a/java/demo/RMI/throughput/Server.java b/java/demo/RMI/throughput/Server.java deleted file mode 100755 index fbfc8680d8d..00000000000 --- a/java/demo/RMI/throughput/Server.java +++ /dev/null @@ -1,145 +0,0 @@ -// ********************************************************************** -// -// 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. -// -// ********************************************************************** - -import java.rmi.RemoteException; -import java.rmi.registry.LocateRegistry; -import java.rmi.registry.Registry; -import java.rmi.server.UnicastRemoteObject; - -public class Server implements Throughput -{ - - public - Server() - { - _byteSeq = new byte[ByteSeqSize]; - - _stringSeq = new String[StringSeqSize]; - for(int i = 0; i < StringSeqSize; ++i) - { - _stringSeq[i] = new String("hello"); - } - - _structSeq = new StringDouble[StringDoubleSeqSize]; - for(int i = 0; i < StringDoubleSeqSize; ++i) - { - _structSeq[i] = new StringDouble(); - _structSeq[i].s = new String("hello"); - _structSeq[i].d = 3.14; - } - - _fixedSeq = new Fixed[FixedSeqSize]; - for(int i = 0; i < FixedSeqSize; ++i) - { - _fixedSeq[i] = new Fixed(); - _fixedSeq[i].i = 0; - _fixedSeq[i].j = 0; - _fixedSeq[i].d = 0; - } - } - - public void - sendByteSeq(byte[] seq) - { - } - - public byte[] - recvByteSeq() - { - return _byteSeq; - } - - public byte[] - echoByteSeq(byte[] seq) - { - return seq; - } - - public void - sendStringSeq(String[] seq) - { - } - - public String[] - recvStringSeq() - { - return _stringSeq; - } - - public String[] - echoStringSeq(String[] seq) - { - return seq; - } - - public void - sendStructSeq(StringDouble[] seq) - { - } - - public StringDouble[] - recvStructSeq() - { - return _structSeq; - } - - public StringDouble[] - echoStructSeq(StringDouble[] seq) - { - return seq; - } - - public void - sendFixedSeq(Fixed[] seq) - { - } - - public Fixed[] - recvFixedSeq() - { - return _fixedSeq; - } - - public Fixed[] - echoFixedSeq(Fixed[] seq) - { - return seq; - } - - public void - shutdown() - { - System.exit(0); - } - - private byte[] _byteSeq; - private String[] _stringSeq; - private StringDouble[] _structSeq; - private Fixed[] _fixedSeq; - - public static void main(String[] args) - { - if(System.getSecurityManager() == null) - { - System.setSecurityManager(new SecurityManager()); - } - try - { - Throughput servant = new Server(); - Throughput stub = (Throughput)UnicastRemoteObject.exportObject(servant, 0); - Registry registry = LocateRegistry.getRegistry(); - registry.rebind("throughput", stub); - System.out.println("ready"); - } - catch(Exception e) - { - System.err.println(e); - } - } -} diff --git a/java/demo/RMI/throughput/Throughput.java b/java/demo/RMI/throughput/Throughput.java deleted file mode 100755 index 92c7f8717a7..00000000000 --- a/java/demo/RMI/throughput/Throughput.java +++ /dev/null @@ -1,51 +0,0 @@ -// ********************************************************************** -// -// 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. -// -// ********************************************************************** - -import java.rmi.Remote; -import java.rmi.RemoteException; - -public interface Throughput extends Remote -{ - int ByteSeqSize = 500000; - - int StringSeqSize = 50000; - - class StringDouble implements java.io.Serializable - { - public String s; - public double d; - }; - int StringDoubleSeqSize = 50000; - - class Fixed implements java.io.Serializable - { - int i; - int j; - double d; - }; - int FixedSeqSize = 50000; - - void sendByteSeq(byte[] seq) throws RemoteException; - byte[] recvByteSeq() throws RemoteException; - byte[] echoByteSeq(byte[] seq) throws RemoteException; - - void sendStringSeq(String[] seq) throws RemoteException; - String[] recvStringSeq() throws RemoteException; - String[] echoStringSeq(String[] seq) throws RemoteException; - - void sendStructSeq(StringDouble[] seq) throws RemoteException; - StringDouble[] recvStructSeq() throws RemoteException; - StringDouble[] echoStructSeq(StringDouble[] seq) throws RemoteException; - - void sendFixedSeq(Fixed[] seq) throws RemoteException; - Fixed[] recvFixedSeq() throws RemoteException; - Fixed[] echoFixedSeq(Fixed[] seq) throws RemoteException; - - void shutdown() throws RemoteException; -} diff --git a/java/demo/RMI/throughput/build.xml b/java/demo/RMI/throughput/build.xml deleted file mode 100755 index 89f2881febc..00000000000 --- a/java/demo/RMI/throughput/build.xml +++ /dev/null @@ -1,35 +0,0 @@ -<!-- - ********************************************************************** - - 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. - - ********************************************************************** ---> - -<project name="rmi_throughput" default="all" basedir="."> - - <!-- set global properties for this build --> - <property name="top.dir" value="../../.."/> - - <!-- import common definitions --> - <import file="${top.dir}/config/common.xml"/> - - <target name="compile"> - <mkdir dir="${class.dir}"/> - <javac srcdir="." destdir="${class.dir}" - debug="${debug}"> - <compilerarg value="${javac.lint}"/> - </javac> - </target> - - <target name="all" depends="compile"/> - - <target name="clean"> - <delete dir="${generated.dir}"/> - <delete dir="${class.dir}"/> - </target> - -</project> diff --git a/java/demo/RMI/throughput/policy b/java/demo/RMI/throughput/policy deleted file mode 100755 index 1b73fb10b9c..00000000000 --- a/java/demo/RMI/throughput/policy +++ /dev/null @@ -1,3 +0,0 @@ -grant { - permission java.net.SocketPermission "*:*", "connect,accept,resolve,listen"; -}; diff --git a/java/src/Ice/PluginManagerI.java b/java/src/Ice/PluginManagerI.java index f76789f4a21..2c5e33bfb63 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<Plugin> initializedPlugins = new java.util.ArrayList<Plugin>(); 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<Plugin> i = initializedPlugins.listIterator(initializedPlugins.size()); @@ -104,11 +104,24 @@ public final class PluginManagerI implements PluginManager { if(_communicator != null) { - java.util.Iterator<Plugin> i = _plugins.values().iterator(); - while(i.hasNext()) + if(_initialized) { - Plugin p = i.next(); - p.destroy(); + java.util.Iterator<java.util.Map.Entry<String, Plugin> > i = _plugins.entrySet().iterator(); + java.util.Map.Entry<String, Plugin> entry; + while(i.hasNext()) + { + entry = i.next(); + try + { + Plugin p = entry.getValue(); + p.destroy(); + } + catch(RuntimeException ex) + { + Ice.Util.getProcessLogger().warning("unexpected exception raised by plug-in '" + entry.getKey() + "' destruction.\n"); + Ice.Util.getProcessLogger().warning("exception: " + ex.toString()); + } + } } _communicator = null; @@ -135,8 +148,8 @@ public final class PluginManagerI implements PluginManager // Ice.Plugin.name[.<language>]=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 +161,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 +186,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 +253,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/Ice/Util.java b/java/src/Ice/Util.java index 6db12d27cc2..4d9b5488691 100644 --- a/java/src/Ice/Util.java +++ b/java/src/Ice/Util.java @@ -343,13 +343,13 @@ public final class Util public static String stringVersion() { - return "3.3.0"; // "A.B.C", with A=major, B=minor, C=patch + return "3.3.1"; // "A.B.C", with A=major, B=minor, C=patch } public static int intVersion() { - return 30300; // AABBCC, with AA=major, BB=minor, CC=patch + return 30301; // AABBCC, with AA=major, BB=minor, CC=patch } private static String _localAddress = null; 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 37f95cfe1ff..a11d2044b66 100644 --- a/java/src/IceInternal/Instance.java +++ b/java/src/IceInternal/Instance.java @@ -553,7 +553,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/IceInternal/Network.java b/java/src/IceInternal/Network.java index 40b411d5f9d..3eb8a840d14 100644 --- a/java/src/IceInternal/Network.java +++ b/java/src/IceInternal/Network.java @@ -772,9 +772,7 @@ public final class Network // } - if(addr == null || - (addr instanceof java.net.Inet4Address && protocol == EnableIPv6) || - (addr instanceof java.net.Inet6Address && protocol == EnableIPv4)) + if(addr == null || isValidAddr(addr, protocol)) { // // Iterate over the network interfaces and pick an IP @@ -785,9 +783,7 @@ public final class Network while(addr == null && iter.hasNext()) { java.net.InetAddress a = iter.next(); - if(protocol == EnableBoth || - (protocol == EnableIPv4 && a instanceof java.net.Inet4Address) || - (protocol == EnableIPv6 && a instanceof java.net.Inet6Address)) + if(protocol == EnableBoth || isValidAddr(a, protocol)) { addr = a; } @@ -822,9 +818,7 @@ public final class Network for(int i = 0; i < addrs.length; ++i) { - if(protocol == EnableBoth || - (protocol == EnableIPv4 && addrs[i] instanceof java.net.Inet4Address) || - (protocol == EnableIPv6 && addrs[i] instanceof java.net.Inet6Address)) + if(protocol == EnableBoth || isValidAddr(addrs[i], protocol)) { addresses.add(new java.net.InetSocketAddress(addrs[i], port)); } @@ -873,9 +867,7 @@ public final class Network java.net.InetAddress addr = addrs.nextElement(); if(!addr.isLoopbackAddress()) { - if(protocol == EnableBoth || - (protocol == EnableIPv4 && addr instanceof java.net.Inet4Address) || - (protocol == EnableIPv6 && addr instanceof java.net.Inet6Address)) + if(protocol == EnableBoth || isValidAddr(addr, protocol)) { result.add(addr); } @@ -1148,6 +1140,20 @@ public final class Network return ex instanceof java.io.InterruptedIOException; } + private static boolean + isValidAddr(java.net.InetAddress addr, int protocol) + { + byte[] bytes = null; + if(addr != null) + { + bytes = addr.getAddress(); + } + return bytes != null && + ((bytes.length == 16 && protocol == EnableIPv6) || + (bytes.length == 4 && protocol == EnableIPv4)); + } + + private static java.net.InetSocketAddress getAddressImpl(String host, int port, int protocol, boolean server) { @@ -1172,9 +1178,7 @@ public final class Network for(int i = 0; i < addrs.length; ++i) { - if(protocol == EnableBoth || - (protocol == EnableIPv4 && addrs[i] instanceof java.net.Inet4Address) || - (protocol == EnableIPv6 && addrs[i] instanceof java.net.Inet6Address)) + if(protocol == EnableBoth || isValidAddr(addrs[i], protocol)) { return new java.net.InetSocketAddress(addrs[i], port); } 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/ConnectionInfo.java b/java/src/IceSSL/ConnectionInfo.java index 53433eb4e3d..5e10a24bec8 100644 --- a/java/src/IceSSL/ConnectionInfo.java +++ b/java/src/IceSSL/ConnectionInfo.java @@ -42,11 +42,11 @@ public class ConnectionInfo // If the connection is incoming this bool is true, false // otherwise. // - boolean incoming; + public boolean incoming; // // The name of the object adapter that hosts this endpoint, if // any. // - String adapterName; + public String adapterName; } diff --git a/java/src/IceSSL/ConnectorI.java b/java/src/IceSSL/ConnectorI.java index b5606444887..847cb173d0a 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..afddf43071a 100644 --- a/java/src/IceSSL/Instance.java +++ b/java/src/IceSSL/Instance.java @@ -9,6 +9,12 @@ package IceSSL; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + +import Ice.Logger; + class Instance { Instance(Ice.Communicator communicator) @@ -19,10 +25,10 @@ class Instance _securityTraceCategory = "Security"; _trustManager = new TrustManager(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)); } @@ -31,7 +37,7 @@ class Instance initialize() { if(_initialized) - { + { return; } @@ -89,12 +95,12 @@ class Instance // _verifyDepthMax = properties.getPropertyAsIntWithDefault(prefix + "VerifyDepthMax", 2); - // + // // Check for a certificate verifier. - // + // final String certVerifierClass = properties.getProperty(prefix + "CertVerifier"); if(certVerifierClass.length() > 0) - { + { if(_verifier != null) { Ice.PluginInitializationException e = new Ice.PluginInitializationException(); @@ -200,8 +206,6 @@ class Instance final String seedFiles = properties.getProperty(prefix + "Random"); if(seedFiles.length() > 0) { - byte[] seed = null; - int start = 0; final String[] arr = seedFiles.split(java.io.File.pathSeparator); for(int i = 0; i < arr.length; ++i) { @@ -213,34 +217,54 @@ class Instance throw e; } java.io.File f = new java.io.File(seedFile.value); - int num = (int)f.length(); - if(seed == null) + try { - seed = new byte[num]; + _seeds.add(new java.io.FileInputStream(f)); } - else + catch(java.io.IOException ex) { - byte[] tmp = new byte[seed.length + num]; - System.arraycopy(seed, 0, tmp, 0, seed.length); - start = seed.length; - seed = tmp; + Ice.PluginInitializationException e = new Ice.PluginInitializationException(); + e.reason = "IceSSL: error while reading random seed file:\n" + arr[i]; + e.initCause(ex); + throw e; } + } + } + + if(!_seeds.isEmpty()) + { + byte[] seed = null; + int start = 0; + for(java.util.Iterator<InputStream> p = _seeds.iterator(); p.hasNext();) + { + InputStream in = p.next(); try { - java.io.FileInputStream in = new java.io.FileInputStream(f); + int num = in.available(); + if(seed == null) + { + seed = new byte[num]; + } + else + { + byte[] tmp = new byte[seed.length + num]; + System.arraycopy(seed, 0, tmp, 0, seed.length); + start = seed.length; + seed = tmp; + } in.read(seed, start, num); - in.close(); } catch(java.io.IOException ex) { Ice.PluginInitializationException e = new Ice.PluginInitializationException(); - e.reason = "IceSSL: error while reading random seed file:\n" + arr[i]; + e.reason = "IceSSL: error while reading random seed"; e.initCause(ex); throw e; } } rand.setSeed(seed); } + _seeds.clear(); // // We call nextInt() in order to force the object to perform any time-consuming @@ -264,7 +288,8 @@ class Instance String keystorePassword = properties.getProperty(prefix + "KeystorePassword"); // - // The default keystore type value is "JKS", but it can also be "PKCS12". + // The default keystore type is usually "JKS", but the legal values are determined + // by the JVM implementation. Other possibilities include "PKCS12" and "BKS". // final String defaultType = java.security.KeyStore.getDefaultType(); final String keystoreType = properties.getPropertyWithDefault(prefix + "KeystoreType", defaultType); @@ -285,7 +310,8 @@ class Instance String truststorePassword = properties.getProperty(prefix + "TruststorePassword"); // - // The truststore type defaults to "JKS", but it can also be "PKCS12". + // The default truststore type is usually "JKS", but the legal values are determined + // by the JVM implementation. Other possibilities include "PKCS12" and "BKS". // final String truststoreType = properties.getPropertyWithDefault(prefix + "TruststoreType", @@ -295,15 +321,16 @@ class Instance // Collect the key managers. // javax.net.ssl.KeyManager[] keyManagers = null; - if(keystorePath.value.length() > 0) + java.security.KeyStore keys = null; + if(_keystoreStream != null || keystorePath.value.length() > 0) { - if(!checkPath(keystorePath, false)) + if(_keystoreStream == null && !checkPath(keystorePath, false)) { Ice.PluginInitializationException e = new Ice.PluginInitializationException(); e.reason = "IceSSL: keystore file not found:\n" + keystorePath.value; throw e; } - java.security.KeyStore keys = java.security.KeyStore.getInstance(keystoreType); + keys = java.security.KeyStore.getInstance(keystoreType); try { char[] passwordChars = null; @@ -315,9 +342,21 @@ class Instance { passwordChars = _passwordCallback.getKeystorePassword(); } + else if(keystoreType.equals("BKS")) + { + // Bouncy Castle does not permit null passwords. + passwordChars = new char[0]; + } - java.io.BufferedInputStream bis = - new java.io.BufferedInputStream(new java.io.FileInputStream(keystorePath.value)); + java.io.InputStream bis; + if(_keystoreStream != null) + { + bis = _keystoreStream; + } + else + { + bis = new java.io.BufferedInputStream(new java.io.FileInputStream(keystorePath.value)); + } keys.load(bis, passwordChars); if(passwordChars != null) @@ -337,7 +376,7 @@ class Instance String algorithm = javax.net.ssl.KeyManagerFactory.getDefaultAlgorithm(); javax.net.ssl.KeyManagerFactory kmf = javax.net.ssl.KeyManagerFactory.getInstance(algorithm); char[] passwordChars = new char[0]; // This password cannot be null. - if(password.length() > 0) + if(password.length() > 0) { passwordChars = password.toCharArray(); } @@ -377,43 +416,71 @@ class Instance // Collect the trust managers. // javax.net.ssl.TrustManager[] trustManagers = null; - if(truststorePath.value.length() > 0) + if(_truststoreStream != null || truststorePath.value.length() > 0) { - if(!checkPath(truststorePath, false)) + if(_truststoreStream == null && !checkPath(truststorePath, false)) { Ice.PluginInitializationException e = new Ice.PluginInitializationException(); e.reason = "IceSSL: truststore file not found:\n" + truststorePath.value; throw e; } - java.security.KeyStore ts = java.security.KeyStore.getInstance(truststoreType); - try + + // + // If the trust store and the key store are the same input + // stream or file, don't create another key store. + // + java.security.KeyStore ts; + if((_truststoreStream != null && _truststoreStream == _keystoreStream) || + (truststorePath.value.length() > 0 && truststorePath.value.equals(keystorePath.value))) { - char[] passwordChars = null; - if(truststorePassword.length() > 0) - { - passwordChars = truststorePassword.toCharArray(); - } - else if(_passwordCallback != null) + assert keys != null; + ts = keys; + } + else + { + ts = java.security.KeyStore.getInstance(truststoreType); + try { - passwordChars = _passwordCallback.getTruststorePassword(); - } + char[] passwordChars = null; + if(truststorePassword.length() > 0) + { + passwordChars = truststorePassword.toCharArray(); + } + else if(_passwordCallback != null) + { + passwordChars = _passwordCallback.getTruststorePassword(); + } + else if(truststoreType.equals("BKS")) + { + // Bouncy Castle does not permit null passwords. + passwordChars = new char[0]; + } - java.io.BufferedInputStream bis = - new java.io.BufferedInputStream(new java.io.FileInputStream(truststorePath.value)); - ts.load(bis, passwordChars); + java.io.InputStream bis; + if(_truststoreStream != null) + { + bis = _truststoreStream; + } + else + { + bis = new java.io.BufferedInputStream( + new java.io.FileInputStream(truststorePath.value)); + } + ts.load(bis, passwordChars); - if(passwordChars != null) + if(passwordChars != null) + { + java.util.Arrays.fill(passwordChars, '\0'); + } + truststorePassword = null; + } + catch(java.io.IOException ex) { - java.util.Arrays.fill(passwordChars, '\0'); + Ice.PluginInitializationException e = new Ice.PluginInitializationException(); + e.reason = "IceSSL: unable to load truststore:\n" + truststorePath.value; + e.initCause(ex); + throw e; } - truststorePassword = null; - } - catch(java.io.IOException ex) - { - Ice.PluginInitializationException e = new Ice.PluginInitializationException(); - e.reason = "IceSSL: unable to load truststore:\n" + truststorePath.value; - e.initCause(ex); - throw e; } String algorithm = javax.net.ssl.TrustManagerFactory.getDefaultAlgorithm(); @@ -442,7 +509,7 @@ class Instance // // Initialize the SSL context. // - _context = javax.net.ssl.SSLContext.getInstance("SSL"); + _context = javax.net.ssl.SSLContext.getInstance("TLS"); _context.init(keyManagers, trustManagers, rand); } catch(java.security.GeneralSecurityException ex) @@ -454,6 +521,13 @@ class Instance } } + // + // Clear cached input streams. + // + _seeds.clear(); + _keystoreStream = null; + _truststoreStream = null; + _initialized = true; } @@ -463,7 +537,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; } @@ -500,6 +574,38 @@ class Instance return _passwordCallback; } + void + setKeystoreStream(java.io.InputStream stream) + { + if(_initialized) + { + Ice.PluginInitializationException ex = new Ice.PluginInitializationException(); + ex.reason = "IceSSL: plugin is already initialized"; + throw ex; + } + + _keystoreStream = stream; + } + + void + setTruststoreStream(java.io.InputStream stream) + { + if(_initialized) + { + Ice.PluginInitializationException ex = new Ice.PluginInitializationException(); + ex.reason = "IceSSL: plugin is already initialized"; + throw ex; + } + + _truststoreStream = stream; + } + + void + addSeedStream(java.io.InputStream stream) + { + _seeds.add(stream); + } + Ice.Communicator communicator() { @@ -713,7 +819,6 @@ class Instance return _protocols; } - // TODO: Remove void traceConnection(java.nio.channels.SocketChannel fd, javax.net.ssl.SSLEngine engine, boolean incoming) { @@ -861,12 +966,12 @@ class Instance { String msg = (incoming ? "incoming" : "outgoing") + " connection rejected by certificate verifier\n" + IceInternal.Network.fdToString(fd); - + if(_securityTraceLevel > 0) { _logger.trace(_securityTraceCategory, msg); } - + Ice.SecurityException ex = new Ice.SecurityException(); ex.reason = msg; throw ex; @@ -1004,4 +1109,8 @@ class Instance private CertificateVerifier _verifier; private PasswordCallback _passwordCallback; private TrustManager _trustManager; + + private InputStream _keystoreStream; + private InputStream _truststoreStream; + private List<InputStream> _seeds = new ArrayList<InputStream>(); } 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..7e7aabf5651 100644 --- a/java/src/IceSSL/Plugin.java +++ b/java/src/IceSSL/Plugin.java @@ -13,13 +13,13 @@ 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); // @@ -28,7 +28,7 @@ public interface Plugin extends Ice.Plugin // javax.net.ssl.SSLContext getContext(); - // + // // Establish the certificate verifier object. This should be // done before any connections are established. // @@ -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); @@ -51,4 +51,24 @@ public interface Plugin extends Ice.Plugin // callback is set. // PasswordCallback getPasswordCallback(); + + // + // Supplies an input stream for the keystore. Calling this method + // causes IceSSL to ignore the IceSSL.Keystore property. + // + void setKeystoreStream(java.io.InputStream stream); + + // + // Supplies an input stream for the truststore. Calling this method + // causes IceSSL to ignore the IceSSL.Truststore property. It is + // legal to supply the same input stream as setKeystoreStream, in + // which case IceSSL uses the certificates contained in the keystore. + // + void setTruststoreStream(java.io.InputStream stream); + + // + // Add an input stream for the random number seed. You may call + // this method multiple times if necessary. + // + void addSeedStream(java.io.InputStream stream); } diff --git a/java/src/IceSSL/PluginI.java b/java/src/IceSSL/PluginI.java index 2e9ac2427f8..cb5cc915bc6 100644 --- a/java/src/IceSSL/PluginI.java +++ b/java/src/IceSSL/PluginI.java @@ -64,5 +64,23 @@ class PluginI implements Plugin return _instance.getPasswordCallback(); } + public void + setKeystoreStream(java.io.InputStream stream) + { + _instance.setKeystoreStream(stream); + } + + public void + setTruststoreStream(java.io.InputStream stream) + { + _instance.setTruststoreStream(stream); + } + + public void + addSeedStream(java.io.InputStream stream) + { + _instance.addSeedStream(stream); + } + private Instance _instance; } diff --git a/java/src/IceUtil/Version.java b/java/src/IceUtil/Version.java index db4ce177de4..cb153ac230c 100644 --- a/java/src/IceUtil/Version.java +++ b/java/src/IceUtil/Version.java @@ -18,6 +18,6 @@ public final class Version // // The Ice version. // - public final static String ICE_STRING_VERSION = "3.3.0"; // "A.B.C", with A=major, B=minor, C=patch - public final static int ICE_INT_VERSION = 30300; // AABBCC, with AA=major, BB=minor, CC=patch + public final static String ICE_STRING_VERSION = "3.3.1"; // "A.B.C", with A=major, B=minor, C=patch + public final static int ICE_INT_VERSION = 30301; // AABBCC, with AA=major, BB=minor, CC=patch } 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/java/test/IceGrid/simple/AllTests.java b/java/test/IceGrid/simple/AllTests.java index 9b4f3d02144..7df041ec955 100644 --- a/java/test/IceGrid/simple/AllTests.java +++ b/java/test/IceGrid/simple/AllTests.java @@ -78,6 +78,11 @@ public class AllTests test(base != null); System.out.println("ok"); + System.out.print("testing IceGrid.Locator is present... "); + IceGrid.LocatorPrx locator = IceGrid.LocatorPrxHelper.uncheckedCast(base); + test(locator != null); + System.out.println("ok"); + System.out.print("testing checked cast... "); System.out.flush(); TestIntfPrx obj = TestIntfPrxHelper.checkedCast(base); 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<int>(seq.size()); char** argv = new char*[argc + 1]; diff --git a/scripts/Expect.py b/scripts/Expect.py index 80fe0ae1ada..05a1558234e 100755 --- a/scripts/Expect.py +++ b/scripts/Expect.py @@ -101,18 +101,20 @@ class reader(threading.Thread): def trace(self, c): if self._trace: - self._tbuf.write(c) - if c == '\n': - content = self._tbuf.getvalue() - supress = False - if self._tracesupress: - for p in self._tracesupress: - if p.search(content): - supress = True - break - if not supress: - sys.stdout.write(content) - self._tbuf.truncate(0) + if self._tracesupress: + self._tbuf.write(c) + if c == '\n': + content = self._tbuf.getvalue() + supress = False + for p in self._tracesupress: + if p.search(content): + supress = True + break + if not supress: + sys.stdout.write(content) + self._tbuf.truncate(0) + else: + sys.stdout.write(c) def enabletrace(self, supress = None): self.cv.acquire() @@ -279,7 +281,7 @@ class Expect (object): if self.p is not None: self.terminate() - def expect(self, pattern, timeout = 10): + def expect(self, pattern, timeout = 20): """pattern is either a string, or a list of string regexp patterns. timeout == None expect can block indefinitely. 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 * <tt>Ice.InitPlugins=0</tt> 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/Ice/value/InitialI.vb b/vb/demo/Ice/value/InitialI.vb index 80662b9139f..c9aa2b63201 100644 --- a/vb/demo/Ice/value/InitialI.vb +++ b/vb/demo/Ice/value/InitialI.vb @@ -10,7 +10,7 @@ Imports Demo Public Class InitialI - Inherits Initial + Inherits InitialDisp_ Public Sub New(ByVal adapter As Ice.ObjectAdapter) _simple = New Simple 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 diff --git a/vb/demo/IceBox/hello/expect.py b/vb/demo/IceBox/hello/expect.py index d653633b4a6..7c57bacc812 100755 --- a/vb/demo/IceBox/hello/expect.py +++ b/vb/demo/IceBox/hello/expect.py @@ -23,22 +23,11 @@ from demoscript import * from demoscript.IceBox import hello if Util.defaultHost: - args = ' --IceBox.UseSharedCommunicator.IceStorm=1' + args = ' --IceBox.Service.Hello="helloservice.dll:HelloIceBox.HelloIceBoxS+HelloServiceI --Ice.Config=config.service %s"' % Util.defaultHost else: args = '' -iceboxnet = "iceboxnet.exe" -prefix = [ "../../../../cs", "/usr" ] -if os.environ.has_key("ICE_HOME"): - prefix.append(os.environ["ICE_HOME"]) -for p in prefix: - path = os.path.join(p, "bin", iceboxnet) - if os.path.exists(path): - iceboxnet = path - break - -# TODO: This doesn't setup LD_LIBRARY_PATH -server = Util.spawn('%s --Ice.Config=config.icebox --Ice.PrintAdapterReady %s' % (iceboxnet, args)) +server = Util.spawn('%s --Ice.Config=config.icebox --Ice.PrintAdapterReady %s' % (Util.getIceBox("cs"), args)) server.expect('.* ready') client = Util.spawn('client.exe') client.expect('.*==>') |