osaf/services/saf/immsv/README            |  19 ++++++++++++++++++-
 osaf/services/saf/immsv/immnd/ImmModel.cc |   6 ------
 2 files changed, 18 insertions(+), 7 deletions(-)


This enhancement removes the restriction of not allowing a class schema change
to add a default to an attribute definition.
(Note: Removing a default is still not allowed as it is inherrently not
 backwards compatible.))

Only new instances of the class will get the default assigned when no value is
provided for the attribute at object-create time.

Old instances with a null-value for the attribute will still have a null-value
for that attribute even after the schema change. A general rule for schema
changes is that the immsv never alters the value of existing attributes as
part of a schema change. Doing so would require the OI to be notified, which is
not realistic since the shcema change is not performed as a CCB.

diff --git a/osaf/services/saf/immsv/README b/osaf/services/saf/immsv/README
--- a/osaf/services/saf/immsv/README
+++ b/osaf/services/saf/immsv/README
@@ -484,6 +484,10 @@ CHANGE of an existing attribute if it is
      New instances of the class will get the new default,
      old instances retain the old value.
 
+   * Adding default-value for an attribute (config or runtime).
+     New instances of the class will get the new default,
+     old instances retain the null value.
+
    * Adding 'multivalued' flag for an attribute (config or runtime).
 
    * Adding 'writable' flag for an attribute (config).
@@ -494,7 +498,7 @@ CHANGE of an existing attribute if it is
 
 
 All other changes, such as change of attribute type, removal of default,
-addition of default, etc are not allowed.
+etc are not allowed.
 
 There is no API change. The existing saImmOmClassCreate_2 call is used
 to insert the new class version. The standard behavior is to reject
@@ -1842,6 +1846,18 @@ not to create deadlock cycles between th
 be resolved by the timeout of the synchronous admin-ops, so the problem would 
be lack
 of progress on some task, not a permanently hung set of processes.
 
+Allow schema change to add attribute default (4.5)
+==================================================
+
+The restriction of not allowing a default value to be added to an attribute 
that
+previously had no default, has been removed. Only new instances of the class 
will
+get the default assigned when no value is provided for the attribute at 
object-create
+time. Old instances with a null-value for the attribute will still have a 
null-value
+for that attribute even after the schema change. A general rule for schema 
changes
+is that the immsv never alters the value of existing attributes as part of a 
schema
+change. Doing so would require the OI to be notified, which is not realistic 
since
+the shcema change is not performed as a CCB.
+
 
 Attribute 'longDnsAllowed' added to class 'OpensafImm' (4.5)
 ===========================================================
@@ -1869,6 +1885,7 @@ The xml file should be used for upgradin
 upgraded to OpenSAF 4.5 and that system must be capable of supporting long DNs.
 
 
+
 Notes on upgrading from OpenSAF 4.[1,2,3,4] to OpenSAF 4.5
 ==========================================================
 Several enhancements in OpenSAF4.5 add new message types or add new imm server 
states
diff --git a/osaf/services/saf/immsv/immnd/ImmModel.cc 
b/osaf/services/saf/immsv/immnd/ImmModel.cc
--- a/osaf/services/saf/immsv/immnd/ImmModel.cc
+++ b/osaf/services/saf/immsv/immnd/ImmModel.cc
@@ -3716,12 +3716,6 @@ ImmModel::notCompatibleAtt(const std::st
             }
         }
 
-        if(oldAttr->mDefaultValue.empty() && !newAttr->mDefaultValue.empty()) {
-            LOG_NO("Impossible upgrade, attribute %s:%s adds default value",
-                className.c_str(), attName.c_str());
-            return true;
-        }
-
         if(!oldAttr->mDefaultValue.empty() && newAttr->mDefaultValue.empty()) {
             LOG_NO("Impossible upgrade, attribute %s:%s removes default value",
                 className.c_str(), attName.c_str());

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to