summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Totten <tottens@users.noreply.github.com>2003-10-22 03:06:25 +0000
committerSteve Totten <tottens@users.noreply.github.com>2003-10-22 03:06:25 +0000
commitd419434398762b45b1753dd67e0e2789dcb9b3f6 (patch)
tree0c17fb79c48af4863bbc5649f3d04955a9dfe4cb
parent4f4f61f5e7e7b6a231741956a9aa651285e088d8 (diff)
downloadATCD-d419434398762b45b1753dd67e0e2789dcb9b3f6.tar.gz
ChangeLogTag: Tue Oct 21 21:58:31 2003 Steve Totten <totten_s@ociweb.com>
-rw-r--r--TAO/ChangeLog12
-rw-r--r--TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.cpp29
2 files changed, 40 insertions, 1 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 771ecf9cfb7..5228df85a9f 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,15 @@
+Tue Oct 21 21:58:31 2003 Steve Totten <totten_s@ociweb.com>
+
+ * orbsvcs/FT_ReplicationManager/FT_ReplicationManager.cpp:
+ The ReplicationManager now registers its IOR with the
+ IORTable with the key-string "ReplicationManager" so clients
+ can access it using resolve_initial_references() and
+ something like:
+
+ -ORBInitRef ReplicationManager=corbaloc::host:port/ReplicationManager
+
+ These changes were made in the oci_haft branch.
+
Tue Oct 21 09:49:51 2003 Dale Wilson <wilson_d@ociweb.com>
* orbsvcs/FT_ReplicationManager/FT_ReplicationManager.h:
diff --git a/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.cpp b/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.cpp
index 655e60f1e39..fa2d819be3a 100644
--- a/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.cpp
+++ b/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.cpp
@@ -17,6 +17,7 @@
#include "ace/Get_Opt.h"
#include "tao/Messaging/Messaging.h"
+#include "tao/IORTable/IORTable.h"
#include "tao/debug.h"
#include "orbsvcs/PortableGroup/PG_Properties_Decoder.h"
#include "orbsvcs/PortableGroup/PG_Properties_Encoder.h"
@@ -203,6 +204,32 @@ int TAO::FT_ReplicationManager::init (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL)
poa_mgr->activate (ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
+ // Register our IOR in the IORTable with the key-string
+ // "ReplicationManager".
+ CORBA::Object_var ior_table_obj =
+ this->orb_->resolve_initial_references (
+ TAO_OBJID_IORTABLE ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
+ IORTable::Table_var ior_table =
+ IORTable::Table::_narrow (ior_table_obj.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+ if (CORBA::is_nil (ior_table.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("%T %n (%P|%t) Unable to resolve the IORTable.\n")),
+ -1);
+ }
+ else
+ {
+ CORBA::String_var rm_ior_str = this->orb_->object_to_string (
+ this->replication_manager_ref_.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+ ior_table->bind ("ReplicationManager", rm_ior_str.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+ }
+
// Publish our IOR, either to a file or the Naming Service.
if (this->ior_output_file_ != 0)
{
@@ -399,7 +426,7 @@ TAO::FT_ReplicationManager::register_fault_notifier_i (
if (result != 0)
{
- ACE_ERROR((LM_ERROR,
+ ACE_ERROR ((LM_ERROR,
ACE_TEXT (
"TAO::FT_ReplicationManager::register_fault_notifier_i: "
"Could not re-initialize FT_FaultConsumer.\n")