summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-06-18 02:13:17 +0000
committerjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-06-18 02:13:17 +0000
commit2ab7fc461bfe9ef9acf5fef718dcc40f60894cf2 (patch)
treeeb5e5f9670ffce0b3f697f65da2a9a010ce965c6
parent5449abbf3184d96d39414764514b4b0a18544aa9 (diff)
downloadATCD-2ab7fc461bfe9ef9acf5fef718dcc40f60894cf2.tar.gz
ChangeLogTag: Fri Jun 17 19:02:11 2005 J.T. Conklin <jtc@acorntoolworks.com>
-rw-r--r--TAO/ChangeLog32
-rw-r--r--TAO/orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.cpp23
-rw-r--r--TAO/orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.mpc2
-rw-r--r--TAO/orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.cpp25
-rw-r--r--TAO/orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.mpc2
-rw-r--r--TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp28
-rw-r--r--TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.mpc2
-rw-r--r--TAO/orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.cpp66
-rw-r--r--TAO/orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.mpc2
9 files changed, 127 insertions, 55 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 41bf8fb5231..5a8b303022c 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,33 @@
+Fri Jun 17 19:02:11 2005 J.T. Conklin <jtc@acorntoolworks.com>
+
+ * orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.cpp:
+
+ Moved code for the IOR file and pid file output. It had been
+ mistakenly added inside a commented out section of the code.
+
+ * orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.cpp:
+ * orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.cpp:
+ * orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp:
+ * orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.cpp:
+
+ From documentation available on-line, VisiBroker's and Orbix's
+ log service implementations support using corbaloc IORs and
+ resolve_initial_references() to obtain the log factory object
+ reference. Changed TAO's implementation to support the same by
+ registering the factory IORs in the IORTable:
+
+ * "BasicLogService" for the Basic_Logging_Service
+ * "EventLogService" for the Event_Logging_Service
+ * "NotifyLogService" for the Notify_Logging_Service
+ * "RTEventLogService" for the RTEvent_Logging_Service
+
+ * orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.mpc:
+ * orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.mpc:
+ * orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.mpc:
+ * orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.mpc:
+
+ Changed to inherit from iortable.
+
Fri Jun 17 23:45:00 UTC 2005 Gary Maxey <gary.maxey@hp.com>
* TAO_IDL/include/ast_decl.h
@@ -16,7 +46,7 @@ Fri Jun 17 23:45:00 UTC 2005 Gary Maxey <gary.maxey@hp.com>
* TAO_IDL/ast/ast_valuebox.cpp
Changes and additions to IDL compiler front-end for
valuebox support.
-
+
Fri Jun 17 15:40:51 2005 J.T. Conklin <jtc@acorntoolworks.com>
* orbsvcs/orbsvcs/orbsvcs.rc:
diff --git a/TAO/orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.cpp b/TAO/orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.cpp
index 3e226ce1bde..d8cb689b8dc 100644
--- a/TAO/orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.cpp
+++ b/TAO/orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.cpp
@@ -1,6 +1,7 @@
#include "Basic_Logging_Service.h"
#include "ace/Get_Opt.h"
#include "orbsvcs/Log/BasicLogFactory_i.h"
+#include "tao/IORTable/IORTable.h"
#include "ace/OS_main.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_unistd.h"
@@ -99,9 +100,6 @@ int
Basic_Logging_Service::startup (int argc, char *argv[]
ACE_ENV_ARG_DECL)
{
- ACE_DEBUG ((LM_DEBUG,
- "\nStarting up the Telecom Log Service...\n"));
-
// initalize the ORB.
this->init_ORB (argc, argv
ACE_ENV_ARG_PARAMETER);
@@ -119,12 +117,23 @@ Basic_Logging_Service::startup (int argc, char *argv[]
ACE_CHECK_RETURN (-1);
ACE_ASSERT (!CORBA::is_nil (obj.in ()));
- CORBA::String_var str =
+ CORBA::String_var ior =
this->orb_->object_to_string (obj.in () ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
- ACE_DEBUG ((LM_DEBUG,
- "The Basic Log Factory IOR is <%s>\n", str.in ()));
+ if (true)
+ {
+ CORBA::Object_var table_object =
+ this->orb_->resolve_initial_references ("IORTable");
+ ACE_CHECK_RETURN (-1);
+
+ IORTable::Table_var adapter =
+ IORTable::Table::_narrow (table_object.in ());
+ ACE_CHECK_RETURN (-1);
+
+ adapter->bind("BasicLogService", ior.in ())
+ ACE_CHECK_RETURN (-1);
+ }
if (ior_file_name_ != 0)
{
@@ -136,7 +145,7 @@ Basic_Logging_Service::startup (int argc, char *argv[]
-1);
}
- ACE_OS::fprintf (iorf, "%s\n", str.in ());
+ ACE_OS::fprintf (iorf, "%s\n", ior.in ());
ACE_OS::fclose (iorf);
}
diff --git a/TAO/orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.mpc b/TAO/orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.mpc
index ad5e1e76b66..019334abef8 100644
--- a/TAO/orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.mpc
+++ b/TAO/orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.mpc
@@ -1,5 +1,5 @@
// $Id$
-project: namingexe, core, dslogadmin_serv {
+project: namingexe, iortable, core, dslogadmin_serv {
exename = Basic_Logging_Service
includes += $(TAO_ROOT)/orbsvcs
}
diff --git a/TAO/orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.cpp b/TAO/orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.cpp
index 29b72ee1921..3a02a9b3ef9 100644
--- a/TAO/orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.cpp
+++ b/TAO/orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.cpp
@@ -1,7 +1,8 @@
-#include "ace/Get_Opt.h"
#include "Event_Logging_Service.h"
+#include "ace/Get_Opt.h"
#include "orbsvcs/Log/EventLogFactory_i.h"
#include "orbsvcs/CosEvent/CEC_Default_Factory.h"
+#include "tao/IORTable/IORTable.h"
#include "ace/OS_main.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_unistd.h"
@@ -100,9 +101,6 @@ int
Event_Logging_Service::startup (int argc, char *argv[]
ACE_ENV_ARG_DECL)
{
- ACE_DEBUG ((LM_DEBUG,
- "\nStarting up the Telecom EventLog Service...\n"));
-
// initalize the ORB.
this->init_ORB (argc, argv
ACE_ENV_ARG_PARAMETER);
@@ -120,12 +118,23 @@ Event_Logging_Service::startup (int argc, char *argv[]
ACE_CHECK_RETURN (-1);
ACE_ASSERT (!CORBA::is_nil (obj.in ()));
- CORBA::String_var str =
+ CORBA::String_var ior =
this->orb_->object_to_string (obj.in () ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
- ACE_DEBUG ((LM_DEBUG,
- "The Event Log Factory IOR is <%s>\n", str.in ()));
+ if (true)
+ {
+ CORBA::Object_var table_object =
+ this->orb_->resolve_initial_references ("IORTable");
+ ACE_CHECK_RETURN (-1);
+
+ IORTable::Table_var adapter =
+ IORTable::Table::_narrow (table_object.in ());
+ ACE_CHECK_RETURN (-1);
+
+ adapter->bind("EventLogService", ior.in ())
+ ACE_CHECK_RETURN (-1);
+ }
if (ior_file_name_ != 0)
{
@@ -137,7 +146,7 @@ Event_Logging_Service::startup (int argc, char *argv[]
-1);
}
- ACE_OS::fprintf (iorf, "%s\n", str.in ());
+ ACE_OS::fprintf (iorf, "%s\n", ior.in ());
ACE_OS::fclose (iorf);
}
diff --git a/TAO/orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.mpc b/TAO/orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.mpc
index 2fef8068b7e..db7ad182ab5 100644
--- a/TAO/orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.mpc
+++ b/TAO/orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.mpc
@@ -1,5 +1,5 @@
// $Id$
-project: namingexe, core, dseventlogadmin_serv {
+project: namingexe, iortable, core, dseventlogadmin_serv {
exename = Event_Logging_Service
includes += $(TAO_ROOT)/orbsvcs
}
diff --git a/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp b/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp
index f1a135279d1..de5aeeed8a4 100644
--- a/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp
+++ b/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp
@@ -1,9 +1,9 @@
#include "Notify_Logging_Service.h"
-
-#include "ace/Dynamic_Service.h"
-#include "ace/Arg_Shifter.h"
#include "ace/Get_Opt.h"
+#include "ace/Dynamic_Service.h"
+//#include "ace/Arg_Shifter.h"
#include "tao/debug.h"
+#include "tao/IORTable/IORTable.h"
#include "orbsvcs/Notify/Service.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_unistd.h"
@@ -128,9 +128,6 @@ Notify_Logging_Service::init (int argc, char *argv[]
this->notify_service_->init (this->orb_.in () ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
- ACE_DEBUG ((LM_DEBUG,
- "\nStarting up the Notification Logging Service...\n"));
-
// Activate the factory
this->notify_factory_ =
notify_service_->create (this->poa_.in ()
@@ -147,12 +144,23 @@ Notify_Logging_Service::init (int argc, char *argv[]
ACE_CHECK_RETURN (-1);
- CORBA::String_var str =
+ CORBA::String_var ior =
this->orb_->object_to_string (obj.in () ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
- ACE_DEBUG ((LM_DEBUG,
- "The Notify Log Factory IOR is <%s>\n", str.in()));
+ if (true)
+ {
+ CORBA::Object_var table_object =
+ this->orb_->resolve_initial_references ("IORTable");
+ ACE_CHECK_RETURN (-1);
+
+ IORTable::Table_var adapter =
+ IORTable::Table::_narrow (table_object.in ());
+ ACE_CHECK_RETURN (-1);
+
+ adapter->bind("NotifyLogService", ior.in ())
+ ACE_CHECK_RETURN (-1);
+ }
if (ior_file_name_ != 0)
{
@@ -165,7 +173,7 @@ Notify_Logging_Service::init (int argc, char *argv[]
-1);
}
- ACE_OS::fprintf (iorf, "%s\n", str.in ());
+ ACE_OS::fprintf (iorf, "%s\n", ior.in ());
ACE_OS::fclose (iorf);
}
diff --git a/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.mpc b/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.mpc
index 9a4b6227249..7bf222cc8e5 100644
--- a/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.mpc
+++ b/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.mpc
@@ -1,5 +1,5 @@
// $Id$
-project: namingexe, core, dsnotifylogadmin_serv {
+project: namingexe, iortable, core, dsnotifylogadmin_serv {
exename = Notify_Logging_Service
includes += $(TAO_ROOT)/orbsvcs
}
diff --git a/TAO/orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.cpp b/TAO/orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.cpp
index 6db4c6257a3..feb5bec2a3f 100644
--- a/TAO/orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.cpp
+++ b/TAO/orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.cpp
@@ -6,6 +6,7 @@
#include "orbsvcs/Sched/Config_Scheduler.h"
#include "orbsvcs/Event/EC_Default_Factory.h"
#include "orbsvcs/Event/EC_Event_Channel.h"
+#include "tao/IORTable/IORTable.h"
#include "ace/OS_main.h"
#include "ace/OS_NS_strings.h"
@@ -172,29 +173,6 @@ RTEvent_Logging_Service::run (int argc, char* argv[])
this->orb_->object_to_string (ec.in () ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (this->ior_file_name_ != 0)
- {
- FILE *output_file= ACE_OS::fopen (this->ior_file_name_, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- this->ior_file_name_),
- 1);
- ACE_OS::fprintf (output_file, "%s", str.in ());
- ACE_OS::fclose (output_file);
- }
-
- if (this->pid_file_name_ != 0)
- {
- FILE *pidf = fopen (this->pid_file_name_, "w");
- if (pidf != 0)
- {
- ACE_OS::fprintf (pidf,
- "%ld\n",
- static_cast<long> (ACE_OS::getpid ()));
- ACE_OS::fclose (pidf);
- }
- }
ACE_DEBUG ((LM_DEBUG,
"The EC IOR is <%s>\n", str.in ()));
@@ -225,13 +203,51 @@ RTEvent_Logging_Service::run (int argc, char* argv[])
ACE_TRY_CHECK;
CORBA::String_var
- str = orb_->object_to_string (factory_.in ()
+ ior = orb_->object_to_string (factory_.in ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG,
"RTEvent_Logging_Service: The RTEventLog Factory IOR is <%s>\n",
- str.in ()));
+ ior.in ()));
+
+ if (true)
+ {
+ CORBA::Object_var table_object =
+ this->orb_->resolve_initial_references ("IORTable");
+ ACE_CHECK_RETURN (-1);
+
+ IORTable::Table_var adapter =
+ IORTable::Table::_narrow (table_object.in ());
+ ACE_CHECK_RETURN (-1);
+
+ adapter->bind("RTEventLogService", ior.in ())
+ ACE_CHECK_RETURN (-1);
+ }
+
+ if (this->ior_file_name_ != 0)
+ {
+ FILE *output_file= ACE_OS::fopen (this->ior_file_name_, "w");
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: %s",
+ this->ior_file_name_),
+ 1);
+ ACE_OS::fprintf (output_file, "%s", ior.in ());
+ ACE_OS::fclose (output_file);
+ }
+
+ if (this->pid_file_name_ != 0)
+ {
+ FILE *pidf = fopen (this->pid_file_name_, "w");
+ if (pidf != 0)
+ {
+ ACE_OS::fprintf (pidf,
+ "%ld\n",
+ static_cast<long> (ACE_OS::getpid ()));
+ ACE_OS::fclose (pidf);
+ }
+ }
CosNaming::Name name (1);
name.length (1);
diff --git a/TAO/orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.mpc b/TAO/orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.mpc
index 01ed3948556..0eea7744c42 100644
--- a/TAO/orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.mpc
+++ b/TAO/orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.mpc
@@ -1,5 +1,5 @@
// $Id$
-project: namingexe, core, rtevent_serv, rteventlogadmin {
+project: namingexe, iortable, core, rtevent_serv, rteventlogadmin {
exename = RTEvent_Logging_Service
}