diff options
author | harrisb <harrisb@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2013-01-03 17:13:06 +0000 |
---|---|---|
committer | harrisb <harrisb@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2013-01-03 17:13:06 +0000 |
commit | ccec85720519d4be956aee0bc375b7c7e363116e (patch) | |
tree | 9e3d2477318c1f6eb5adba01ea90e69b3e4c2185 | |
parent | c6d314957beb690f6e0771f1b3e40213fab625cf (diff) | |
download | ATCD-ccec85720519d4be956aee0bc375b7c7e363116e.tar.gz |
Thu Jan 3 17:09:27 UTC 2013 Byron Harris <harrisb@ociweb.com>
-rw-r--r-- | TAO/OCI_RE_ChangeLog | 8 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp | 5 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h | 4 |
3 files changed, 15 insertions, 2 deletions
diff --git a/TAO/OCI_RE_ChangeLog b/TAO/OCI_RE_ChangeLog index 959f1ec17fb..a95cdce9ab6 100644 --- a/TAO/OCI_RE_ChangeLog +++ b/TAO/OCI_RE_ChangeLog @@ -1,3 +1,11 @@ +Thu Jan 3 17:09:27 UTC 2013 Byron Harris <harrisb@ociweb.com> + + * orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h: + * orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp: + + Fix lazy loading of group map so get_group_map() will + always read from persistent store in the first invocation. + Wed Jan 2 22:13:53 UTC 2013 Byron Harris <harrisb@ociweb.com> * orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp: diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp index 14469a8e637..af687aadba9 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp @@ -54,6 +54,7 @@ TAO::PG_Group_Factory::PG_Group_Factory () , poa_ (PortableServer::POA::_nil()) , manipulator_ () , domain_id_ ("default-domain") + , groups_read_ (false) , storable_factory_ (0) , list_store_ (0) { @@ -351,7 +352,7 @@ TAO::PG_Group_Factory::get_group_map () // have changed since group_map_ was last // updated. - if (list_store_->list_obsolete ()) + if (!this->groups_read_ || this->list_store_->list_obsolete ()) { // Extract IDs from group_map_ to set for comparison with IDs in persistent store // This is to avoid having to repopulate the map from scratch. @@ -407,6 +408,8 @@ TAO::PG_Group_Factory::get_group_map () throw PortableGroup::ObjectGroupNotFound (); } + this->groups_read_ = true; + } } diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h index ff8be2904e8..e45e53bd039 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h @@ -211,8 +211,10 @@ namespace TAO Group_Map group_map_; - // Support for object group persistent + ///// Support for object group persistent ///// + // Lazily read groups from store + bool groups_read_; Storable_Factory * storable_factory_; PG_Group_List_Store * list_store_; |