summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-26 23:21:25 +0000
committerdengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-26 23:21:25 +0000
commitb165c202deb338b06f49567476b3e8f801cd85c4 (patch)
tree716a9335cd54fb6998c7832257e77bb5dc79bea0
parent1855b744051df9331c93f611b6da93a06102cadf (diff)
downloadATCD-b165c202deb338b06f49567476b3e8f801cd85c4.tar.gz
*** empty log message ***
-rw-r--r--TAO/CIAO/DAnCE/Config_Handlers/CPK_Handler.cpp8
-rw-r--r--TAO/CIAO/DAnCE/Deployment.xsd12
-rw-r--r--TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp4
-rw-r--r--TAO/CIAO/DAnCE/ciao/Deployment_Core.idl6
-rw-r--r--TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.cpp171
-rw-r--r--TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.h17
-rw-r--r--TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.cpp378
-rw-r--r--TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.h113
-rw-r--r--TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.cpp533
-rw-r--r--TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.h304
-rw-r--r--TAO/CIAO/DAnCE/examples/EC_Benchmark/Consumer/Consumer_exec.cpp2
-rw-r--r--TAO/CIAO/DAnCE/examples/EC_Benchmark/EC_Benchmark.idl9
-rw-r--r--TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer.idl6
-rw-r--r--TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_exec.h74
-rw-r--r--TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_svnt.h2
15 files changed, 685 insertions, 954 deletions
diff --git a/TAO/CIAO/DAnCE/Config_Handlers/CPK_Handler.cpp b/TAO/CIAO/DAnCE/Config_Handlers/CPK_Handler.cpp
index 49516dd54ae..00ccde89f16 100644
--- a/TAO/CIAO/DAnCE/Config_Handlers/CPK_Handler.cpp
+++ b/TAO/CIAO/DAnCE/Config_Handlers/CPK_Handler.cpp
@@ -20,8 +20,8 @@ process_CCMComponentPortKind (DOMNodeIterator * iter,
char* event_consumer = XMLString::transcode (XStr ("EventConsumer"));
char* rtec_event_emitter = XMLString::transcode (XStr ("rtecEventEmitter"));
char* rtec_event_publisher = XMLString::transcode (XStr ("rtecEventPublisher"));
- char* cos_event_emitter = XMLString::transcode (XStr ("cosEventEmitter"));
- char* cos_event_publisher = XMLString::transcode (XStr ("cosEventPublisher"));
+ char* cos_event_emitter = XMLString::transcode (XStr ("ecEventEmitter"));
+ char* cos_event_publisher = XMLString::transcode (XStr ("ecEventPublisher"));
char* ns_event_emitter = XMLString::transcode (XStr ("nsEventEmitter"));
char* ns_event_publisher = XMLString::transcode (XStr ("nsEventPublisher"));
char * temp = Utils::parse_string (iter);
@@ -66,11 +66,11 @@ process_CCMComponentPortKind (DOMNodeIterator * iter,
// COS EC event supplier
else if ((ACE_OS::strcmp (kind_str_tr, cos_event_emitter)) == 0)
{
- kind = Deployment::cosEventEmitter;
+ kind = Deployment::ecEventEmitter;
}
else if ((ACE_OS::strcmp (kind_str_tr, cos_event_publisher)) == 0)
{
- kind = Deployment::cosEventPublisher;
+ kind = Deployment::ecEventPublisher;
}
// NS event supplier
else if ((ACE_OS::strcmp (kind_str_tr, ns_event_emitter)) == 0)
diff --git a/TAO/CIAO/DAnCE/Deployment.xsd b/TAO/CIAO/DAnCE/Deployment.xsd
index 7d30f3ffd9b..b21fc929fc5 100644
--- a/TAO/CIAO/DAnCE/Deployment.xsd
+++ b/TAO/CIAO/DAnCE/Deployment.xsd
@@ -761,12 +761,12 @@
<xsd:enumeration value="EventEmitter"/>
<xsd:enumeration value="EventPublisher"/>
<xsd:enumeration value="EventConsumer"/>
- <xsd:enumeration value="cosEventEmitter"/>
- <xsd:enumeration value="cosEventPublisher"/>
- <xsd:enumeration value="cosEventConsumer"/>
- <xsd:enumeration value="rtEventEmitter"/>
- <xsd:enumeration value="rtEventPublisher"/>
- <xsd:enumeration value="rtEventConsumer"/>
+ <xsd:enumeration value="ecEventEmitter"/>
+ <xsd:enumeration value="ecEventPublisher"/>
+ <xsd:enumeration value="ecEventConsumer"/>
+ <xsd:enumeration value="rtecEventEmitter"/>
+ <xsd:enumeration value="rtecEventPublisher"/>
+ <xsd:enumeration value="rtecEventConsumer"/>
<xsd:enumeration value="nsEventEmitter"/>
<xsd:enumeration value="nsEventPublisher"/>
<xsd:enumeration value="nsEventConsumer"/>
diff --git a/TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp b/TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp
index 3ee108c434a..1d1a663c012 100644
--- a/TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp
+++ b/TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp
@@ -708,8 +708,8 @@ get_outgoing_connections_i (const char * instname,
// and "consumer side port name".
if (retv[len].kind == Deployment::rtecEventPublisher ||
retv[len].kind == Deployment::rtecEventEmitter ||
- retv[len].kind == Deployment::cosEventPublisher ||
- retv[len].kind == Deployment::cosEventEmitter ||
+ retv[len].kind == Deployment::ecEventPublisher ||
+ retv[len].kind == Deployment::ecEventEmitter ||
retv[len].kind == Deployment::nsEventPublisher ||
retv[len].kind == Deployment::nsEventEmitter)
{
diff --git a/TAO/CIAO/DAnCE/ciao/Deployment_Core.idl b/TAO/CIAO/DAnCE/ciao/Deployment_Core.idl
index 6844cacd46a..2110fc9228f 100644
--- a/TAO/CIAO/DAnCE/ciao/Deployment_Core.idl
+++ b/TAO/CIAO/DAnCE/ciao/Deployment_Core.idl
@@ -47,9 +47,9 @@ module Deployment
EventEmitter,
EventPublisher,
EventConsumer,
- cosEventEmitter,
- cosEventPublisher,
- cosEventConsumer,
+ ecEventEmitter,
+ ecEventPublisher,
+ ecEventConsumer,
rtecEventEmitter,
rtecEventPublisher,
rtecEventConsumer,
diff --git a/TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.cpp b/TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.cpp
index 7e9d632b5c0..620328af617 100644
--- a/TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.cpp
+++ b/TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.cpp
@@ -40,65 +40,85 @@ CIAO::NodeApplication_Impl::finishLaunch (
//to narrow here.
switch (providedReference[i].kind)
{
- case Deployment::SimplexReceptacle:
- comp->connect (providedReference[i].portName.in (),
- providedReference[i].endpoint.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- break;
-
- case Deployment::MultiplexReceptacle:
- comp->connect (providedReference[i].portName.in (),
- providedReference[i].endpoint.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- break;
-
- // @@ (GD) A place holder where the Event Channel connections
- // should be set up.
- case Deployment::EventEmitter:
- consumer = Components::EventConsumerBase::
- _narrow (providedReference[i].endpoint.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (consumer.in ()))
- {
- ACE_THROW (Deployment::InvalidConnection ());
- }
-
- comp->connect_consumer(providedReference[i].portName.in (),
- consumer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- break;
-
- case Deployment::EventPublisher:
- consumer = Components::EventConsumerBase::
- _narrow (providedReference[i].endpoint.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (consumer.in ()))
- {
- ACE_THROW (Deployment::InvalidConnection ());
- }
-
- comp->subscribe (providedReference[i].portName.in (),
- consumer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- break;
-
- case Deployment::rtecEventEmitter:
- case Deployment::rtecEventPublisher:
-
- ACE_DEBUG ((LM_DEBUG, "case CIAO::Assembly_Connection::PUBLISHER_CONSUMER:!!!!\n"));
- this->build_rtec_connection (providedReference[i]);
- break;
-
- default:
- ACE_TRY_THROW (Deployment::InvalidConnection ());
+ case Deployment::SimplexReceptacle:
+ comp->connect (providedReference[i].portName.in (),
+ providedReference[i].endpoint.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ break;
+
+ case Deployment::MultiplexReceptacle:
+ comp->connect (providedReference[i].portName.in (),
+ providedReference[i].endpoint.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ break;
+
+ // @@ (GD) A place holder where the Event Channel connections
+ // should be set up.
+ case Deployment::EventEmitter:
+ consumer = Components::EventConsumerBase::
+ _narrow (providedReference[i].endpoint.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (consumer.in ()))
+ {
+ ACE_THROW (Deployment::InvalidConnection ());
+ }
+
+ comp->connect_consumer(providedReference[i].portName.in (),
+ consumer.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ break;
+
+ case Deployment::EventPublisher:
+ consumer = Components::EventConsumerBase::
+ _narrow (providedReference[i].endpoint.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (consumer.in ()))
+ {
+ ACE_THROW (Deployment::InvalidConnection ());
+ }
+
+ comp->subscribe (providedReference[i].portName.in (),
+ consumer.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ break;
+
+ case Deployment::rtecEventEmitter:
+ case Deployment::rtecEventPublisher:
+ ACE_DEBUG ((LM_DEBUG, "Building real-time event channel connection.\n"));
+ this->build_event_connection (providedReference[i],
+ CIAO::RTEC
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ break;
+
+ case Deployment::ecEventEmitter:
+ case Deployment::ecEventPublisher:
+ ACE_DEBUG ((LM_DEBUG, "Building CoS event channel connection.\n"));
+ this->build_event_connection (providedReference[i],
+ CIAO::EC
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ break;
+
+ case Deployment::nsEventEmitter:
+ case Deployment::nsEventPublisher:
+ ACE_DEBUG ((LM_DEBUG, "Building notification channel connection.\n"));
+ this->build_event_connection (providedReference[i],
+ CIAO::NOTIFY
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ break;
+
+ default:
+ ACE_TRY_THROW (Deployment::InvalidConnection ());
}
}
if (start)
@@ -552,11 +572,13 @@ parse_config_values (const ::Deployment::Properties & properties,
*/
void
-CIAO::NodeApplication_Impl::build_rtec_connection (const Deployment::Connection & connection
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
+CIAO::NodeApplication_Impl::build_event_connection (const Deployment::Connection & connection,
+ CIAO::EventServiceType type
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((Deployment::InvalidConnection,
+ CORBA::SystemException))
{
- ACE_DEBUG ((LM_DEBUG, "CIAO::NodeApplication_Impl::build_rtec_connection ()!!!\n"));
+ ACE_DEBUG ((LM_DEBUG, "CIAO::NodeApplication_Impl::build_connection ()!!!\n"));
// Get the consumer port object reference and put into "consumer"
Components::EventConsumerBase_var consumer =
@@ -600,9 +622,6 @@ CIAO::NodeApplication_Impl::build_rtec_connection (const Deployment::Connection
ACE_DEBUG ((LM_DEBUG, "Nil event_service\n"));
ACE_THROW (Deployment::InvalidConnection ());
}
-
- // Set the event service type.
- CIAO::EventServiceType type = CIAO::RTEC;
// supplier ID
ACE_CString sid = source_objref->component_UUID (ACE_ENV_SINGLE_ARG_DECL);
@@ -660,23 +679,5 @@ CIAO::NodeApplication_Impl::build_rtec_connection (const Deployment::Connection
consumer_config->destroy (ACE_ENV_SINGLE_ARG_DECL);
ACE_CHECK;
- ACE_DEBUG ((LM_DEBUG, "CIAO::NodeApplication_Impl::build_rtec_connection () completed!!!!\n"));
-}
-
-void
-CIAO::NodeApplication_Impl::build_ec_connection (const Deployment::Connection & connection
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((Deployment::InvalidConnection,
- CORBA::SystemException))
-{
-
-}
-
-void
-CIAO::NodeApplication_Impl::build_ns_connection (const Deployment::Connection & connection
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((Deployment::InvalidConnection,
- CORBA::SystemException))
-{
-
+ ACE_DEBUG ((LM_DEBUG, "CIAO::NodeApplication_Impl::build_connection () completed!!!!\n"));
}
diff --git a/TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.h b/TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.h
index 7298437ee63..9f2da931b5c 100644
--- a/TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.h
+++ b/TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.h
@@ -203,22 +203,13 @@ namespace CIAO
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::StartError));
- /*------- CIAO helper functions for building event channel connections ------/*
+ /*------- CIAO helper functions for building pub/sub service connection------/*
*
*---------------------------------------------------------------------------*/
- void build_rtec_connection (const Deployment::Connection & connection
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((Deployment::InvalidConnection,
- CORBA::SystemException));
-
- void build_ec_connection (const Deployment::Connection & connection
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((Deployment::InvalidConnection,
- CORBA::SystemException));
-
- void build_ns_connection (const Deployment::Connection & connection
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ void build_event_connection (const Deployment::Connection & connection,
+ CIAO::EventServiceType type
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((Deployment::InvalidConnection,
CORBA::SystemException));
diff --git a/TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.cpp b/TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.cpp
index 78260c0e60a..fccbf855572 100644
--- a/TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.cpp
+++ b/TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.cpp
@@ -1,7 +1,5 @@
// $Id$
-
-
#include "Servant_Impl_Base.h"
#include "StandardConfigurator_Impl.h"
#include "Container_Base.h"
@@ -17,6 +15,347 @@ namespace CIAO
{
}
+ // Operations for CCMObject interface.
+
+ ::Components::PrimaryKeyBase *
+ Servant_Impl_Base::get_primary_key (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ ::Components::NoKeyAvailable))
+ {
+ ACE_THROW_RETURN (::Components::NoKeyAvailable (), 0);
+
+ return 0;
+ }
+
+ CORBA::IRObject_ptr
+ Servant_Impl_Base::get_component_def (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (),
+ CORBA::IRObject::_nil ());
+ }
+
+ void
+ Servant_Impl_Base::configuration_complete (
+ ACE_ENV_SINGLE_ARG_DECL_NOT_USED
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidConfiguration))
+ {
+ // CIAO to-do
+ }
+
+ void
+ Servant_Impl_Base::remove (
+ ACE_ENV_SINGLE_ARG_DECL_NOT_USED
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure))
+ {
+ // CIAO to-do
+ }
+
+ ::Components::ConnectionDescriptions *
+ Servant_Impl_Base::get_connections (
+ const char * /* name */
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName))
+ {
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
+ }
+
+ ::Components::ComponentPortDescription *
+ Servant_Impl_Base::get_all_ports (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ OBV_Components::ComponentPortDescription *cps = 0;
+ ACE_NEW_RETURN (cps,
+ OBV_Components::ComponentPortDescription,
+ 0);
+ ::Components::ComponentPortDescription_var retv = cps;
+
+ ::Components::FacetDescriptions_var facets_desc =
+ this->get_all_facets (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ ::Components::ReceptacleDescriptions_var receptacle_desc =
+ this->get_all_receptacles (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ ::Components::ConsumerDescriptions_var consumer_desc =
+ this->get_all_consumers (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ ::Components::EmitterDescriptions_var emitter_desc =
+ this->get_all_emitters (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ ::Components::PublisherDescriptions_var publisher_desc =
+ this->get_all_publishers (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ retv->facets (facets_desc.in ());
+ retv->receptacles (receptacle_desc.in ());
+ retv->consumers (consumer_desc.in ());
+ retv->emitters (emitter_desc.in ());
+ retv->publishers (publisher_desc.in ());
+
+ return retv._retn ();
+ }
+
+ CORBA::Object_ptr
+ Servant_Impl_Base::provide_facet (
+ const char *name
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName))
+ {
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (Components::InvalidName (),
+ CORBA::Object::_nil ());
+ }
+
+ CORBA::Object_ptr retval = this->lookup_facet (name);
+
+ if (CORBA::is_nil (retval))
+ {
+ ACE_THROW_RETURN (Components::InvalidName (),
+ CORBA::Object::_nil ());
+ }
+
+ return retval;
+ }
+
+ Components::FacetDescriptions *
+ Servant_Impl_Base::get_named_facets (
+ const ::Components::NameList & names
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName))
+ {
+ Components::FacetDescriptions *retval = 0;
+ ACE_NEW_RETURN (retval,
+ ::Components::FacetDescriptions,
+ 0);
+ Components::FacetDescriptions_var safe_retval = retval;
+ CORBA::ULong len = names.length ();
+ safe_retval->length (len);
+ ::Components::FacetDescription *tmp = 0;
+
+ for (CORBA::ULong i = 0; i < len; ++i)
+ {
+ tmp = this->lookup_facet_description (names[i].in ());
+
+ if (tmp == 0)
+ {
+ ACE_THROW_RETURN (Components::InvalidName (),
+ 0);
+ }
+
+ safe_retval[i] = tmp;
+ }
+
+ return safe_retval._retn ();
+ }
+
+ ::Components::FacetDescriptions *
+ Servant_Impl_Base::get_all_facets (
+ ACE_ENV_SINGLE_ARG_DECL_NOT_USED
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ::Components::FacetDescriptions *tmp = 0;
+ ACE_NEW_RETURN (tmp,
+ ::Components::FacetDescriptions,
+ 0);
+
+ ::Components::FacetDescriptions_var retval = tmp;
+
+ retval->length (this->facet_table_.current_size ());
+ CORBA::ULong i = 0;
+
+ for (FacetTable::iterator iter = this->facet_table_.begin ();
+ iter != this->facet_table_.end ();
+ ++iter, ++i)
+ {
+ FacetTable::ENTRY & entry = *iter;
+ retval[i] = entry.int_id_;
+ }
+
+ return retval._retn ();
+ }
+
+ ::Components::ConsumerDescriptions *
+ Servant_Impl_Base::get_all_consumers (
+ ACE_ENV_SINGLE_ARG_DECL_NOT_USED
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ::Components::ConsumerDescriptions *tmp = 0;
+ ACE_NEW_RETURN (tmp,
+ ::Components::ConsumerDescriptions,
+ 0);
+
+ ::Components::ConsumerDescriptions_var retval = tmp;
+
+ retval->length (this->consumer_table_.current_size ());
+ CORBA::ULong i = 0;
+
+ for (ConsumerTable::iterator iter = this->consumer_table_.begin ();
+ iter != this->consumer_table_.end ();
+ ++iter, ++i)
+ {
+ ConsumerTable::ENTRY & entry = *iter;
+ retval[i] = entry.int_id_;
+ }
+
+ return retval._retn ();
+ }
+
+ ::Components::EventConsumerBase_ptr
+ Servant_Impl_Base::get_consumer (
+ const char *sink_name
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName))
+ {
+ if (sink_name == 0)
+ {
+ ACE_THROW_RETURN (Components::InvalidName (),
+ Components::EventConsumerBase::_nil ());
+ }
+
+ Components::EventConsumerBase_ptr retval =
+ this->lookup_consumer (sink_name);
+
+ if (CORBA::is_nil (retval))
+ {
+ ACE_THROW_RETURN (Components::InvalidName (),
+ Components::EventConsumerBase::_nil ());
+ }
+
+ return retval;
+ }
+
+ ::Components::EventConsumerBase_ptr
+ Servant_Impl_Base::disconnect_consumer (
+ const char * /* source_name */
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName,
+ Components::NoConnection))
+ {
+ ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
+ }
+
+ ::Components::ConsumerDescriptions *
+ Servant_Impl_Base::get_named_consumers (
+ const ::Components::NameList & names
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName))
+ {
+ Components::ConsumerDescriptions *retval = 0;
+ ACE_NEW_RETURN (retval,
+ ::Components::ConsumerDescriptions,
+ 0);
+ Components::ConsumerDescriptions_var safe_retval = retval;
+ CORBA::ULong len = names.length ();
+ safe_retval->length (len);
+ ::Components::ConsumerDescription *tmp = 0;
+
+ for (CORBA::ULong i = 0; i < len; ++i)
+ {
+ tmp = this->lookup_consumer_description (names[i].in ());
+
+ if (tmp == 0)
+ {
+ ACE_THROW_RETURN (Components::InvalidName (),
+ 0);
+ }
+
+ safe_retval[i] = tmp;
+ }
+
+ return safe_retval._retn ();
+ }
+
+ ::Components::EmitterDescriptions *
+ Servant_Impl_Base::get_all_emitters (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
+ }
+
+ ::Components::EmitterDescriptions *
+ Servant_Impl_Base::get_named_emitters (
+ const ::Components::NameList & /* names */
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName))
+ {
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
+ }
+
+ ::Components::ReceptacleDescriptions *
+ Servant_Impl_Base::get_all_receptacles (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
+ }
+
+ ::Components::ReceptacleDescriptions *
+ Servant_Impl_Base::get_named_receptacles (
+ const ::Components::NameList & /* names */
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName))
+ {
+ ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
+ }
+
+ ::Components::PublisherDescriptions *
+ Servant_Impl_Base::get_all_publishers (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
+ }
+
+ ::Components::PublisherDescriptions *
+ Servant_Impl_Base::get_named_publishers (
+ const ::Components::NameList & /* names */
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName))
+ {
+ ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
+ }
+
+ /// Protected operations.
+
void
Servant_Impl_Base::add_facet (const char *port_name,
CORBA::Object_ptr port_ref)
@@ -35,7 +374,7 @@ namespace CIAO
safe._retn ();
}
}
-
+
CORBA::Object_ptr
Servant_Impl_Base::lookup_facet (const char *port_name)
{
@@ -48,6 +387,19 @@ namespace CIAO
return CORBA::Object::_duplicate (fd.in ()->facet_ref ());
}
+
+ ::Components::FacetDescription *
+ Servant_Impl_Base::lookup_facet_description (const char *port_name)
+ {
+ ::Components::FacetDescription_var fd;
+
+ if (this->facet_table_.find (port_name, fd) != 0)
+ {
+ return 0;
+ }
+
+ return fd._retn ();
+ }
void
Servant_Impl_Base::add_consumer (
@@ -84,11 +436,26 @@ namespace CIAO
::Components::EventConsumerBase::_duplicate (cd.in ()->consumer ());
}
+ ::Components::ConsumerDescription *
+ Servant_Impl_Base::lookup_consumer_description (
+ const char *port_name
+ )
+ {
+ ::Components::ConsumerDescription_var cd;
+
+ if (this->consumer_table_.find (port_name, cd) != 0)
+ {
+ return 0;
+ }
+
+ return cd._retn ();
+ }
+
Components::StandardConfigurator*
Servant_Impl_Base::get_standard_configurator (
ACE_ENV_SINGLE_ARG_DECL)
{
- //create the configurator servant
+ // Create the configurator servant.
StandardConfigurator_Impl *config_impl = 0;
ACE_NEW_THROW_EX (config_impl,
@@ -103,12 +470,11 @@ namespace CIAO
return configurator._retn ();
}
-
PortableServer::POA_ptr
Servant_Impl_Base::_default_POA (
ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
{
return
- PortableServer::POA::_duplicate (container_->the_POA ());
+ PortableServer::POA::_duplicate (container_->the_POA ());
}
}
diff --git a/TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.h b/TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.h
index f3b5a693d17..272fa8f3d5a 100644
--- a/TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.h
+++ b/TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.h
@@ -42,22 +42,123 @@ namespace CIAO
* Servant_Impl.
*/
class CIAO_SERVER_Export Servant_Impl_Base
+ : public virtual POA_Components::CCMObject
{
public:
Servant_Impl_Base (Session_Container * c);
virtual ~Servant_Impl_Base (void);
+ /// Operations for CCMObject interface.
+
+ virtual ::Components::PrimaryKeyBase *
+ get_primary_key (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::NoKeyAvailable));
+
+ virtual CORBA::IRObject_ptr
+ get_component_def (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void
+ configuration_complete (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidConfiguration));
+
+ virtual void
+ remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure));
+
+ virtual ::Components::ConnectionDescriptions *
+ get_connections (const char *name
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName));
+
+ virtual ::Components::ComponentPortDescription *
+ get_all_ports (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual CORBA::Object_ptr
+ provide_facet (const char *name
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName));
+
+ virtual ::Components::FacetDescriptions *
+ get_named_facets (const ::Components::NameList & names
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName));
+
+ virtual ::Components::FacetDescriptions *
+ get_all_facets (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual ::Components::ConsumerDescriptions *
+ get_all_consumers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual ::Components::EventConsumerBase_ptr
+ get_consumer (const char *sink_name
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName));
+
+ virtual ::Components::EventConsumerBase_ptr
+ disconnect_consumer (const char *source_name
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName,
+ Components::NoConnection));
+
+ virtual ::Components::ConsumerDescriptions *
+ get_named_consumers (const ::Components::NameList & names
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName));
+
+ virtual ::Components::EmitterDescriptions *
+ get_all_emitters (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual ::Components::EmitterDescriptions *
+ get_named_emitters (const ::Components::NameList & /* names */
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName));
+
+ virtual ::Components::ReceptacleDescriptions *
+ get_all_receptacles (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual ::Components::ReceptacleDescriptions *
+ get_named_receptacles (const ::Components::NameList & /* names */
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName));
+
+ virtual ::Components::PublisherDescriptions *
+ get_all_publishers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual ::Components::PublisherDescriptions *
+ get_named_publishers (const ::Components::NameList & names
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidName));
+
/// Operation to set attributes on the component.
virtual void set_attributes (const Components::ConfigValues &descr
ACE_ENV_ARG_DECL) = 0;
- //Creates and returns the StandardConfigurator for the component
+ // Creates and returns the StandardConfigurator for the component.
virtual Components::StandardConfigurator *get_standard_configurator (
ACE_ENV_SINGLE_ARG_DECL
);
- /// Override that returns the (passed-in) default POA of our member
+ /// Override that returns the (passed-in) default POA of our member
/// component's container, to ensure that we get registered
/// to that POA when _this() is called.
virtual PortableServer::POA_ptr _default_POA (
@@ -69,6 +170,10 @@ namespace CIAO
CORBA::Object_ptr port_ref);
CORBA::Object_ptr lookup_facet (const char *port_name);
+
+ ::Components::FacetDescription *lookup_facet_description (
+ const char *port_name
+ );
void add_consumer (const char *port_name,
::Components::EventConsumerBase_ptr port_ref);
@@ -76,6 +181,10 @@ namespace CIAO
::Components::EventConsumerBase_ptr lookup_consumer (
const char *port_name
);
+
+ ::Components::ConsumerDescription *lookup_consumer_description (
+ const char *port_name
+ );
protected:
typedef ACE_Hash_Map_Manager_Ex<const char *,
diff --git a/TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.cpp b/TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.cpp
index 145b82dfa53..0370b023005 100644
--- a/TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.cpp
+++ b/TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.cpp
@@ -91,9 +91,8 @@ namespace BMClosedED_Impl
::Components::CCMHome_ptr home,
::CIAO::Session_Container *c,
BMClosedED_Servant *sv)
- : home_ (::Components::CCMHome::_duplicate (home)),
- container_ (c),
- servant_ (sv)
+ : Context_Impl_Base (home, c),
+ ctx_svnt_base (home, c, sv)
{
}
@@ -101,102 +100,6 @@ namespace BMClosedED_Impl
{
}
- // Operations from ::Components::CCMContext.
-
- ::Components::Principal_ptr
- BMClosedED_Context::get_caller_principal (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::Components::Principal::_nil ());
- }
-
- ::Components::CCMHome_ptr
- BMClosedED_Context::get_CCM_home (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return ::Components::CCMHome::_duplicate (this->home_.in ());
- }
-
- CORBA::Boolean
- BMClosedED_Context::get_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::Transaction::UserTransaction_ptr
- BMClosedED_Context::get_user_transaction (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::Components::Transaction::UserTransaction::_nil ());
- }
-
- CORBA::Boolean
- BMClosedED_Context::is_caller_in_role (
- const char * /* role */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
- }
-
- void
- BMClosedED_Context::set_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW (CORBA::NO_IMPLEMENT ());
- }
-
- // Operations from ::Components::SessionContextinterface.
-
- CORBA::Object_ptr
- BMClosedED_Context::get_CCM_object (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- if (CORBA::is_nil (this->component_.in ()))
- {
- CORBA::Object_var obj =
- this->container_->get_objref (
- this->servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- this->component_ =
- ::BasicSP::BMClosedED::_narrow (
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- if (CORBA::is_nil (this->component_.in ()))
- {
- ACE_THROW_RETURN (
- ::CORBA::INTERNAL (),
- ::CORBA::Object::_nil ());
- }
- }
-
- return ::BasicSP::BMClosedED::_duplicate (
- this->component_.in ());
- }
-
// Operations for BMClosedED receptacles and event sources,
// defined in ::BasicSP::CCM_BMClosedED_Context.
@@ -255,15 +158,6 @@ namespace BMClosedED_Impl
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- ACE_CString my_uuid = this->servant_->component_UUID (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- my_uuid += "_out_avail_publisher";
-
- this->container_->push_event (ev,
- my_uuid.c_str ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- /*
ACE_Active_Map_Manager<
::BasicSP::DataAvailableConsumer_var>::iterator end =
this->ciao_publishes_out_avail_map_.end ();
@@ -288,7 +182,6 @@ namespace BMClosedED_Impl
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
}
- */
}
::Components::Cookie *
@@ -345,12 +238,6 @@ namespace BMClosedED_Impl
// CIAO-specific.
- ::CIAO::Session_Container *
- BMClosedED_Context::_ciao_the_Container (void) const
- {
- return this->container_;
- }
-
BMClosedED_Context *
BMClosedED_Context::_narrow (
::Components::SessionContext_ptr p
@@ -366,7 +253,8 @@ namespace BMClosedED_Impl
::BasicSP::CCM_BMClosedED_ptr exe,
::Components::CCMHome_ptr h,
::CIAO::Session_Container *c)
- : our_base (exe, c)
+ : Servant_Impl_Base (c),
+ comp_svnt_base (exe, c)
{
this->context_ = new BMClosedED_Context (h, c, this);
@@ -460,22 +348,24 @@ namespace BMClosedED_Impl
return ret;
}
- CIAO::Port_Activator_T< CIAO_GLUE_BasicSP::ReadData_Servant,
- ::BasicSP::CCM_ReadData,
- ::Components::CCMContext,
- BMClosedED_Servant > *tmp = 0;
-
- typedef CIAO::Port_Activator_T<
- CIAO_GLUE_BasicSP::ReadData_Servant,
- ::BasicSP::CCM_ReadData,
- ::Components::CCMContext,
- BMClosedED_Servant >
- MACRO_MADNESS_TYPEDEF;
-
+ CIAO::Port_Activator_T<
+ CIAO_GLUE_BasicSP::ReadData_Servant,
+ ::BasicSP::CCM_ReadData,
+ ::Components::CCMContext,
+ BMClosedED_Servant
+ > *tmp = 0;
+
+ typedef CIAO::Port_Activator_T<
+ CIAO_GLUE_BasicSP::ReadData_Servant,
+ ::BasicSP::CCM_ReadData,
+ ::Components::CCMContext,
+ BMClosedED_Servant
+ >
+ MACRO_MADNESS_TYPEDEF;
ACE_NEW_THROW_EX (
- tmp,
- MACRO_MADNESS_TYPEDEF (
+ tmp,
+ MACRO_MADNESS_TYPEDEF (
"BasicSP_BMClosedED_dataout",
"dataout",
CIAO::Port_Activator::Facet,
@@ -484,12 +374,13 @@ namespace BMClosedED_Impl
this),
CORBA::NO_MEMORY ());
-
CIAO::Servant_Activator *sa =
this->container_->ports_servant_activator ();
if (!sa->register_port_activator (tmp))
- return 0;
+ {
+ return 0;
+ }
::CORBA::Object_var obj =
this->container_->generate_reference (
@@ -506,63 +397,6 @@ namespace BMClosedED_Impl
return obj._retn ();
}
- // Operations for Navigation interface.
-
- CORBA::Object_ptr
- BMClosedED_Servant::provide_facet (
- const char *name
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- if (name == 0)
- {
- ACE_THROW_RETURN (
- ::CORBA::BAD_PARAM (),
- ::CORBA::Object::_nil ());
- }
-
- if (ACE_OS::strcmp (name, "dataout") == 0)
- {
- return this->provide_dataout (ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::CORBA::Object::_nil ());
- }
-
- ::Components::FacetDescriptions *
- BMClosedED_Servant::get_named_facets (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::EmitterDescriptions *
- BMClosedED_Servant::get_all_emitters (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::EmitterDescriptions *
- BMClosedED_Servant::get_named_emitters (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
::Components::Cookie *
BMClosedED_Servant::subscribe_out_avail (
::BasicSP::DataAvailableConsumer_ptr c
@@ -712,7 +546,9 @@ namespace BMClosedED_Impl
this->container_->ports_servant_activator ();
if (!sa->register_port_activator (tmp))
- return 0;
+ {
+ return 0;
+ }
::CORBA::Object_var obj =
this->container_->generate_reference (
@@ -812,36 +648,6 @@ namespace BMClosedED_Impl
ACE_UNUSED_ARG (ck);
}
- ::Components::ConnectionDescriptions *
- BMClosedED_Servant::get_connections (
- const char * /* name */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ReceptacleDescriptions *
- BMClosedED_Servant::get_all_receptacles (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ReceptacleDescriptions *
- BMClosedED_Servant::get_named_receptacles (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
void
BMClosedED_Servant::connect_datain (
::BasicSP::ReadData_ptr c
@@ -876,31 +682,6 @@ namespace BMClosedED_Impl
ACE_ENV_SINGLE_ARG_PARAMETER);
}
- ::Components::EventConsumerBase_ptr
- BMClosedED_Servant::get_consumer (
- const char *sink_name
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- if (sink_name == 0)
- {
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::Components::EventConsumerBase::_nil ());
- }
-
- if (ACE_OS::strcmp (sink_name, "in_avail") == 0)
- {
- return this->get_consumer_in_avail (ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::Components::EventConsumerBase::_nil ());
- }
-
void
BMClosedED_Servant::connect_consumer (
const char * emitter_name,
@@ -921,29 +702,6 @@ namespace BMClosedED_Impl
ACE_THROW (::Components::InvalidName ());
}
- ::Components::EventConsumerBase_ptr
- BMClosedED_Servant::disconnect_consumer (
- const char * /* source_name */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName,
- ::Components::NoConnection))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ConsumerDescriptions *
- BMClosedED_Servant::get_named_consumers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
::Components::Cookie *
BMClosedED_Servant::subscribe (
const char *publisher_name,
@@ -1016,74 +774,6 @@ namespace BMClosedED_Impl
::Components::EventConsumerBase::_nil ());
}
- ::Components::PublisherDescriptions *
- BMClosedED_Servant::get_all_publishers (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::PublisherDescriptions *
- BMClosedED_Servant::get_named_publishers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- // Operations for CCMObject interface.
-
- void
- BMClosedED_Servant::component_UUID (
- const char * new_component_UUID
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- this->component_UUID_ = new_component_UUID;
- }
-
- CIAO::CONNECTION_ID
- BMClosedED_Servant::component_UUID (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CORBA::string_dup (this->component_UUID_.c_str ());
- }
-
- CORBA::IRObject_ptr
- BMClosedED_Servant::get_component_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- void
- BMClosedED_Servant::configuration_complete (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConfiguration))
- {
- // CIAO to-do
- }
-
- void
- BMClosedED_Servant::remove (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure))
- {
- // CIAO to-do
- }
-
CORBA::Object_ptr
BMClosedED_Servant::get_facet_executor (const char *name
ACE_ENV_ARG_DECL)
@@ -1135,8 +825,8 @@ namespace BMClosedED_Impl
BMClosedEDHome_Servant::BMClosedEDHome_Servant (
::BasicSP::CCM_BMClosedEDHome_ptr exe,
::CIAO::Session_Container *c)
- : executor_ (::BasicSP::CCM_BMClosedEDHome::_duplicate (exe)),
- container_ (c)
+ : CIAO::Home_Servant_Impl_Base (c),
+ home_svnt_base (exe, c)
{
}
@@ -1151,173 +841,6 @@ namespace BMClosedED_Impl
// Home factory and finder operations.
// Home attribute operations.
-
- // Operations for keyless home interface.
-
- ::Components::CCMObject_ptr
- BMClosedEDHome_Servant::create_component (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure))
- {
- return this->create (ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- // Operations for implicit home interface.
-
- ::BasicSP::BMClosedED_ptr
- BMClosedEDHome_Servant::create (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure))
- {
- if (this->executor_.in () == 0)
- {
- ACE_THROW_RETURN (
- ::CORBA::INTERNAL (),
- ::BasicSP::BMClosedED::_nil ());
- }
-
- ::Components::EnterpriseComponent_var _ciao_ec =
- this->executor_->create (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMClosedED::_nil ());
-
- ::BasicSP::CCM_BMClosedED_var _ciao_comp =
- ::BasicSP::CCM_BMClosedED::_narrow (
- _ciao_ec.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMClosedED::_nil ());
-
- return this->_ciao_activate_component (
- _ciao_comp.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- // Operations for CCMHome interface.
-
- ::CORBA::IRObject_ptr
- BMClosedEDHome_Servant::get_component_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- ::CORBA::IRObject_ptr
- BMClosedEDHome_Servant::get_home_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- void
- BMClosedEDHome_Servant::remove_component (
- ::Components::CCMObject_ptr comp
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure))
- {
- ::BasicSP::BMClosedED_var _ciao_comp =
- ::BasicSP::BMClosedED::_narrow (
- comp
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (_ciao_comp.in ()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- _ciao_comp->remove (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->_ciao_passivate_component (
- _ciao_comp.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- // CIAO-specific operations.
-
- ::BasicSP::BMClosedED_ptr
- BMClosedEDHome_Servant::_ciao_activate_component (
- ::BasicSP::CCM_BMClosedED_ptr exe
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::CORBA::Object_var hobj =
- this->container_->get_objref (
- this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMClosedED::_nil ());
-
- ::Components::CCMHome_var home =
- ::Components::CCMHome::_narrow (
- hobj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMClosedED::_nil ());
-
- BMClosedED_Servant *svt =
- new BMClosedED_Servant (
- exe,
- home.in (),
- this->container_);
-
- PortableServer::ServantBase_var safe (svt);
- PortableServer::ObjectId_var oid;
-
- CORBA::Object_var objref =
- this->container_->install_component (
- svt,
- oid.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMClosedED::_nil ());
-
- ::BasicSP::BMClosedED_var ho =
- ::BasicSP::BMClosedED::_narrow (
- objref.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMClosedED::_nil ());
-
- if (this->component_map_.bind (oid.in (), svt) == 0)
- {
- safe._retn ();
- }
-
- return ho._retn ();
- }
-
- void
- BMClosedEDHome_Servant::_ciao_passivate_component (
- ::BasicSP::BMClosedED_ptr comp
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- PortableServer::ObjectId_var oid;
-
- this->container_->uninstall_component (
- comp,
- oid.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- BMClosedED_Servant *servant = 0;
-
- if (this->component_map_.unbind (oid.in (), servant) == 0)
- {
- PortableServer::ServantBase_var safe (servant);
-
- servant->_ciao_passivate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
}
extern "C" BMCLOSEDED_SVNT_Export ::PortableServer::Servant
diff --git a/TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.h b/TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.h
index 4126c7ec2e9..e88c33f8c63 100644
--- a/TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.h
+++ b/TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.h
@@ -31,8 +31,8 @@
#include "ciao/Container_Base.h"
#include "ciao/Servant_Impl_T.h"
-#include "tao/LocalObject.h"
-#include "tao/PortableServer/Key_Adapters.h"
+#include "ciao/Context_Impl_T.h"
+#include "ciao/Home_Servant_Impl_T.h"
#include "ace/Active_Map_Manager_T.h"
#include "../BasicSPS.h"
@@ -79,14 +79,28 @@ namespace BMClosedED_Impl
namespace CIAO_GLUE_BasicSP
{
+ class BMClosedED_Servant;
+
class BMCLOSEDED_SVNT_Export BMClosedED_Context
- : public virtual ::BasicSP::CCM_BMClosedED_Context,
- public virtual TAO_Local_RefCounted_Object
+ : public virtual CIAO::Context_Impl<
+ ::BasicSP::CCM_BMClosedED_Context,
+ BMClosedED_Servant,
+ ::BasicSP::BMClosedED,
+ ::BasicSP::BMClosedED_var
+ >
{
public:
// We will allow the servant glue code we generate to access our state.
friend class BMClosedED_Servant;
+ /// Hack for VC6.
+ typedef CIAO::Context_Impl<
+ ::BasicSP::CCM_BMClosedED_Context,
+ BMClosedED_Servant,
+ ::BasicSP::BMClosedED,
+ ::BasicSP::BMClosedED_var
+ > ctx_svnt_base;
+
BMClosedED_Context (
::Components::CCMHome_ptr home,
::CIAO::Session_Container *c,
@@ -94,54 +108,6 @@ namespace BMClosedED_Impl
virtual ~BMClosedED_Context (void);
- // Operations from ::Components::CCMContext.
-
- virtual ::Components::Principal_ptr
- get_caller_principal (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::CCMHome_ptr
- get_CCM_home (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::Boolean
- get_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- virtual ::Components::Transaction::UserTransaction_ptr
- get_user_transaction (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- virtual CORBA::Boolean
- is_caller_in_role (
- const char *role
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- set_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- // Operations from ::Components::SessionContext interface.
-
- virtual CORBA::Object_ptr
- get_CCM_object (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
// Operations for BMClosedED receptacles and event sources,
// defined in ::BasicSP::CCM_BMClosedED_Context.
@@ -158,9 +124,6 @@ namespace BMClosedED_Impl
// CIAO-specific.
- ::CIAO::Session_Container *
- _ciao_the_Container (void) const;
-
static BMClosedED_Context *
_narrow (
::Components::SessionContext_ptr p
@@ -209,12 +172,6 @@ namespace BMClosedED_Impl
ACE_Active_Map_Manager<
::BasicSP::DataAvailableConsumer_var>
ciao_publishes_out_avail_map_;
-
- ::Components::CCMHome_var home_;
- ::CIAO::Session_Container *container_;
-
- BMClosedED_Servant *servant_;
- ::BasicSP::BMClosedED_var component_;
};
}
@@ -226,17 +183,16 @@ namespace BMClosedED_Impl
::BasicSP::CCM_BMClosedED,
::BasicSP::CCM_BMClosedED_var,
BMClosedED_Context
- >,
- public virtual PortableServer::RefCountServantBase
+ >
{
public:
- /// Hack for VC6 the most sucky compiler
+ /// Hack for VC6.
typedef CIAO::Servant_Impl<
POA_BasicSP::BMClosedED,
::BasicSP::CCM_BMClosedED,
::BasicSP::CCM_BMClosedED_var,
BMClosedED_Context
- > our_base;
+ > comp_svnt_base;
BMClosedED_Servant (
::BasicSP::CCM_BMClosedED_ptr executor,
@@ -343,24 +299,6 @@ namespace BMClosedED_Impl
// Component attribute operations.
- // Operations for Navigation interface.
-
- virtual CORBA::Object_ptr
- provide_facet (
- const char *name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::FacetDescriptions *
- get_named_facets (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
// Operations for Receptacles interface.
virtual ::Components::Cookie *
@@ -387,37 +325,8 @@ namespace BMClosedED_Impl
::Components::CookieRequired,
::Components::NoConnection));
- virtual ::Components::ConnectionDescriptions *
- get_connections (
- const char *name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::ReceptacleDescriptions *
- get_all_receptacles (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::ReceptacleDescriptions *
- get_named_receptacles (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
// Operations for Events interface.
- virtual ::Components::EventConsumerBase_ptr
- get_consumer (
- const char *sink_name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
virtual ::Components::Cookie *
subscribe (
const char *publisher_name,
@@ -450,80 +359,6 @@ namespace BMClosedED_Impl
::Components::AlreadyConnected,
::Components::InvalidConnection));
- virtual ::Components::EventConsumerBase_ptr
- disconnect_consumer (
- const char *source_name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName,
- ::Components::NoConnection));
-
- virtual ::Components::ConsumerDescriptions *
- get_named_consumers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::EmitterDescriptions *
- get_all_emitters (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::EmitterDescriptions *
- get_named_emitters(
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::PublisherDescriptions *
- get_all_publishers (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::PublisherDescriptions *
- get_named_publishers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- // Operations for CCMObject interface.
-
- virtual void
- component_UUID (
- const char * new_component_UUID
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CIAO::CONNECTION_ID
- component_UUID (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual CORBA::IRObject_ptr
- get_component_def (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- configuration_complete (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConfiguration));
-
- virtual void
- remove (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure));
-
// CIAO specific operations on the servant
CORBA::Object_ptr
get_facet_executor (const char *name
@@ -555,21 +390,40 @@ namespace BMClosedED_Impl
get_consumer_in_avail_i (
ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
-
- ACE_CString component_UUID_;
};
}
namespace CIAO_GLUE_BasicSP
{
class BMCLOSEDED_SVNT_Export BMClosedEDHome_Servant
- : public virtual POA_BasicSP::BMClosedEDHome,
- public virtual PortableServer::RefCountServantBase
+ : public virtual CIAO::Home_Servant_Impl<
+ POA_BasicSP::BMClosedEDHome,
+ ::BasicSP::CCM_BMClosedEDHome,
+ ::BasicSP::CCM_BMClosedEDHome_var,
+ ::BasicSP::BMClosedED,
+ ::BasicSP::BMClosedED_var,
+ ::BasicSP::CCM_BMClosedED,
+ ::BasicSP::CCM_BMClosedED_var,
+ BMClosedED_Servant
+ >
{
public:
+ /// Hack for VC6.
+ typedef CIAO::Home_Servant_Impl<
+ POA_BasicSP::BMClosedEDHome,
+ ::BasicSP::CCM_BMClosedEDHome,
+ ::BasicSP::CCM_BMClosedEDHome_var,
+ ::BasicSP::BMClosedED,
+ ::BasicSP::BMClosedED_var,
+ ::BasicSP::CCM_BMClosedED,
+ ::BasicSP::CCM_BMClosedED_var,
+ BMClosedED_Servant
+ > home_svnt_base;
+
BMClosedEDHome_Servant (
::BasicSP::CCM_BMClosedEDHome_ptr exe,
::CIAO::Session_Container *c);
+
virtual ~BMClosedEDHome_Servant (void);
// Home operations.
@@ -577,76 +431,6 @@ namespace BMClosedED_Impl
// Home factory and finder operations.
// Attribute operations.
-
- // Operations for keyless home interface.
-
- virtual ::Components::CCMObject_ptr
- create_component (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure));
-
- // Operations for implicit home interface.
-
- virtual ::BasicSP::BMClosedED_ptr
- create (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure));
-
- // Operations for CCMHome interface.
-
- virtual ::CORBA::IRObject_ptr
- get_component_def (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::CORBA::IRObject_ptr
- get_home_def (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- remove_component (
- ::Components::CCMObject_ptr comp
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure));
-
- // Supported operations.
-
- protected:
- // CIAO-specific operations.
-
- ::BasicSP::BMClosedED_ptr
- _ciao_activate_component (
- ::BasicSP::CCM_BMClosedED_ptr exe
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void
- _ciao_passivate_component (
- ::BasicSP::BMClosedED_ptr comp
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- protected:
- ::BasicSP::CCM_BMClosedEDHome_var
- executor_;
-
- ::CIAO::Session_Container *
- container_;
-
- ACE_Hash_Map_Manager_Ex<
- PortableServer::ObjectId,
- BMClosedED_Servant *,
- TAO_ObjectId_Hash,
- ACE_Equal_To<PortableServer::ObjectId>,
- ACE_SYNCH_MUTEX>
- component_map_;
};
extern "C" BMCLOSEDED_SVNT_Export ::PortableServer::Servant
diff --git a/TAO/CIAO/DAnCE/examples/EC_Benchmark/Consumer/Consumer_exec.cpp b/TAO/CIAO/DAnCE/examples/EC_Benchmark/Consumer/Consumer_exec.cpp
index e50238e2ef4..cf120d10301 100644
--- a/TAO/CIAO/DAnCE/examples/EC_Benchmark/Consumer/Consumer_exec.cpp
+++ b/TAO/CIAO/DAnCE/examples/EC_Benchmark/Consumer/Consumer_exec.cpp
@@ -1,7 +1,7 @@
// $Id$
#include "ciao/CIAO_common.h"
-#include "BMDevice_exec.h"
+#include "Consumer_exec.h"
#define DISPLACEMENT 256
diff --git a/TAO/CIAO/DAnCE/examples/EC_Benchmark/EC_Benchmark.idl b/TAO/CIAO/DAnCE/examples/EC_Benchmark/EC_Benchmark.idl
index 431b6960ee0..859aa694eda 100644
--- a/TAO/CIAO/DAnCE/examples/EC_Benchmark/EC_Benchmark.idl
+++ b/TAO/CIAO/DAnCE/examples/EC_Benchmark/EC_Benchmark.idl
@@ -17,6 +17,15 @@
module EC_Benchmark
{
/**
+ * @interface Producer component
+ */
+ interface trigger
+ {
+ void start ();
+ void stop ();
+ };
+
+ /**
* @eventtype Events that represent timeouts
*/
eventtype TimeOut {};
diff --git a/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer.idl b/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer.idl
index a857a603d88..b428da022d7 100644
--- a/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer.idl
+++ b/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer.idl
@@ -16,12 +16,6 @@
module EC_Benchmark
{
- interface trigger
- {
- void start ();
- void stop ();
- };
-
component Producer supports trigger
{
publishes TimeOut timeout;
diff --git a/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_exec.h b/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_exec.h
index c0181bdf37c..1acd7cc92f6 100644
--- a/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_exec.h
+++ b/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_exec.h
@@ -2,80 +2,32 @@
//============================================================
/**
- * @file EC_exec.h
+ * @file Producer_exec.h
*
- * Header file for the actualy EC and ECHome component
+ * Header file for the actualy Producer and ProducerHome component
* implementation.
*
- * @author Balachandran Natarajan <bala@dre.vanderbilt.edu>
+ * @author Gan Deng <gan.deng@vanderbilt.edu>
*/
//============================================================
-#ifndef EC_EXEC_H
-#define EC_EXEC_H
+#ifndef PRODUCER_EXEC_H
+#define PRODUCER_EXEC_H
-#include "ECEIC.h"
-#include "tao/LocalObject.h"
-#include "ace/Thread_Manager.h"
-#include "ace/Task.h"
-
-namespace MyImpl
-{
- // Forward decl.
- class EC_exec_i;
-
- /**
- * @brief Active pulse generater
- */
- class timeout_Handler : public ACE_Task_Base
- {
- public:
- // Default constructor
- timeout_Handler (EC_exec_i *cb);
- ~timeout_Handler ();
-
- int open (void);
-
- int close (void);
-
- int start (CORBA::Long hertz);
+#include "SenderEC.h"
+#include "Sender_exec_export.h"
- int stop (void);
-
- int active (void);
-
- // Handle the timeout.
- virtual int handle_timeout (const ACE_Time_Value &tv,
- const void *arg);
-
- // Called when <Time_Handler> is removed.
- virtual int handle_close (ACE_HANDLE handle,
- ACE_Reactor_Mask close_mask);
-
- virtual int svc (void);
-
- private:
- /// Tracking whether we are actively generating pulse or not.
- long active_;
-
- /// Flag to indicate completion of this active object.
- int done_;
-
- /// The timer id we are waiting.
- int tid_;
-
- EC_exec_i *pulse_callback_;
+#include "tao/LocalObject.h"
- ACE_Thread_Manager thr_mgr_;
- };
+namespace Producer_Impl
/**
- * @class EC_exec_i
+ * @class Producer_exec_i
*
- * EC executor implementation class.
+ * Producer executor implementation class.
*/
- class EC_EXEC_Export EC_exec_i :
- public virtual BasicSP::EC_Exec,
+ class PRODUCER_EXEC_Export Producer_exec_i :
+ public virtual EC_Benchmark::Producer_Exec,
public virtual TAO_Local_RefCounted_Object
{
public:
diff --git a/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_svnt.h b/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_svnt.h
index 4b8d8615262..b15684c392e 100644
--- a/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_svnt.h
+++ b/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_svnt.h
@@ -406,6 +406,8 @@ namespace Producer_Impl
populate_port_tables (
ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
+
+ ACE_CString component_UUID_;
};
}