diff options
author | labancap <labancap@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2013-01-19 00:21:08 +0000 |
---|---|---|
committer | labancap <labancap@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2013-01-19 00:21:08 +0000 |
commit | 7f5fe5e3e6a6ca3801f600a883581510e9ed7dfb (patch) | |
tree | bfb63d6c6c1278b457424e63f0cc6364bf46b10d | |
parent | 35cbe90ab06e7e2856c146a42c0edf60fa92e485 (diff) | |
download | ATCD-7f5fe5e3e6a6ca3801f600a883581510e9ed7dfb.tar.gz |
Updated based on ACE Development Guidelines in preparation for merge
17 files changed, 200 insertions, 122 deletions
diff --git a/TAO/OCI_RE_ChangeLog b/TAO/OCI_RE_ChangeLog index 11fdbc00901..bff77da13bf 100644 --- a/TAO/OCI_RE_ChangeLog +++ b/TAO/OCI_RE_ChangeLog @@ -1,3 +1,26 @@ +Fri Jan 18 23:51:32 UTC 2013 Phillip LaBanca <labancap@ociweb.com> + + * orbsvcs/Naming_Service/FT_Naming_Main.cpp: + + * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Manager.h: + * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Manager.cpp: + * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.h: + * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.cpp: + * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.h: + * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.cpp: + * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_PG_Group_Factory.cpp: + * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_PG_Object_Group_Storable.h: + * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context.h: + * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context.cpp: + * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context_Factory.h: + * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context_Factory.cpp: + * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Round_Robin.cpp: + * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Storable_Naming_Context.h: + * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Storable_Naming_Context_Factory.h: + + Updated based on ACE Development Guidelines in preparation + for merge. + Fri Jan 18 22:43:55 UTC 2013 Kevin Stanley <stanleyk@ociweb.com> * orbsvcs/ImplRepo_Service/Config_Backing_Store.cpp: diff --git a/TAO/orbsvcs/Naming_Service/FT_Naming_Main.cpp b/TAO/orbsvcs/Naming_Service/FT_Naming_Main.cpp index 7d4ad0268d1..4086db3d9a4 100644 --- a/TAO/orbsvcs/Naming_Service/FT_Naming_Main.cpp +++ b/TAO/orbsvcs/Naming_Service/FT_Naming_Main.cpp @@ -28,7 +28,7 @@ Naming_Svc_Shutdown::operator() (int which_signal) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - "FT Name Service: shutting down on signal %d\n", + ACE_TEXT ("FT Name Service: shutting down on signal %d\n"), which_signal)); (void) this->ns_.shutdown (); } @@ -54,7 +54,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) } catch (const CORBA::Exception& ex) { - ex._tao_print_exception ("NamingService"); + ex._tao_print_exception (ACE_TEXT ("NamingService")); return 1; } diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Manager.cpp b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Manager.cpp index f7691026127..011f25b2190 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Manager.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Manager.cpp @@ -16,7 +16,7 @@ #include "orbsvcs/PortableGroup/PG_Property_Set.h" #include "orbsvcs/PortableGroup/PG_Object_Group.h" #include "orbsvcs/PortableGroup/PG_conf.h" -#include <orbsvcs/PortableGroup/PG_Utils.h> +#include "orbsvcs/PortableGroup/PG_Utils.h" #include "tao/debug.h" #include "tao/ORB_Constants.h" diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Manager.h b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Manager.h index be8cdda5433..97193b9d9fe 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Manager.h +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Manager.h @@ -26,10 +26,10 @@ #include "orbsvcs/FT_NamingManagerC.h" -#include <orbsvcs/PortableGroup/PG_FactoryRegistry.h> -#include <orbsvcs/PortableGroup/PG_Properties_Support.h> -#include <orbsvcs/Naming/FaultTolerant/FT_PG_Group_Factory.h> -#include <orbsvcs/Naming/FaultTolerant/FT_Round_Robin.h> +#include "orbsvcs/PortableGroup/PG_FactoryRegistry.h" +#include "orbsvcs/PortableGroup/PG_Properties_Support.h" +#include "orbsvcs/Naming/FaultTolerant/FT_PG_Group_Factory.h" +#include "orbsvcs/Naming/FaultTolerant/FT_Round_Robin.h" #include "ace/Task.h" #include "tao/Condition.h" diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.cpp b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.cpp index 017455ce0cc..bfa53b5234e 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.cpp @@ -45,8 +45,9 @@ TAO_FT_Naming_Replication_Manager::initialize (CORBA::ORB_ptr orb, } FT_Naming::ReplicaInfo* -TAO_FT_Naming_Replication_Manager::register_replica (::FT_Naming::ReplicationManager_ptr replica, - const ::FT_Naming::ReplicaInfo & replica_info) +TAO_FT_Naming_Replication_Manager::register_replica ( + ::FT_Naming::ReplicationManager_ptr replica, + const ::FT_Naming::ReplicaInfo & replica_info) { ACE_TRACE ("TAO_FT_Naming_Replication_Manager::register_replica"); @@ -64,8 +65,12 @@ TAO_FT_Naming_Replication_Manager::register_replica (::FT_Naming::ReplicationMan // Return my references to the peer FT_Naming::ReplicaInfo* my_info = new FT_Naming::ReplicaInfo; - my_info->root_context = CosNaming::NamingContext::_duplicate (this->naming_svr_->my_root_context ()); - my_info->naming_manager = FT_Naming::NamingManager::_duplicate (this->naming_svr_->my_naming_manager ()); + + my_info->root_context = CosNaming::NamingContext::_duplicate ( + this->naming_svr_->my_root_context ()); + + my_info->naming_manager = FT_Naming::NamingManager::_duplicate ( + this->naming_svr_->my_naming_manager ()); return my_info; } diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.h b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.h index 3ad8c4c1dde..8dc9521576e 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.h +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.h @@ -53,8 +53,9 @@ public: /// Implementation of the FT_Naming::ReplicationManager interface - virtual ::FT_Naming::ReplicaInfo * register_replica (::FT_Naming::ReplicationManager_ptr replica, - const ::FT_Naming::ReplicaInfo & replica_info); + virtual ::FT_Naming::ReplicaInfo * register_replica ( + ::FT_Naming::ReplicationManager_ptr replica, + const ::FT_Naming::ReplicaInfo & replica_info); /// This method implements the operation invoked by the peer replica when an /// object group is updated on the remote process. diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.cpp b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.cpp index 1141524c25b..09812400cef 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.cpp @@ -97,9 +97,11 @@ TAO_FT_Naming_Server::init_with_orb (int argc, TAO::Storable_Factory * object_group_storable_factory; ACE_NEW_RETURN (object_group_storable_factory, - TAO::Storable_FlatFileFactory (this->object_group_dir_), -1); + TAO::Storable_FlatFileFactory (this->object_group_dir_), + -1); - naming_manager_.set_object_group_storable_factory (object_group_storable_factory); + naming_manager_.set_object_group_storable_factory ( + object_group_storable_factory); } // Provide the naming manager reference for use in @@ -140,14 +142,17 @@ TAO_FT_Naming_Server::init_with_orb (int argc, } int -TAO_FT_Naming_Server::init_naming_manager_with_orb (int argc, ACE_TCHAR *argv [], CORBA::ORB_ptr orb) +TAO_FT_Naming_Server::init_naming_manager_with_orb (int argc, + ACE_TCHAR *argv [], + CORBA::ORB_ptr orb) { ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); int result = 0; - // Need to lock during startup to prevent access of partially initialized variables + // Need to lock during startup to prevent access of partially initialized + // variables ACE_GUARD_THROW_EX (ACE_SYNCH_RECURSIVE_MUTEX, ace_mon, this->lock_, @@ -157,7 +162,7 @@ TAO_FT_Naming_Server::init_naming_manager_with_orb (int argc, ACE_TCHAR *argv [] // Get the POA from the ORB. CORBA::Object_var poa_object = - orb->resolve_initial_references (ACE_TEXT ("RootPOA")); + orb->resolve_initial_references (ACE_TEXT_ALWAYS_CHAR ("RootPOA")); if (CORBA::is_nil (poa_object.in ())) { @@ -198,7 +203,7 @@ TAO_FT_Naming_Server::init_naming_manager_with_orb (int argc, ACE_TCHAR *argv [] // We use a different POA, otherwise the user would have to change // the object key each time it invokes the server. this->naming_manager_poa_ = this->root_poa_->create_POA ( - ACE_TEXT ("NamingManager"), + ACE_TEXT_ALWAYS_CHAR ("NamingManager"), poa_manager.in (), policies); // Warning! If create_POA fails, then the policies won't be @@ -217,12 +222,14 @@ TAO_FT_Naming_Server::init_naming_manager_with_orb (int argc, ACE_TCHAR *argv [] // Register with the POA. PortableServer::ObjectId_var id = - PortableServer::string_to_ObjectId (ACE_TEXT ("NamingManager")); + PortableServer::string_to_ObjectId (ACE_TEXT_ALWAYS_CHAR ("NamingManager")); this->naming_manager_poa_->activate_object_with_id (id.in (), &this->naming_manager_); - CORBA::Object_var nm_obj = this->naming_manager_poa_->id_to_reference (id.in ()); + CORBA::Object_var nm_obj = + this->naming_manager_poa_->id_to_reference (id.in ()); + this->my_naming_manager_ = FT_Naming::NamingManager::_narrow (nm_obj.in ()); this->naming_manager_ior_ = @@ -236,11 +243,12 @@ TAO_FT_Naming_Server::init_naming_manager_with_orb (int argc, ACE_TCHAR *argv [] != 0) { ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT("(%P|%t) ERROR: Unable to open %s ") + ACE_TEXT ("(%P|%t) ERROR: Unable to open %s ") ACE_TEXT ("for writing:(%u) %p\n"), this->naming_manager_ior_file_name_, ACE_ERRNO_GET, - ACE_TEXT("TAO_Naming_Server::init_naming_manager_with_orb")), + ACE_TEXT ("TAO_Naming_Server::") + ACE_TEXT ("init_naming_manager_with_orb")), -1); } } @@ -259,7 +267,7 @@ TAO_FT_Naming_Server::init_naming_manager_with_orb (int argc, ACE_TCHAR *argv [] // Make the Object Group Manager easily accessible using Interoperable // Naming Service IORs CORBA::Object_var table_object = - orb->resolve_initial_references ("IORTable"); + orb->resolve_initial_references (ACE_TEXT_ALWAYS_CHAR ("IORTable")); IORTable::Table_var adapter = IORTable::Table::_narrow (table_object.in ()); @@ -272,19 +280,22 @@ TAO_FT_Naming_Server::init_naming_manager_with_orb (int argc, ACE_TCHAR *argv [] else { CORBA::String_var ior = this->naming_manager_ior (); - adapter->bind ("NamingManager", ior.in ()); + adapter->bind (ACE_TEXT_ALWAYS_CHAR ("NamingManager"), ior.in ()); } return 0; } int -TAO_FT_Naming_Server::init_replication_manager_with_orb (int argc, ACE_TCHAR *argv [], CORBA::ORB_ptr orb) +TAO_FT_Naming_Server::init_replication_manager_with_orb (int argc, + ACE_TCHAR *argv [], + CORBA::ORB_ptr orb) { ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); - // Need to lock during startup to prevent access of partially initialized variables + // Need to lock during startup to prevent access of partially initialized + // variables ACE_GUARD_THROW_EX (ACE_SYNCH_RECURSIVE_MUTEX, ace_mon, this->lock_, @@ -301,7 +312,7 @@ TAO_FT_Naming_Server::init_replication_manager_with_orb (int argc, ACE_TCHAR *ar // Get the POA from the ORB. CORBA::Object_var poa_object = - orb->resolve_initial_references ("RootPOA"); + orb->resolve_initial_references (ACE_TEXT_ALWAYS_CHAR ("RootPOA")); if (CORBA::is_nil (poa_object.in ())) { @@ -335,7 +346,8 @@ TAO_FT_Naming_Server::init_replication_manager_with_orb (int argc, ACE_TCHAR *ar // We use a different POA, otherwise the user would have to change // the object key each time it invokes the server. - this->replication_manager_poa_ = this->root_poa_->create_POA (this->replica_id_, + this->replication_manager_poa_ = this->root_poa_->create_POA ( + ACE_TEXT_ALWAYS_CHAR (this->replica_id_ ), poa_manager.in (), policies); @@ -361,13 +373,16 @@ TAO_FT_Naming_Server::init_replication_manager_with_orb (int argc, ACE_TCHAR *ar // Register with the POA. PortableServer::ObjectId_var id = - PortableServer::string_to_ObjectId (this->replica_id_); + PortableServer::string_to_ObjectId ( + ACE_TEXT_ALWAYS_CHAR (this->replica_id_)); - this->replication_manager_poa_->activate_object_with_id (id.in (), - this->replication_manager_); + this->replication_manager_poa_->activate_object_with_id ( + id.in (), + this->replication_manager_); CORBA::Object_var repl_mgr_ref = this->replication_manager_poa_->id_to_reference (id.in ()); + this->replication_manager_ior_ = orb->object_to_string (repl_mgr_ref.in ()); @@ -494,8 +509,8 @@ TAO_FT_Naming_Server::init_replication_manager_with_orb (int argc, ACE_TCHAR *ar ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) - FT_Naming_Server ") ACE_TEXT ("reading primary ior file\n"))); - // Check for the primary IOR. We must have it to bootstrap the redundant naming - // pair. + // Check for the primary IOR. We must have it to bootstrap the redundant + // naming pair. if ((ACE_OS::access (primary_file_name.c_str (), R_OK) == 0) && (this->read_reference_from_file (primary_file_name.c_str (), primary_ref.out ()) == 0)) @@ -668,15 +683,15 @@ TAO_FT_Naming_Server::parse_args (int argc, case 0: // A long option was found { const char* long_option = get_opts.long_option (); - if (ACE_OS::strcmp (long_option, "backup") == 0) + if (ACE_OS::strcmp (long_option, ACE_TEXT ("backup")) == 0) { - this->replica_id_ = "Backup"; + this->replica_id_ = ACE_TEXT ("Backup"); this->server_role_ = TAO_FT_Naming_Server::BACKUP; role_defined = true; } - else if (ACE_OS::strcmp (long_option, "primary") == 0) + else if (ACE_OS::strcmp (long_option, ACE_TEXT ("primary")) == 0) { - this->replica_id_ = "Primary"; + this->replica_id_ = ACE_TEXT ("Primary"); this->server_role_ = TAO_FT_Naming_Server::PRIMARY; role_defined = true; } @@ -685,24 +700,27 @@ TAO_FT_Naming_Server::parse_args (int argc, case '?': default: ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("usage: %s \n") + ACE_TEXT ("usage: %s\n") ACE_TEXT ("--primary (not used with --backup)\n") ACE_TEXT ("--backup (not used with --primary)\n") - ACE_TEXT ("-d \n") - ACE_TEXT ("-c <multi-profile_name_service_ior_file> \n") - ACE_TEXT ("-o <name_svc_ior_output_file> \n") - ACE_TEXT ("-g <multi-profile_naming_mgr_ior_file> \n") - ACE_TEXT ("-h <naming_mgr_ior_output_file> \n") - ACE_TEXT ("-p <pid_file_name> \n") - ACE_TEXT ("-s <context_size> \n") - ACE_TEXT ("-b <base_address> \n") - ACE_TEXT ("-m <1=enable multicast, 0=disable multicast(default)> \n") - ACE_TEXT ("-n <num_threads> \n") - ACE_TEXT ("-f <persistence_file_name> \n") - ACE_TEXT ("-u <storable_persistence_directory (not used with -f)> \n") - ACE_TEXT ("-v <storable_object_group_persistence_directory> \n") - ACE_TEXT ("-r <redundant_persistence_directory> \n") - ACE_TEXT ("-z <relative round trip timeout> \n") + ACE_TEXT ("-d\n") + ACE_TEXT ("-c <multi-profile_name_service_ior_file>\n") + ACE_TEXT ("-o <name_svc_ior_output_file>\n") + ACE_TEXT ("-g <multi-profile_naming_mgr_ior_file>\n") + ACE_TEXT ("-h <naming_mgr_ior_output_file>\n") + ACE_TEXT ("-p <pid_file_name>\n") + ACE_TEXT ("-s <context_size>\n") + ACE_TEXT ("-b <base_address>\n") + ACE_TEXT ("-m <1=enable multicast,") + ACE_TEXT (" 0=disable multicast(default)>\n") + ACE_TEXT ("-n <num_threads>\n") + ACE_TEXT ("-f <persistence_file_name>\n") + ACE_TEXT ("-u <storable_persistence_directory") + ACE_TEXT (" (not used with -f)>\n") + ACE_TEXT ("-v <storable_object_group_persistence") + ACE_TEXT ("_directory>\n") + ACE_TEXT ("-r <redundant_persistence_directory>\n") + ACE_TEXT ("-z <relative round trip timeout>\n") ACE_TEXT ("\n"), argv [0]), -1); @@ -716,7 +734,7 @@ TAO_FT_Naming_Server::parse_args (int argc, -1); if (!role_defined) { // No role specified, so we will become a STANDALONE server - this->replica_id_ = "Standalone"; + this->replica_id_ = ACE_TEXT ("Standalone"); this->server_role_ = TAO_FT_Naming_Server::STANDALONE; // User has not provided a role, so we will not use redundancy option if (this->use_redundancy_ == 1) @@ -738,7 +756,8 @@ TAO_FT_Naming_Server::parse_args (int argc, (this->combined_naming_service_ior_file_name_ != 0)) ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("ERROR: Must export the multi-profile ") - ACE_TEXT ("IOR (using '-c' option) from the backup server.\n\n")), + ACE_TEXT ("IOR (using '-c' option) from the backup") + ACE_TEXT (" server.\n\n")), -1); // Only the backup should be requested to write the multi-profile IOR @@ -746,7 +765,8 @@ TAO_FT_Naming_Server::parse_args (int argc, (this->combined_naming_service_ior_file_name_ == 0)) ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("ERROR: Must export the multi-profile ") - ACE_TEXT ("IOR (using '-c' option) from the backup server.\n\n")), + ACE_TEXT ("IOR (using '-c' option) from the backup") + ACE_TEXT (" server.\n\n")), -1); } @@ -769,25 +789,28 @@ TAO_FT_Naming_Server::fini (void) this->replication_manager_poa_ = PortableServer::POA::_nil (); CORBA::Object_var table_object = - this->orb_->resolve_initial_references ("IORTable"); + this->orb_->resolve_initial_references ( + ACE_TEXT_ALWAYS_CHAR ("IORTable")); IORTable::Table_var adapter = IORTable::Table::_narrow (table_object.in ()); if (CORBA::is_nil (adapter.in ())) { ACE_ERROR ((LM_ERROR, - "(%P|%t) ERROR: Nil IORTable\n")); + ACE_TEXT ("(%P|%t) ERROR: Nil IORTable\n"))); } else { - adapter->unbind ("NameService"); - adapter->unbind ("NamingManager"); + adapter->unbind (ACE_TEXT_ALWAYS_CHAR ("NameService")); + adapter->unbind (ACE_TEXT_ALWAYS_CHAR ("NamingManager")); } #if !defined (CORBA_E_MICRO) CORBA::Object_var svc = - this->orb_->unregister_initial_reference ("NameService"); - this->orb_->unregister_initial_reference ("NamingManager"); + this->orb_->unregister_initial_reference ( + ACE_TEXT_ALWAYS_CHAR ("NameService")); + this->orb_->unregister_initial_reference ( + ACE_TEXT_ALWAYS_CHAR ("NamingManager")); #endif /* CORBA_E_MICRO */ } @@ -851,7 +874,7 @@ TAO_FT_Naming_Server::read_reference_from_file (const char* replica_file_name, } catch (const CORBA::Exception& ex) { - ex._tao_print_exception ("Invalid object reference in file: %s\n"); + ex._tao_print_exception (ACE_TEXT ("Invalid object reference in file: %s\n")); return -1; } @@ -883,7 +906,8 @@ TAO_FT_Naming_Server::export_ft_naming_references (void) if (this->combined_naming_service_ior_file_name_ != 0) { ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) ERROR: Unable to write combined NameService IOR file. ") + ACE_TEXT ("(%P|%t) ERROR: Unable to write combined") + ACE_TEXT (" NameService IOR file. ") ACE_TEXT ("Only supported by the backup naming service.\n") ACE_TEXT ("Provide the -c option to the --backup role.\n")), -1); @@ -897,7 +921,8 @@ TAO_FT_Naming_Server::export_ft_naming_references (void) if (this->combined_naming_service_ior_file_name_ == 0) { ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) ERROR: Unable to write combined NameService IOR file. ") + ACE_TEXT ("(%P|%t) ERROR: Unable to write combined") + ACE_TEXT (" NameService IOR file. ") ACE_TEXT ("No file name provided.\n")), -1); return 0; @@ -907,7 +932,8 @@ TAO_FT_Naming_Server::export_ft_naming_references (void) if (CORBA::is_nil (peer_root_cxt.in ())) { ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) ERROR: Unable to get the primary NameService object ref")), + ACE_TEXT ("(%P|%t) ERROR: Unable to get the primary") + ACE_TEXT (" NameService object ref")), -1); } @@ -915,7 +941,8 @@ TAO_FT_Naming_Server::export_ft_naming_references (void) if (CORBA::is_nil (my_root_cxt.in ())) { ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) ERROR: Unable to get this services NameService object ref")), + ACE_TEXT ("(%P|%t) ERROR: Unable to get this") + ACE_TEXT (" services NameService object ref")), -1); } @@ -951,8 +978,9 @@ TAO_FT_Naming_Server::export_ft_naming_references (void) { if (TAO_debug_level > 3) ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P|%t) - FT_Naming_Server:No NamingManager IOR file name provided ") - ACE_TEXT ("with -g option. Not writing IOR.\n"))); + ACE_TEXT ("(%P|%t) - FT_Naming_Server:No NamingManager") + ACE_TEXT (" IOR file name provided") + ACE_TEXT (" with -g option. Not writing IOR.\n"))); } else {// A file name was provided to store the naming manager IOR @@ -1034,9 +1062,9 @@ TAO_FT_Naming_Server::update_object_group ( else { ACE_ERROR ((LM_ERROR, - "(%P|%t) ERROR: Attempting to update object group " - "as stale with obect group persistence not " - "enabled.")); + ACE_TEXT ("(%P|%t) ERROR: Attempting to update object group ") + ACE_TEXT ("as stale with obect group persistence not ") + ACE_TEXT ("enabled."))); return -1; } @@ -1077,7 +1105,8 @@ TAO_FT_Naming_Server::update_naming_context ( if (changed_context_servant == 0) { // Another type of class was used as the servant. Should not happen. ACE_ERROR ((LM_ERROR, - "(%P|%t) ERROR: Invalid servant type registered with oid: %s", + ACE_TEXT ("(%P|%t) ERROR: Invalid servant type registered") + ACE_TEXT (" with oid: %s"), context_info.context_name.in ())); return -1; } diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.h b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.h index 7e36136aa51..f9ba665d386 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.h +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.h @@ -62,10 +62,14 @@ public: FT_Naming::NamingManager_ptr peer_naming_manager (void); /// Initialize the naming manager with the ORB. - int init_naming_manager_with_orb (int argc, ACE_TCHAR *argv [], CORBA::ORB_ptr orb); + int init_naming_manager_with_orb (int argc, + ACE_TCHAR *argv [], + CORBA::ORB_ptr orb); /// Initialize the replication manager with the ORB. - int init_replication_manager_with_orb (int argc, ACE_TCHAR *argv [], CORBA::ORB_ptr orb); + int init_replication_manager_with_orb (int argc, + ACE_TCHAR *argv [], + CORBA::ORB_ptr orb); /// Overridden parse operation. Only allows options supported by the FT_Naming_Server /// and adds options for the object group manager diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_PG_Group_Factory.cpp b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_PG_Group_Factory.cpp index d498b658075..07e2e52a3f8 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_PG_Group_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_PG_Group_Factory.cpp @@ -26,7 +26,8 @@ TAO::FT_PG_Group_Factory::~FT_PG_Group_Factory() } void -TAO::FT_PG_Group_Factory::set_object_group_stale (const FT_Naming::ObjectGroupUpdate & group_info) +TAO::FT_PG_Group_Factory::set_object_group_stale ( + const FT_Naming::ObjectGroupUpdate & group_info) { if (this->use_persistence_) { @@ -38,16 +39,16 @@ TAO::FT_PG_Group_Factory::set_object_group_stale (const FT_Naming::ObjectGroupUp { if (TAO_debug_level > 3) { - ACE_CString change_type_str ("created"); + ACE_CString change_type_str (ACE_TEXT ("created")); if (group_info.change_type == FT_Naming::DELETED) - change_type_str = "deleted"; - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("%T %n (%P|%t) - ") - ACE_TEXT ("Setting list store as stale "), - ACE_TEXT ("because of group with ID %lld "), - ACE_TEXT ("was %s"), - group_id, change_type_str.c_str () - )); + change_type_str = ACE_TEXT ("deleted"); + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("%T %n (%P|%t) - ") + ACE_TEXT ("Setting list store as stale "), + ACE_TEXT ("because of group with ID %lld "), + ACE_TEXT ("was %s"), + group_id, change_type_str.c_str () + )); } this->list_store_->stale(true); } @@ -57,12 +58,15 @@ TAO::FT_PG_Group_Factory::set_object_group_stale (const FT_Naming::ObjectGroupUp { throw PortableGroup::ObjectNotFound (); } - FT_PG_Object_Group_Storable * og = dynamic_cast<FT_PG_Object_Group_Storable *> (group); + FT_PG_Object_Group_Storable * og = + dynamic_cast<FT_PG_Object_Group_Storable *> (group); + if (TAO_debug_level > 3) { ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%T %n (%P|%t) - ") - ACE_TEXT ("Setting object group with ID %lld as stale"), group_id + ACE_TEXT ("Setting object group with ID %lld as stale"), + group_id )); } og->stale (true); diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_PG_Object_Group_Storable.h b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_PG_Object_Group_Storable.h index 95b97ef4c7a..374400188f0 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_PG_Object_Group_Storable.h +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_PG_Object_Group_Storable.h @@ -89,9 +89,10 @@ namespace TAO virtual bool is_obsolete (time_t stored_time); - /// Provide support for modifying the object group type_id when first member is - /// added to the group. - virtual PortableGroup::ObjectGroup_ptr add_member_to_iogr(CORBA::Object_ptr member); + /// Provide support for modifying the object group type_id when first + /// member is added to the group. + virtual PortableGroup::ObjectGroup_ptr add_member_to_iogr( + CORBA::Object_ptr member); private: @@ -99,7 +100,8 @@ namespace TAO // Forbidden methods FT_PG_Object_Group_Storable (); FT_PG_Object_Group_Storable (const FT_PG_Object_Group_Storable & rhs); - FT_PG_Object_Group_Storable & operator = (const FT_PG_Object_Group_Storable & rhs); + FT_PG_Object_Group_Storable & operator = ( + const FT_PG_Object_Group_Storable & rhs); /// Replication persistence support diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context.cpp b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context.cpp index 22f8c961f46..ab1a1ae2737 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context.cpp @@ -16,11 +16,12 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL // Initialize the static naming manager TAO_FT_Naming_Manager *TAO_FT_Persistent_Naming_Context::naming_manager_impl_ = 0; -TAO_FT_Persistent_Naming_Context::TAO_FT_Persistent_Naming_Context (PortableServer::POA_ptr poa, - const char *poa_id, - TAO_Persistent_Context_Index *context_index, - HASH_MAP *map, - ACE_UINT32 *counter) +TAO_FT_Persistent_Naming_Context::TAO_FT_Persistent_Naming_Context ( + PortableServer::POA_ptr poa, + const char *poa_id, + TAO_Persistent_Context_Index *context_index, + HASH_MAP *map, + ACE_UINT32 *counter) : TAO_Persistent_Naming_Context (poa, poa_id, context_index, @@ -49,8 +50,9 @@ TAO_FT_Persistent_Naming_Context::is_object_group (CORBA::Object_ptr obj) const CORBA::Object_ptr TAO_FT_Persistent_Naming_Context::resolve (const CosNaming::Name& n) { - // Invoke the base class resolve operation to acquire the object at the specified - // compound name. Any exceptions should flow back to client. + // Invoke the base class resolve operation to acquire the object at the + // specified compound name. + // Any exceptions should flow back to client. CORBA::Object_var resolved_ref = TAO_Persistent_Naming_Context::resolve(n); @@ -62,7 +64,8 @@ TAO_FT_Persistent_Naming_Context::resolve (const CosNaming::Name& n) try { // Make sure object is an object group. - // We will return the object reference all the way back out to the client if not + // We will return the object reference all the way back out to the client + // if not if (!this->is_object_group (resolved_ref.in ())) return resolved_ref._retn (); diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context.h b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context.h index 15dc7adc9c1..1303c78daae 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context.h +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context.h @@ -30,7 +30,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL * CosNaming::NamingContext implementation. * */ -class TAO_FtNaming_Export TAO_FT_Persistent_Naming_Context : public TAO_Persistent_Naming_Context +class TAO_FtNaming_Export TAO_FT_Persistent_Naming_Context : + public TAO_Persistent_Naming_Context { public: /// Underlying data structure - typedef for ease of use. diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context_Factory.cpp b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context_Factory.cpp index 10f397107ec..5ba6a1d38c4 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context_Factory.cpp @@ -21,11 +21,12 @@ TAO_FT_Persistent_Naming_Context_Factory::~TAO_FT_Persistent_Naming_Context_Fact /// Factory method for creating an implementation object for naming contexts TAO_Persistent_Naming_Context* -TAO_FT_Persistent_Naming_Context_Factory::create_naming_context_impl (PortableServer::POA_ptr poa, - const char *poa_id, - TAO_Persistent_Context_Index *context_index, - HASH_MAP * map, - ACE_UINT32 *counter) +TAO_FT_Persistent_Naming_Context_Factory::create_naming_context_impl ( + PortableServer::POA_ptr poa, + const char *poa_id, + TAO_Persistent_Context_Index *context_index, + HASH_MAP * map, + ACE_UINT32 *counter) { // Construct the naming context, forwarding the map and counter even if they // are defaulted diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context_Factory.h b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context_Factory.h index eb9ad4139cf..bebf02fdbc7 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context_Factory.h +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context_Factory.h @@ -42,11 +42,12 @@ public: virtual ~TAO_FT_Persistent_Naming_Context_Factory (void); /// Factory method for creating an implementation object for naming contexts - virtual TAO_Persistent_Naming_Context* create_naming_context_impl (PortableServer::POA_ptr poa, - const char *poa_id, - TAO_Persistent_Context_Index *context_index, - HASH_MAP * map = 0, - ACE_UINT32 *counter = 0); + virtual TAO_Persistent_Naming_Context* create_naming_context_impl ( + PortableServer::POA_ptr poa, + const char *poa_id, + TAO_Persistent_Context_Index *context_index, + HASH_MAP * map = 0, + ACE_UINT32 *counter = 0); }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Round_Robin.cpp b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Round_Robin.cpp index f8a7de15cec..132d2a25d3a 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Round_Robin.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Round_Robin.cpp @@ -41,7 +41,7 @@ TAO_FT_Round_Robin::next_location ( const CORBA::ULong len = locations->length (); - // No locations exist, so we cant get the next one + // No locations exist, so we can't get the next one if (len == 0) return false; diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Storable_Naming_Context.h b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Storable_Naming_Context.h index 5aaf88f7701..96b0f4d0317 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Storable_Naming_Context.h +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Storable_Naming_Context.h @@ -31,7 +31,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL * CosNaming::NamingContext implementation. * */ -class TAO_FtNaming_Export TAO_FT_Storable_Naming_Context : public TAO_Storable_Naming_Context +class TAO_FtNaming_Export TAO_FT_Storable_Naming_Context : + public TAO_Storable_Naming_Context { public: // = Initialization and termination methods. diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Storable_Naming_Context_Factory.h b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Storable_Naming_Context_Factory.h index c705c434f4c..b714d052914 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Storable_Naming_Context_Factory.h +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Storable_Naming_Context_Factory.h @@ -34,26 +34,29 @@ class TAO_FtNaming_Export TAO_FT_Storable_Naming_Context_Factory : { public: - /// Data structure used by TAO_Persistent_Context_Index - typedef for ease of use. + /// Data structure used by TAO_Persistent_Context_Index - + /// typedef for ease of use. typedef TAO_Storable_Naming_Context_Factory::HASH_MAP HASH_MAP; // = Initialization and termination methods. /// Constructor. - TAO_FT_Storable_Naming_Context_Factory (size_t hash_table_size = ACE_DEFAULT_MAP_SIZE); + TAO_FT_Storable_Naming_Context_Factory ( + size_t hash_table_size = ACE_DEFAULT_MAP_SIZE); /// Destructor. Does not deallocate the hash map: if an instance of /// this class goes out of scope, its hash_map remains in persistent storage. virtual ~TAO_FT_Storable_Naming_Context_Factory (void); /// Factory method for creating an implementation object for naming contexts. - /// If an existing naming context implementation is being rebuilt, the map and counter parameters - /// should be provided to the underlying HASH_MAP implementation - virtual TAO_Storable_Naming_Context* create_naming_context_impl (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - const char *poa_id, - TAO::Storable_Factory *factory); - + /// If an existing naming context implementation is being rebuilt, + /// the map and counter parameters should be provided to the underlying + /// HASH_MAP implementation + virtual TAO_Storable_Naming_Context* create_naming_context_impl ( + CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + const char *poa_id, + TAO::Storable_Factory *factory); }; |