diff options
author | Steve Totten <tottens@users.noreply.github.com> | 2003-10-09 19:54:52 +0000 |
---|---|---|
committer | Steve Totten <tottens@users.noreply.github.com> | 2003-10-09 19:54:52 +0000 |
commit | 2496be51f220f7223b819abdab2b67b80517022e (patch) | |
tree | 3ac6456ee4fa4a98cabc29ce73134132899f8179 | |
parent | 9c869ff9bf25243b9d1929234c80907e6573520e (diff) | |
download | ATCD-2496be51f220f7223b819abdab2b67b80517022e.tar.gz |
ChangeLogTag: Thu Oct 9 14:26:48 2003 Steve Totten <totten_s@ociweb.com>
13 files changed, 118 insertions, 13 deletions
diff --git a/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.cpp b/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.cpp index 9be01b99237..e399dc83e77 100644 --- a/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.cpp +++ b/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.cpp @@ -491,6 +491,20 @@ TAO::FT_ReplicationManager::get_object_group_ref ( ACE_ENV_ARG_PARAMETER); } +PortableGroup::ObjectGroup_ptr +TAO::FT_ReplicationManager::get_object_group_ref_from_id ( + PortableGroup::ObjectGroupId group_id + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( + CORBA::SystemException + , PortableGroup::ObjectGroupNotFound + )) +{ + return + this->object_group_manager_.get_object_group_ref_from_id (group_id + ACE_ENV_ARG_PARAMETER); +} + CORBA::Object_ptr TAO::FT_ReplicationManager::get_member_ref ( PortableGroup::ObjectGroup_ptr object_group, diff --git a/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.h b/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.h index deec78e3676..738e73dcb03 100644 --- a/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.h +++ b/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.h @@ -314,6 +314,19 @@ namespace TAO ACE_THROW_SPEC ((CORBA::SystemException, PortableGroup::ObjectGroupNotFound)); + /** + * TAO-specific extension. + * Return the ObjectGroup reference for the given ObjectGroupId. + */ + virtual PortableGroup::ObjectGroup_ptr get_object_group_ref_from_id ( + PortableGroup::ObjectGroupId group_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + CORBA::SystemException + , PortableGroup::ObjectGroupNotFound + )); + /// Return the reference corresponding to the Replica of a given /// ObjectGroup at the given location. virtual CORBA::Object_ptr get_member_ref ( diff --git a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_IOGR_Property.cpp b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_IOGR_Property.cpp index 62496728b2e..86ab0a5c63c 100644 --- a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_IOGR_Property.cpp +++ b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_IOGR_Property.cpp @@ -272,7 +272,7 @@ TAO_FT_IOGR_Property::encode_properties ( // the version info CORBA::Boolean status = - cdr << this->ft_group_tagged_component_->component_version; + cdr << this->ft_group_tagged_component_->group_version; // the domain id status = status && diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.cpp index 4ab431573e7..2fab9346e5f 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.cpp @@ -686,6 +686,20 @@ TAO_LB_LoadManager::get_object_group_ref ( ACE_ENV_ARG_PARAMETER); } +PortableGroup::ObjectGroup_ptr +TAO_LB_LoadManager::get_object_group_ref_from_id ( + PortableGroup::ObjectGroupId group_id + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( + CORBA::SystemException + , PortableGroup::ObjectGroupNotFound + )) +{ + return + this->object_group_manager_.get_object_group_ref_from_id (group_id + ACE_ENV_ARG_PARAMETER); +} + CORBA::Object_ptr TAO_LB_LoadManager::get_member_ref ( PortableGroup::ObjectGroup_ptr object_group, diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.h index 009318f9846..54f2957c67a 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.h +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.h @@ -289,6 +289,19 @@ public: ACE_THROW_SPEC ((CORBA::SystemException, PortableGroup::ObjectGroupNotFound)); + /** + * TAO-specific extension. + * Return the ObjectGroup reference for the given ObjectGroupId. + */ + virtual PortableGroup::ObjectGroup_ptr get_object_group_ref_from_id ( + PortableGroup::ObjectGroupId group_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + CORBA::SystemException + , PortableGroup::ObjectGroupNotFound + )); + /// Return the reference corresponding to the Replica of a given /// ObjectGroup at the given location. virtual CORBA::Object_ptr get_member_ref ( diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup.idl b/TAO/orbsvcs/orbsvcs/PortableGroup.idl index 4c342b25e5e..0bdec8763d5 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup.idl +++ b/TAO/orbsvcs/orbsvcs/PortableGroup.idl @@ -38,7 +38,7 @@ module PortableGroup typedef unsigned long ObjectGroupRefVersion; struct TagGroupTaggedComponent { // tag = TAG_GROUP; - GIOP::Version component_version; + GIOP::Version group_version; GroupDomainId group_domain_id; ObjectGroupId object_group_id; ObjectGroupRefVersion object_group_ref_version; @@ -178,6 +178,11 @@ module PortableGroup in Location loc) raises (ObjectGroupNotFound, MemberNotFound); + // TAO-specific extension. + ObjectGroup get_object_group_ref_from_id ( + in ObjectGroupId group_id) + raises (ObjectGroupNotFound); + }; // end ObjectGroupManager diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp index c38546f3c04..1ed50676c3b 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp @@ -469,6 +469,39 @@ TAO_PG_ObjectGroupManager::get_member_ref ( CORBA::Object::_nil ()); } +PortableGroup::ObjectGroup_ptr +TAO_PG_ObjectGroupManager::get_object_group_ref_from_id ( + PortableGroup::ObjectGroupId group_id + ACE_ENV_ARG_DECL + ) + ACE_THROW_SPEC (( + CORBA::SystemException + , PortableGroup::ObjectGroupNotFound + )) +{ + //@@ If we change the PG's concept of ObjectGroupId from + // PortableServer::ObjectId to PortableGroup::ObjectGroupId, can + // just call TAO_PG_ObjectGroupManager::object_group() here. + + TAO_PG_ObjectGroup_Map_Entry * group_entry = 0; + { + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, + guard, + this->lock_, + PortableGroup::ObjectGroup::_nil ()); + + if (this->object_group_map_.find (group_id, group_entry) != 0) + ACE_THROW_RETURN (PortableGroup::ObjectGroupNotFound (), + PortableGroup::ObjectGroup::_nil ()); + } + + if (group_entry == 0) + ACE_THROW_RETURN (CORBA::INTERNAL (), + PortableGroup::ObjectGroup::_nil ()); + + return + PortableGroup::ObjectGroup::_duplicate (group_entry->object_group.in ()); +} PortableGroup::ObjectGroup_ptr TAO_PG_ObjectGroupManager::create_object_group ( @@ -491,8 +524,8 @@ TAO_PG_ObjectGroupManager::create_object_group ( // { int _TODO_replace_this_with_commemted_out_version_; } PortableGroup::TagGroupTaggedComponent tag_component; - tag_component.component_version.major = (CORBA::Octet) 1; - tag_component.component_version.minor = (CORBA::Octet) 0; + tag_component.group_version.major = (CORBA::Octet) 1; + tag_component.group_version.minor = (CORBA::Octet) 0; tag_component.group_domain_id = domain_id; tag_component.object_group_id = group_id; tag_component.object_group_ref_version = 0; diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.h index c5da41a23f1..0f900824f96 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.h @@ -140,6 +140,19 @@ public: PortableGroup::ObjectGroupNotFound, PortableGroup::MemberNotFound)); + /** + * TAO-specific extension. + * Return the ObjectGroup reference for the given ObjectGroupId. + */ + virtual PortableGroup::ObjectGroup_ptr get_object_group_ref_from_id ( + PortableGroup::ObjectGroupId group_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + CORBA::SystemException + , PortableGroup::ObjectGroupNotFound + )); + //@} /// TAO-specific member addition method. diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Utils.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Utils.cpp index 5eb48d6ff1f..4568529c3b7 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Utils.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Utils.cpp @@ -141,7 +141,7 @@ namespace TAO return 0; // the version info - cdr << tg.component_version; + cdr << tg.group_version; if (!cdr.good_bit ()) return 0; diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp index 27c6c125e76..3ef11448d74 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp @@ -571,8 +571,8 @@ TAO_UIPMC_Profile::update_cached_group_component (void) PortableGroup::TagGroupTaggedComponent group; // Encode the data structure. - group.component_version.major = TAO_DEF_MIOP_MAJOR; - group.component_version.minor = TAO_DEF_MIOP_MINOR; + group.group_version.major = TAO_DEF_MIOP_MAJOR; + group.group_version.minor = TAO_DEF_MIOP_MINOR; group.group_domain_id = CORBA::string_dup (this->group_domain_id_.c_str ()); group.object_group_id = this->group_id_; diff --git a/TAO/orbsvcs/tests/FaultTolerance/IOGR/FaultTolerance_IOGR.mpc b/TAO/orbsvcs/tests/FaultTolerance/IOGR/FaultTolerance_IOGR.mpc index 3ceeb4c709a..82107968f99 100644 --- a/TAO/orbsvcs/tests/FaultTolerance/IOGR/FaultTolerance_IOGR.mpc +++ b/TAO/orbsvcs/tests/FaultTolerance/IOGR/FaultTolerance_IOGR.mpc @@ -5,7 +5,7 @@ project(*server): server, orbsvcsexe, iormanip, ftorb { } } -project(*Manager): taoserver, orbsvcsexe, iormanip, ftorb { +project(*Manager): taoserver, orbsvcsexe, iormanip, ftorb, portablegroup, Messaging { exename = Manager Source_Files { testC.cpp diff --git a/TAO/orbsvcs/tests/FaultTolerance/IOGR/Manager.cpp b/TAO/orbsvcs/tests/FaultTolerance/IOGR/Manager.cpp index 92641a5a38b..fa094b3c515 100644 --- a/TAO/orbsvcs/tests/FaultTolerance/IOGR/Manager.cpp +++ b/TAO/orbsvcs/tests/FaultTolerance/IOGR/Manager.cpp @@ -194,12 +194,12 @@ Manager::set_properties (ACE_ENV_SINGLE_ARG_DECL) // Property values // Major and Minor revision numbers - ft_tag_component.version.major = (CORBA::Octet) 1; - ft_tag_component.version.minor = (CORBA::Octet) 0; + ft_tag_component.group_version.major = (CORBA::Octet) 1; + ft_tag_component.group_version.minor = (CORBA::Octet) 0; // Domain id const char *id = "iogr_testing"; - ft_tag_component.ft_domain_id = id; + ft_tag_component.group_domain_id = id; // Object group id ft_tag_component.object_group_id = diff --git a/TAO/orbsvcs/tests/FaultTolerance/IOGRManipulation/IOGRTest.cpp b/TAO/orbsvcs/tests/FaultTolerance/IOGRManipulation/IOGRTest.cpp index 9405b58f2eb..bd5d6525812 100644 --- a/TAO/orbsvcs/tests/FaultTolerance/IOGRManipulation/IOGRTest.cpp +++ b/TAO/orbsvcs/tests/FaultTolerance/IOGRManipulation/IOGRTest.cpp @@ -142,8 +142,8 @@ main (int argc, char *argv[]) // Property values // Major and Minor revision numbers - ft_tag_component.component_version.major = (CORBA::Octet) 1; - ft_tag_component.component_version.minor = (CORBA::Octet) 0; + ft_tag_component.group_version.major = (CORBA::Octet) 1; + ft_tag_component.group_version.minor = (CORBA::Octet) 0; // Domain id const char *id = "iogr_regression"; |