summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/ChangeLog33
-rw-r--r--TAO/orbsvcs/orbsvcs/DsEventLogAdmin.mpc16
-rw-r--r--TAO/orbsvcs/orbsvcs/DsLogAdmin.mpc1
-rw-r--r--TAO/orbsvcs/orbsvcs/DsNotifyLogAdmin.mpc16
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.cpp38
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.h7
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.cpp48
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.h7
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/LogMgr_i.cpp36
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/LogMgr_i.h4
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.cpp48
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.h7
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.cpp48
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.h7
14 files changed, 89 insertions, 227 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 3924f1caac1..02c8e857022 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,8 +1,39 @@
+Mon Aug 15 16:41:57 2005 J.T. Conklin <jtc@acorntoolworks.com>
+
+ * orbsvcs/orbsvcs/DsEventLogAdmin.mpc:
+
+ Add eventlog_serv_export.h to Header_Files section.
+
+ * orbsvcs/orbsvcs/DsLogAdmin.mpc:
+
+ Add log_serv_export.h to Header_Files section.
+
+ * orbsvcs/orbsvcs/DsNotifyLogAdmin.mpc:
+
+ Add notifylog_serv_export.h to Header_Files section.
+
+ * orbsvcs/orbsvcs/Log/BasicLogFactory_i.cpp:
+ * orbsvcs/orbsvcs/Log/BasicLogFactory_i.h:
+ * orbsvcs/orbsvcs/Log/EventLogFactory_i.cpp:
+ * orbsvcs/orbsvcs/Log/EventLogFactory_i.h:
+ * orbsvcs/orbsvcs/Log/LogMgr_i.cpp:
+ * orbsvcs/orbsvcs/Log/LogMgr_i.h:
+ * orbsvcs/orbsvcs/Log/NotifyLogFactory_i.cpp:
+ * orbsvcs/orbsvcs/Log/NotifyLogFactory_i.h:
+ * orbsvcs/orbsvcs/Log/RTEventLogFactory_i.cpp:
+ * orbsvcs/orbsvcs/Log/RTEventLogFactory_i.h:
+
+ Combine identical create_log_objectid() implementations from the
+ derived factory classes into a single one in the base class.
+
+ Refactor separate create_log_object() implementations to
+ a single template method in the base class.
+
Mon Aug 15 15:13:10 2005 J.T. Conklin <jtc@acorntoolworks.com>
* orbsvcs/tests/Concurrency/Makefile.am:
- Remove bogus source file from list.
+ Remove tmplinst.cpp from list of files.
* orbsvcs/orbsvcs/Log/BasicLogFactory_i.cpp:
* orbsvcs/orbsvcs/Log/BasicLogFactory_i.h:
diff --git a/TAO/orbsvcs/orbsvcs/DsEventLogAdmin.mpc b/TAO/orbsvcs/orbsvcs/DsEventLogAdmin.mpc
index 8dfaecb576b..246397fd193 100644
--- a/TAO/orbsvcs/orbsvcs/DsEventLogAdmin.mpc
+++ b/TAO/orbsvcs/orbsvcs/DsEventLogAdmin.mpc
@@ -86,13 +86,15 @@ project(DsEventLogAdmin_Serv) : orbsvcslib, core, dseventlogadmin_skel, dslogadm
IDL_Files {
}
- Source_Files(ORBSVCS_COMPONENTS) {
- DsEventLogAdmin {
- Log/EventLogConsumer.cpp
- Log/EventLogFactory_i.cpp
- Log/EventLogNotification.cpp
- Log/EventLog_i.cpp
- }
+ Source_Files {
+ Log/EventLogConsumer.cpp
+ Log/EventLogFactory_i.cpp
+ Log/EventLogNotification.cpp
+ Log/EventLog_i.cpp
+ }
+
+ Header_Files {
+ Log/eventlog_serv_export.h
}
Inline_Files {
diff --git a/TAO/orbsvcs/orbsvcs/DsLogAdmin.mpc b/TAO/orbsvcs/orbsvcs/DsLogAdmin.mpc
index a343d2cccc5..b332ed933a8 100644
--- a/TAO/orbsvcs/orbsvcs/DsLogAdmin.mpc
+++ b/TAO/orbsvcs/orbsvcs/DsLogAdmin.mpc
@@ -121,6 +121,7 @@ project(DsLogAdmin_Serv) : orbsvcslib, core, dslogadmin_skel, dynamicany, etcl,
Header_Files {
Log/Log_Persistence_Strategy.h
+ Log/log_serv_export.h
}
Inline_Files {
diff --git a/TAO/orbsvcs/orbsvcs/DsNotifyLogAdmin.mpc b/TAO/orbsvcs/orbsvcs/DsNotifyLogAdmin.mpc
index b0817ae0f30..ddfb9af7cc6 100644
--- a/TAO/orbsvcs/orbsvcs/DsNotifyLogAdmin.mpc
+++ b/TAO/orbsvcs/orbsvcs/DsNotifyLogAdmin.mpc
@@ -88,13 +88,15 @@ project(DsNotifyLogAdmin_Serv) : orbsvcslib, core, dsnotifylogadmin_skel, dsloga
IDL_Files {
}
- Source_Files(ORBSVCS_COMPONENTS) {
- DsNotifyLogAdmin {
- Log/NotifyLogConsumer.cpp
- Log/NotifyLogFactory_i.cpp
- Log/NotifyLogNotification.cpp
- Log/NotifyLog_i.cpp
- }
+ Source_Files {
+ Log/NotifyLogConsumer.cpp
+ Log/NotifyLogFactory_i.cpp
+ Log/NotifyLogNotification.cpp
+ Log/NotifyLog_i.cpp
+ }
+
+ Header_Files {
+ Log/notifylog_serv_export.h
}
Inline_Files {
diff --git a/TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.cpp b/TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.cpp
index bbbbfd67b93..6c4fd7234d8 100644
--- a/TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.cpp
+++ b/TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.cpp
@@ -103,18 +103,6 @@ TAO_BasicLogFactory_i::create_with_id (DsLogAdmin::LogId id,
return basic_log._retn ();
}
-PortableServer::ObjectId*
-TAO_BasicLogFactory_i::create_objectid (DsLogAdmin::LogId id)
-{
- char buf[32];
- ACE_OS::sprintf(buf, "%lu", static_cast<unsigned long>(id));
-
- PortableServer::ObjectId_var oid =
- PortableServer::string_to_ObjectId(buf);
-
- return oid._retn ();
-}
-
DsLogAdmin::Log_ptr
TAO_BasicLogFactory_i::create_log_reference (DsLogAdmin::LogId id
ACE_ENV_ARG_DECL)
@@ -138,32 +126,6 @@ TAO_BasicLogFactory_i::create_log_reference (DsLogAdmin::LogId id
return basic_log._retn();
}
-
-DsLogAdmin::Log_ptr
-TAO_BasicLogFactory_i::create_log_object (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
-{
- PortableServer::ServantBase* servant;
-
- servant = create_log_servant (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::BasicLog::_nil ());
-
- PortableServer::ServantBase_var safe_servant = servant;
- // Transfer ownership to the POA.
-
- // Obtain ObjectId
- PortableServer::ObjectId_var oid = this->create_objectid (id);
-
- // Register with the poa
- this->log_poa_->activate_object_with_id (oid.in (),
- servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::BasicLog::_nil ());
-
- return create_log_reference (id ACE_ENV_ARG_PARAMETER);
-}
-
-
PortableServer::ServantBase*
TAO_BasicLogFactory_i::create_log_servant (DsLogAdmin::LogId id
ACE_ENV_ARG_DECL)
diff --git a/TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.h b/TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.h
index 6234c6bbc41..5ba0aaf822d 100644
--- a/TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.h
+++ b/TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.h
@@ -86,13 +86,6 @@ public:
));
protected:
- virtual PortableServer::ObjectId*
- create_objectid (DsLogAdmin::LogId id);
-
- virtual DsLogAdmin::Log_ptr
- create_log_object (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL);
-
virtual DsLogAdmin::Log_ptr
create_log_reference (DsLogAdmin::LogId id
ACE_ENV_ARG_DECL);
diff --git a/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.cpp b/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.cpp
index 95e58bd9fc1..8b0037ce085 100644
--- a/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.cpp
+++ b/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.cpp
@@ -187,18 +187,6 @@ TAO_EventLogFactory_i::create_with_id (
return event_log._retn ();
}
-PortableServer::ObjectId*
-TAO_EventLogFactory_i::create_objectid (DsLogAdmin::LogId id)
-{
- char buf[32];
- ACE_OS::sprintf(buf, "%lu", static_cast<unsigned long>(id));
-
- PortableServer::ObjectId_var oid =
- PortableServer::string_to_ObjectId(buf);
-
- return oid._retn ();
-}
-
DsLogAdmin::Log_ptr
TAO_EventLogFactory_i::create_log_reference (DsLogAdmin::LogId id
ACE_ENV_ARG_DECL)
@@ -222,42 +210,6 @@ TAO_EventLogFactory_i::create_log_reference (DsLogAdmin::LogId id
return event_log._retn();
}
-DsLogAdmin::Log_ptr
-TAO_EventLogFactory_i::create_log_object (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
-{
- PortableServer::ServantBase* servant;
-
- servant = create_log_servant (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLog::_nil ());
-
- PortableServer::ServantBase_var safe_servant = servant;
- //Transfer ownership to the POA.
-
- // Obtain ObjectId
- PortableServer::ObjectId_var oid =
- this->create_objectid (id);
-
- // Register with the poa
- this->log_poa_->activate_object_with_id (oid.in (),
- servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLog::_nil ());
-
- CORBA::Object_var obj =
- this->log_poa_->id_to_reference (oid.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLog::_nil ());
-
- // Narrow
- DsEventLogAdmin::EventLog_var event_log =
- DsEventLogAdmin::EventLog::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLog::_nil ());
-
- return event_log._retn ();
-}
-
PortableServer::ServantBase*
TAO_EventLogFactory_i::create_log_servant (DsLogAdmin::LogId id
ACE_ENV_ARG_DECL)
diff --git a/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.h b/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.h
index e5e75a0d459..df67636ba3c 100644
--- a/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.h
+++ b/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.h
@@ -118,13 +118,6 @@ public:
));
protected:
- virtual PortableServer::ObjectId*
- create_objectid (DsLogAdmin::LogId id);
-
- virtual DsLogAdmin::Log_ptr
- create_log_object (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL);
-
virtual DsLogAdmin::Log_ptr
create_log_reference (DsLogAdmin::LogId id
ACE_ENV_ARG_DECL);
diff --git a/TAO/orbsvcs/orbsvcs/Log/LogMgr_i.cpp b/TAO/orbsvcs/orbsvcs/Log/LogMgr_i.cpp
index a675bfcb94e..01b8c54fa6b 100644
--- a/TAO/orbsvcs/orbsvcs/Log/LogMgr_i.cpp
+++ b/TAO/orbsvcs/orbsvcs/Log/LogMgr_i.cpp
@@ -3,6 +3,7 @@
#include "tao/Utils/PolicyList_Destroyer.h"
#include "orbsvcs/Log/Hash_Persistence_Strategy.h"
#include "orbsvcs/Log/LogStore.h"
+#include "ace/OS_NS_stdio.h"
ACE_RCSID (Log,
LogMgr_i,
@@ -93,6 +94,41 @@ TAO_LogMgr_i::init (CORBA::ORB_ptr orb,
logstore_ = strategy_->create_log_store (orb, this);
}
+PortableServer::ObjectId*
+TAO_LogMgr_i::create_objectid (DsLogAdmin::LogId id)
+{
+ char buf[32];
+ ACE_OS::sprintf(buf, "%lu", static_cast<unsigned long>(id));
+
+ PortableServer::ObjectId_var oid =
+ PortableServer::string_to_ObjectId(buf);
+
+ return oid._retn ();
+}
+
+DsLogAdmin::Log_ptr
+TAO_LogMgr_i::create_log_object (DsLogAdmin::LogId id
+ ACE_ENV_ARG_DECL)
+{
+ PortableServer::ServantBase* servant;
+
+ servant = create_log_servant (id ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
+
+ PortableServer::ServantBase_var safe_servant = servant;
+ // Transfer ownership to the POA.
+
+ // Obtain ObjectId
+ PortableServer::ObjectId_var oid = this->create_objectid (id);
+
+ // Register with the poa
+ this->log_poa_->activate_object_with_id (oid.in (),
+ servant
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
+
+ return create_log_reference (id ACE_ENV_ARG_PARAMETER);
+}
DsLogAdmin::LogList*
TAO_LogMgr_i::list_logs (ACE_ENV_SINGLE_ARG_DECL)
diff --git a/TAO/orbsvcs/orbsvcs/Log/LogMgr_i.h b/TAO/orbsvcs/orbsvcs/Log/LogMgr_i.h
index d69c269b354..4c5e15b0446 100644
--- a/TAO/orbsvcs/orbsvcs/Log/LogMgr_i.h
+++ b/TAO/orbsvcs/orbsvcs/Log/LogMgr_i.h
@@ -87,7 +87,7 @@ public:
/// @return object id
///
virtual PortableServer::ObjectId*
- create_objectid (DsLogAdmin::LogId id) = 0;
+ create_objectid (DsLogAdmin::LogId id);
/// @brief Create log reference
///
@@ -111,7 +111,7 @@ public:
///
virtual DsLogAdmin::Log_ptr
create_log_object (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL) = 0;
+ ACE_ENV_ARG_DECL);
/// @brief Create log servant
///
diff --git a/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.cpp b/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.cpp
index 0751f34f5a4..9b213849427 100644
--- a/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.cpp
+++ b/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.cpp
@@ -174,18 +174,6 @@ TAO_NotifyLogFactory_i::create_with_id (
return DsNotifyLogAdmin::NotifyLog::_nil ();
}
-PortableServer::ObjectId*
-TAO_NotifyLogFactory_i::create_objectid (DsLogAdmin::LogId id)
-{
- char buf[32];
- ACE_OS::sprintf(buf, "%lu", static_cast<unsigned long>(id));
-
- PortableServer::ObjectId_var oid =
- PortableServer::string_to_ObjectId(buf);
-
- return oid._retn ();
-}
-
DsLogAdmin::Log_ptr
TAO_NotifyLogFactory_i::create_log_reference (DsLogAdmin::LogId id
ACE_ENV_ARG_DECL)
@@ -209,42 +197,6 @@ TAO_NotifyLogFactory_i::create_log_reference (DsLogAdmin::LogId id
return event_log._retn();
}
-DsLogAdmin::Log_ptr
-TAO_NotifyLogFactory_i::create_log_object (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
-{
- PortableServer::ServantBase* servant;
-
- servant = create_log_servant (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLog::_nil ());
-
- PortableServer::ServantBase_var safe_servant = servant;
- // Transfer ownership to the POA.
-
- // Obtain ObjectId
- PortableServer::ObjectId_var oid =
- this->create_objectid (id);
-
- // Register with the poa
- this->log_poa_->activate_object_with_id (oid.in (),
- servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLog::_nil ());
-
- CORBA::Object_var obj =
- this->log_poa_->id_to_reference (oid.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLog::_nil ());
-
- // Narrow
- DsNotifyLogAdmin::NotifyLog_var notify_log =
- DsNotifyLogAdmin::NotifyLog::_narrow(obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLog::_nil ());
-
- return notify_log._retn();
-}
-
PortableServer::ServantBase*
TAO_NotifyLogFactory_i::create_log_servant (DsLogAdmin::LogId id
ACE_ENV_ARG_DECL)
diff --git a/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.h b/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.h
index 838888c25ac..cba9895a8d4 100644
--- a/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.h
+++ b/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.h
@@ -237,13 +237,6 @@ public:
));
protected:
- virtual PortableServer::ObjectId*
- create_objectid (DsLogAdmin::LogId id);
-
- virtual DsLogAdmin::Log_ptr
- create_log_object (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL);
-
virtual DsLogAdmin::Log_ptr
create_log_reference (DsLogAdmin::LogId id
ACE_ENV_ARG_DECL);
diff --git a/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.cpp b/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.cpp
index d2d2ba67ffa..ad2393901b3 100644
--- a/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.cpp
+++ b/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.cpp
@@ -183,18 +183,6 @@ TAO_RTEventLogFactory_i::create_with_id (
return event_log._retn ();
}
-PortableServer::ObjectId*
-TAO_RTEventLogFactory_i::create_objectid (DsLogAdmin::LogId id)
-{
- char buf[32];
- ACE_OS::sprintf(buf, "%lu", static_cast<unsigned long>(id));
-
- PortableServer::ObjectId_var oid =
- PortableServer::string_to_ObjectId(buf);
-
- return oid._retn ();
-}
-
DsLogAdmin::Log_ptr
TAO_RTEventLogFactory_i::create_log_reference (DsLogAdmin::LogId id
ACE_ENV_ARG_DECL)
@@ -218,42 +206,6 @@ TAO_RTEventLogFactory_i::create_log_reference (DsLogAdmin::LogId id
return event_log._retn();
}
-DsLogAdmin::Log_ptr
-TAO_RTEventLogFactory_i::create_log_object (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
-{
- PortableServer::ServantBase* servant;
-
- servant = create_log_servant (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (RTEventLogAdmin::EventLog::_nil ());
-
- PortableServer::ServantBase_var safe_servant = servant;
- // Transfer ownership to POA.
-
- // Obtain ObjectId
- PortableServer::ObjectId_var oid =
- this->create_objectid (id);
-
- // Register with the poa
- this->log_poa_->activate_object_with_id (oid.in (),
- servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (RTEventLogAdmin::EventLog::_nil ());
-
- CORBA::Object_var obj =
- this->log_poa_->id_to_reference (oid.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (RTEventLogAdmin::EventLog::_nil ());
-
- // Narrow
- RTEventLogAdmin::EventLog_var event_log =
- RTEventLogAdmin::EventLog::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (RTEventLogAdmin::EventLog::_nil ());
-
- return event_log._retn ();
-}
-
PortableServer::ServantBase*
TAO_RTEventLogFactory_i::create_log_servant (DsLogAdmin::LogId id
ACE_ENV_ARG_DECL)
diff --git a/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.h b/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.h
index 0ff9193d8ea..5c721a305ee 100644
--- a/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.h
+++ b/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.h
@@ -107,13 +107,6 @@ public:
));
protected:
- virtual PortableServer::ObjectId*
- create_objectid (DsLogAdmin::LogId id);
-
- virtual DsLogAdmin::Log_ptr
- create_log_object (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL);
-
virtual DsLogAdmin::Log_ptr
create_log_reference (DsLogAdmin::LogId id
ACE_ENV_ARG_DECL);