diff options
author | Mark Spruiell <mes@zeroc.com> | 2006-08-22 00:06:02 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2006-08-22 00:06:02 +0000 |
commit | a21245de493fd741e3a561adfdb1ca951c30145c (patch) | |
tree | 566960b5671ec08fb74b15e45a0084c7e24b7ec9 /cpp | |
parent | minor reorg (diff) | |
download | ice-a21245de493fd741e3a561adfdb1ca951c30145c.tar.bz2 ice-a21245de493fd741e3a561adfdb1ca951c30145c.tar.xz ice-a21245de493fd741e3a561adfdb1ca951c30145c.zip |
bug 1156: removing deprecated Identity properties
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/CHANGES | 111 | ||||
-rw-r--r-- | cpp/config/PropertyNames.def | 5 | ||||
-rw-r--r-- | cpp/doc/Properties.sgml | 113 | ||||
-rw-r--r-- | cpp/src/Glacier2/Glacier2Router.cpp | 9 | ||||
-rw-r--r-- | cpp/src/Glacier2/SessionRouterI.cpp | 9 | ||||
-rw-r--r-- | cpp/src/Ice/PropertyNames.cpp | 7 | ||||
-rw-r--r-- | cpp/src/Ice/PropertyNames.h | 2 | ||||
-rw-r--r-- | cpp/src/IceBox/Admin.cpp | 7 | ||||
-rw-r--r-- | cpp/src/IceBox/ServiceManagerI.cpp | 6 | ||||
-rw-r--r-- | cpp/src/IcePatch2/Server.cpp | 17 |
10 files changed, 82 insertions, 204 deletions
diff --git a/cpp/CHANGES b/cpp/CHANGES index 4f0979a3844..d4a7aafe05f 100644 --- a/cpp/CHANGES +++ b/cpp/CHANGES @@ -1,59 +1,91 @@ -Changes since version 3.1.0 +NOTE: Please keep changes in the appropriate section for HEAD or 3.1. + +Changes since version 3.1.1 (HEAD) --------------------------- -- Fixed a bug with the IceGrid allocate and sessionAllocation demos - where the session would not be destroyed in the event of an - allocation failure. +- Removed support for the following configuration properties that were + deprecated in Ice 3.0: -- Fixed a bug with config/ca/import.py script when importing - certificates without an encrypted private key into a java keystore. + IceBox.ServiceManager.Identity + IcePatch2.AdminIdentity + IcePatch2.Identity + Glacier2.AdminIdentity + Glacier2.RouterIdentity + + Each of these services supports an InstanceName property that should + be used instead. - Added UnexpectedObjectException. This exception is raised if you use Slice classes and client and server are compiled with mismatched Slice definitions. Alternatively, this exception is raised if you - use dynamic invocation and pass a class of the wrong type as an operation - parameter. + use dynamic invocation and pass a class of the wrong type as an + operation parameter. -- Fixed a bug where variables from distribution descriptors were not - substituted. +- The Slice keyword 'nonmutating' is now deprecated; 'idempotent' + should be used instead. A new metadata directive is supported for + backward-compatibility (see below). -- The keyword 'nonmutating' is now deprecated. You should use - instead 'idempotent' with the metadata below (when needed). +- Added the Freeze property Freeze.Evictor.UseNonmutating. + + When set to a non-zero value, the Freeze Evictor behaves like it did + in previous Ice releases in that it assumes nonmutating operations + do not update the target object, while all other operations do + update the target. -- New Freeze property: Freeze.Evictor.UseNonmutating: - When set to a non-0 value, the Freeze Evictor behaves like it did - in previous Ice releases, i.e. it considers that nonmutating - operations don't update the target object, while all other - operations do update the target. As of this release, the recommended mechanism is to use the - "freeze:write" and "freeze:write" metadata (see below). - Default value: 0 + "freeze:read" and "freeze:write" metadata (see below). + + If not defined, the default value of this property is 0. + +- New Slice metadata for operations: -- New operation metadata: - - ["cpp:const"]: generate a const member function on the corresponding - servant base class - - ["freeze:read"], ["freeze:write"]: mark the operation as "read" + - ["cpp:const"] generates a const member function on the + corresponding servant base class. + + - ["freeze:read"] or ["freeze:write"] marks the operation as "read" or "write" for the Freeze evictor. The default is the freeze mode of the enclosing interface/class. - - ["nonmutating"]: for idempotent operations, instruct Ice to send - the nonmutating operation-mode instead of the idempotent operation - -mode. This metadata allows you to replace 'nonmutating' by - '["nonmutating"] idempotent' while maintaining compatibility with + + - ["nonmutating"] provides backward compatibility for idempotent + operations that were previously declared using the deprecated + 'nonmutating' keyword. You can replace the 'nonmutating' keyword + with '["nonmutating"] idempotent' to maintain compatibility with objects implemented using Ice 3.0 or 3.1. -- New interface/class metadata: - - ["freeze:read"], ["freeze:write"]: defines the default freeze mode - for operations on that interface/class. The default is read. - This metadata has no effect on derived classes/interfaces. +- New Slice metadata for interfaces/classes: + + - ["freeze:read"] or ["freeze:write"] defines the default freeze + mode for operations on the interface/class. The default is read. + This metadata has no effect on derived types. + +- For non-abstract Slice classes, the C++ code generator now adds a + protected destructor. This prevents accidental allocation of + class instances on the stack or as static variables. For the + implementation of abstract Slice classes, and for servant classes, + applications can do the same thing and add a protected destructor + to prevent non-heap allocation. + +Changes since version 3.1.0 +--------------------------- + +- Fixed a bug with the IceGrid allocate and sessionAllocation demos + where the session would not be destroyed in the event of an + allocation failure. + +- Fixed a bug with config/ca/import.py script when importing + certificates without an encrypted private key into a java keystore. + +- Fixed a bug where variables from distribution descriptors were not + substituted. -- Fixed an assert in the IceGrid locator implementation which could +- Fixed an assert in the IceGrid locator implementation that could occur when using dynamic adapter registration. The assert was triggered when an adapter was removed and a client was requesting at the same time the adapter endpoints through the locator interface. - Fixed a bug in slice2cpp that caused incorrect code to be generated - if a class had member that was an interface (not class) by value: + if a class had a member that was an interface (not class) by value: interface I { @@ -73,22 +105,15 @@ Changes since version 3.1.0 C myCstar; // OK, no problem with 3.1.0. }; -- For non-abstract Slice classes, the C++ code generator now adds a - protected destructor. This prevents accidental allocation of - class instances on the stack or as static variables. For the - implementation of abstract Slice classes, and for servant classes, - applications can do the same thing and add a protected destructor - to prevent non-heap allocation. - -- Fixed a bug in the IceGrid replication code which would cause clients +- Fixed a bug in the IceGrid replication code that would cause clients to get an Ice::NoEndpointException if the node of a replica was inactive. -- Fixed a bug in the IceGrid XML parser which could cause a crash if +- Fixed a bug in the IceGrid XML parser that could cause a crash if the adapter element for the IceBox.ServiceManager adapter was specified in the icebox element. -- Restored Communicator::setDefaultContext +- Restored Communicator::setDefaultContext. - Fixed a bug in Ice::initialize() that raised a NullHandleException when the function was called without arguments or when the diff --git a/cpp/config/PropertyNames.def b/cpp/config/PropertyNames.def index b3ec07547ca..6114a6b6158 100644 --- a/cpp/config/PropertyNames.def +++ b/cpp/config/PropertyNames.def @@ -180,7 +180,6 @@ IceBox: ServiceManager.AdapterId ServiceManager.ReplicaGroupId ServiceManager.Endpoints - ServiceManager.Identity ServiceManager.PublishedEndpoints ServiceManager.RegisterProcess ServiceManager.ThreadPool.Size @@ -289,11 +288,9 @@ IcePatch2: Admin.ThreadPool.SizeMax Admin.ThreadPool.SizeWarn Admin.ThreadPool.StackSize - AdminIdentity ChunkSize Directory Endpoints - Identity InstanceName PublishedEndpoints RegisterProcess @@ -366,7 +363,6 @@ IceStorm: Glacier2: AddUserToAllowCategories Admin.Endpoints - AdminIdentity Admin.PublishedEndpoints Admin.RegisterProcess AllowCategories @@ -390,7 +386,6 @@ Glacier2: InstanceName PermissionsVerifier SSLPermissionsVerifier - RouterIdentity RoutingTable.MaxSize Server.AlwaysBatch Server.Buffered diff --git a/cpp/doc/Properties.sgml b/cpp/doc/Properties.sgml index d3a69c67746..1ef59f61016 100644 --- a/cpp/doc/Properties.sgml +++ b/cpp/doc/Properties.sgml @@ -2531,25 +2531,6 @@ for more information. </section> </section> -<section><title>IceBox.ServiceManager.Identity</title> -<section><title>Synopsis</title> -<synopsis> -IceBox.ServiceManager.Identity=<replaceable>identity</replaceable> -</synopsis> -</section> -<section> -<title>Description</title> -<para> -The identity of the service manager interface. If not specified the -default value <literal>ServiceManager</literal> is used. -</para> -<note><para>This property is deprecated and supported only for -backward-compatibility. New applications should use -<link linkend="IceBox.InstanceName">IceBox.InstanceName</link>. -</para></note> -</section> -</section> - <section><title>IceBox.ServiceManager.RegisterProcess</title> <section><title>Synopsis</title> <synopsis> @@ -4495,25 +4476,6 @@ security risk!</para></note> </section> </section> -<section><title>Glacier2.AdminIdentity</title> -<section><title>Synopsis</title> -<synopsis> -Glacier2.AdminIdentity=<replaceable>identity</replaceable> -</synopsis> -</section> -<section> -<title>Description</title> -<para> -The identity of the &Glacier2; admin interface. If not specified, the -default value <literal>Glacier2/admin</literal> is used. -</para> -<note><para>This property is deprecated and supported only for -backward-compatibility. New applications should use -<link linkend="Glacier2.InstanceName">Glacier2.InstanceName</link>. -</para></note> -</section> -</section> - <section id="Glacier2.AllowCategories"><title>Glacier2.AllowCategories</title> <section><title>Synopsis</title> <synopsis> @@ -4875,14 +4837,10 @@ Specifies a default identity category for the &Glacier2; objects. If defined, the identity of the &Glacier2; admin interface becomes <replaceable>name</replaceable><literal>/admin</literal> and the identity of the &Glacier2; router interface becomes -<replaceable>name</replaceable><literal>/router</literal>. The -deprecated properties <literal>Glacier2.AdminIdentity</literal> -and <literal>Glacier2.RouterIdentity</literal> take precedence. +<replaceable>name</replaceable><literal>/router</literal>. </para> <para> -If not otherwise defined, the default identities of the &Glacier2; -objects are <literal>Glacier2/admin</literal> and -<literal>Glacier2/router</literal>. +If not defined, the default value is <literal>Glacier2</literal>. </para> </section> </section> @@ -4909,25 +4867,6 @@ password file using </section> </section> -<section><title>Glacier2.RouterIdentity</title> -<section><title>Synopsis</title> -<synopsis> -Glacier2.RouterIdentity=<replaceable>identity</replaceable> -</synopsis> -</section> -<section> -<title>Description</title> -<para> -The identity of the &Glacier2; router interface. If not specified, the -default value <literal>Glacier2/router</literal> is used. -</para> -<note><para>This property is deprecated and supported only for -backward-compatibility. New applications should use -<link linkend="Glacier2.InstanceName">Glacier2.InstanceName</link>. -</para></note> -</section> -</section> - <section id="Glacier2.RoutingTable.MaxSize"><title>Glacier2.RoutingTable.MaxSize</title> <section><title>Synopsis</title> <synopsis> @@ -5581,26 +5520,6 @@ hostile clients. </section> </section> -<section><title>IcePatch2.AdminIdentity</title> -<section><title>Synopsis</title> -<synopsis> -IcePatch2.AdminIdentity=<replaceable>identity</replaceable> -</synopsis> -</section> -<section> -<title>Description</title> -<para> -This property determines the identity of the <literal>IcePatch2::Admin</literal> -singleton object offered by the &IcePatch2; server. The default -value is <literal>IcePatch2/admin</literal>. -</para> -<note><para>This property is deprecated and supported only for -backward-compatibility. New applications should use -<link linkend="IcePatch2.InstanceName">IcePatch2.InstanceName</link>. -</para></note> -</section> -</section> - <section><title>IcePatch2.ChunkSize</title> <section><title>Synopsis</title> <synopsis> @@ -5655,26 +5574,6 @@ by both the IcePatch2 server and client. </section> </section> -<section><title>IcePatch2.Identity</title> -<section><title>Synopsis</title> -<synopsis> -IcePatch2.Identity=<replaceable>identity</replaceable> -</synopsis> -</section> -<section> -<title>Description</title> -<para> -This property determines the identity of the <literal>IcePatch2::FileServer</literal> -singleton object offered by the &IcePatch2; server. The default -value is <literal>IcePatch2/server</literal>. -</para> -<note><para>This property is deprecated and supported only for -backward-compatibility. New applications should use -<link linkend="IcePatch2.InstanceName">IcePatch2.InstanceName</link>. -</para></note> -</section> -</section> - <section id="IcePatch2.InstanceName"><title>IcePatch2.InstanceName</title> <section><title>Synopsis</title> <synopsis> @@ -5688,14 +5587,10 @@ Specifies a default identity category for the &IcePatch2; objects. If defined, the identity of the &IcePatch2; admin interface becomes <replaceable>name</replaceable><literal>/admin</literal> and the identity of the &IcePatch2; file server interface becomes -<replaceable>name</replaceable><literal>/server</literal>. The -deprecated properties <literal>IcePatch2.AdminIdentity</literal> -and <literal>IcePatch2.Identity</literal> take precedence. +<replaceable>name</replaceable><literal>/server</literal>. </para> <para> -If not otherwise defined, the default identities of the &IcePatch2; -objects are <literal>IcePatch2/admin</literal> and -<literal>IcePatch2/server</literal>. +If not defined, the default value is <literal>IcePatch2</literal>. </para> </section> </section> diff --git a/cpp/src/Glacier2/Glacier2Router.cpp b/cpp/src/Glacier2/Glacier2Router.cpp index cc0c5c6860d..749e6554f3b 100644 --- a/cpp/src/Glacier2/Glacier2Router.cpp +++ b/cpp/src/Glacier2/Glacier2Router.cpp @@ -269,13 +269,8 @@ Glacier2::RouterService::start(int argc, char* argv[]) // if(adminAdapter) { - const string adminIdProperty = "Glacier2.AdminIdentity"; - string adminId = properties->getProperty(adminIdProperty); - if(adminId.empty()) - { - const string instanceNameProperty = "Glacier2.InstanceName"; - adminId = properties->getPropertyWithDefault(instanceNameProperty, "Glacier2") + "/admin"; - } + const string instanceNameProperty = "Glacier2.InstanceName"; + string adminId = properties->getPropertyWithDefault(instanceNameProperty, "Glacier2") + "/admin"; Identity id = communicator()->stringToIdentity(adminId); adminAdapter->add(new AdminI(communicator()), id); } diff --git a/cpp/src/Glacier2/SessionRouterI.cpp b/cpp/src/Glacier2/SessionRouterI.cpp index 1103cd90412..50505e40236 100644 --- a/cpp/src/Glacier2/SessionRouterI.cpp +++ b/cpp/src/Glacier2/SessionRouterI.cpp @@ -245,13 +245,8 @@ Glacier2::SessionRouterI::SessionRouterI(const ObjectAdapterPtr& clientAdapter, // This session router is used directly as servant for the main // Glacier2 router Ice object. // - const char* routerIdProperty = "Glacier2.RouterIdentity"; - string routerId = _properties->getProperty(routerIdProperty); - if(routerId.empty()) - { - const char* instanceNameProperty = "Glacier2.InstanceName"; - routerId = _properties->getPropertyWithDefault(instanceNameProperty, "Glacier2") + "/router"; - } + const string instanceNameProperty = "Glacier2.InstanceName"; + string routerId = _properties->getPropertyWithDefault(instanceNameProperty, "Glacier2") + "/router"; Identity id = clientAdapter->getCommunicator()->stringToIdentity(routerId); _clientAdapter->add(this, id); diff --git a/cpp/src/Ice/PropertyNames.cpp b/cpp/src/Ice/PropertyNames.cpp index 030e6797fac..f1dfb0d6dd7 100644 --- a/cpp/src/Ice/PropertyNames.cpp +++ b/cpp/src/Ice/PropertyNames.cpp @@ -7,7 +7,7 @@ // // ********************************************************************** -// Generated by makeprops.py from file `./PropertyNames.def', Wed Jul 26 17:12:35 2006 +// Generated by makeprops.py from file `../config/PropertyNames.def', Mon Aug 21 16:37:24 2006 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -85,7 +85,6 @@ const char* IceInternal::PropertyNames::IceBoxProps[] = "IceBox.ServiceManager.AdapterId", "IceBox.ServiceManager.ReplicaGroupId", "IceBox.ServiceManager.Endpoints", - "IceBox.ServiceManager.Identity", "IceBox.ServiceManager.PublishedEndpoints", "IceBox.ServiceManager.RegisterProcess", "IceBox.ServiceManager.ThreadPool.Size", @@ -200,11 +199,9 @@ const char* IceInternal::PropertyNames::IcePatch2Props[] = "IcePatch2.Admin.ThreadPool.SizeMax", "IcePatch2.Admin.ThreadPool.SizeWarn", "IcePatch2.Admin.ThreadPool.StackSize", - "IcePatch2.AdminIdentity", "IcePatch2.ChunkSize", "IcePatch2.Directory", "IcePatch2.Endpoints", - "IcePatch2.Identity", "IcePatch2.InstanceName", "IcePatch2.PublishedEndpoints", "IcePatch2.RegisterProcess", @@ -286,7 +283,6 @@ const char* IceInternal::PropertyNames::Glacier2Props[] = { "Glacier2.AddUserToAllowCategories", "Glacier2.Admin.Endpoints", - "Glacier2.AdminIdentity", "Glacier2.Admin.PublishedEndpoints", "Glacier2.Admin.RegisterProcess", "Glacier2.AllowCategories", @@ -310,7 +306,6 @@ const char* IceInternal::PropertyNames::Glacier2Props[] = "Glacier2.InstanceName", "Glacier2.PermissionsVerifier", "Glacier2.SSLPermissionsVerifier", - "Glacier2.RouterIdentity", "Glacier2.RoutingTable.MaxSize", "Glacier2.Server.AlwaysBatch", "Glacier2.Server.Buffered", diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h index 1ea2eab1d63..7ea2a4eeeef 100644 --- a/cpp/src/Ice/PropertyNames.h +++ b/cpp/src/Ice/PropertyNames.h @@ -7,7 +7,7 @@ // // ********************************************************************** -// Generated by makeprops.py from file `./PropertyNames.def', Wed Jul 26 17:12:35 2006 +// Generated by makeprops.py from file `../config/PropertyNames.def', Mon Aug 21 16:37:24 2006 // IMPORTANT: Do not edit this file -- any edits made here will be lost! diff --git a/cpp/src/IceBox/Admin.cpp b/cpp/src/IceBox/Admin.cpp index bc5c89c9af6..4259cd7816b 100644 --- a/cpp/src/IceBox/Admin.cpp +++ b/cpp/src/IceBox/Admin.cpp @@ -83,14 +83,9 @@ Client::run(int argc, char* argv[]) } PropertiesPtr properties = communicator()->getProperties(); - string managerIdentity = properties->getProperty("IceBox.ServiceManager.Identity"); - if(managerIdentity.empty()) - { - managerIdentity = properties->getPropertyWithDefault("IceBox.InstanceName", "IceBox") + "/ServiceManager"; - } + string managerIdentity = properties->getPropertyWithDefault("IceBox.InstanceName", "IceBox") + "/ServiceManager"; string managerProxy; - if(properties->getProperty("Ice.Default.Locator").empty()) { string managerEndpoints = properties->getProperty("IceBox.ServiceManager.Endpoints"); diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp index 207c6a61f00..721aacdf695 100644 --- a/cpp/src/IceBox/ServiceManagerI.cpp +++ b/cpp/src/IceBox/ServiceManagerI.cpp @@ -62,11 +62,7 @@ IceBox::ServiceManagerI::start() ObjectAdapterPtr adapter = _communicator->createObjectAdapter("IceBox.ServiceManager"); PropertiesPtr properties = _communicator->getProperties(); - string identity = properties->getProperty("IceBox.ServiceManager.Identity"); - if(identity.empty()) - { - identity = properties->getPropertyWithDefault("IceBox.InstanceName", "IceBox") + "/ServiceManager"; - } + string identity = properties->getPropertyWithDefault("IceBox.InstanceName", "IceBox") + "/ServiceManager"; adapter->add(obj, _communicator->stringToIdentity(identity)); // diff --git a/cpp/src/IcePatch2/Server.cpp b/cpp/src/IcePatch2/Server.cpp index 7c604c1a392..76030e75f64 100644 --- a/cpp/src/IcePatch2/Server.cpp +++ b/cpp/src/IcePatch2/Server.cpp @@ -159,24 +159,12 @@ IcePatch2::PatcherService::start(int argc, char* argv[]) const string instanceNameProperty = "IcePatch2.InstanceName"; string instanceName = properties->getPropertyWithDefault(instanceNameProperty, "IcePatch2"); - const string idProperty = "IcePatch2.Identity"; - string idStr = properties->getProperty(idProperty); - if(idStr.empty()) - { - idStr = instanceName + "/server"; - } - Identity id = communicator()->stringToIdentity(idStr); + Identity id = communicator()->stringToIdentity(instanceName + "/server"); adapter->add(new FileServerI(dataDir, infoSeq), id); if(adminAdapter) { - const string adminIdProperty = "IcePatch2.AdminIdentity"; - string adminIdStr = properties->getProperty(adminIdProperty); - if(adminIdStr.empty()) - { - adminIdStr = instanceName + "/admin"; - } - Identity adminId = communicator()->stringToIdentity(adminIdStr); + Identity adminId = communicator()->stringToIdentity(instanceName + "/admin"); adminAdapter->add(new AdminI(communicator()), adminId); } @@ -195,7 +183,6 @@ IcePatch2::PatcherService::stop() return true; } - void IcePatch2::PatcherService::usage(const string& appName) { |