diff options
author | wilson_d <wilson_d@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-10-29 16:10:47 +0000 |
---|---|---|
committer | wilson_d <wilson_d@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-10-29 16:10:47 +0000 |
commit | 50e18994616f637b3d5444594da771f2318cc0d1 (patch) | |
tree | 19f0ddc17f1db668d1c60dd7b7fade30a7b53e7c /TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp | |
parent | 6b91b5bcda830a14261024b894a483d28b290328 (diff) | |
download | ATCD-pnotify_branch.tar.gz |
ChangeLogTag: Fri Oct 29 10:53:56 2004 Dale Wilson <wilson_d@ociweb.com>pnotify_branch
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp index ad1b3a8661f..14f84bb280e 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp @@ -288,8 +288,6 @@ TAO_Notify_EventChannelFactory::save_persistent (TAO_Notify::Topology_Saver& sav void TAO_Notify_EventChannelFactory::load_event_persistence (ACE_ENV_SINGLE_ARG_DECL) { -#define EVENT_PERISISTENCE_SUPPORT //@@todo -#ifdef EVENT_PERISISTENCE_SUPPORT //@@todo TAO_Notify::Event_Persistence_Strategy * strategy = ACE_Dynamic_Service <TAO_Notify::Event_Persistence_Strategy>::instance ("Event_Persistence"); if (strategy != 0) @@ -329,9 +327,6 @@ TAO_Notify_EventChannelFactory::load_event_persistence (ACE_ENV_SINGLE_ARG_DECL) ACE_CHECK; } } -#else //EVENT_PERISISTENCE_SUPPORT //@@todo -#pragma message ("TODO: EVENT_PERISISTENCE_SUPPORT") -#endif //EVENT_PERISISTENCE_SUPPORT //@@todo } bool @@ -411,13 +406,8 @@ TAO_Notify_EventChannelFactory::reconnect (ACE_ENV_SINGLE_ARG_DECL) ACE_CHECK; // Then send reconnection announcement to registered clients - CORBA::Object_var obj = this->poa()->id_to_reference (this->id () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - CosNotifyChannelAdmin::EventChannelFactory_var this_reference = CosNotifyChannelAdmin::EventChannelFactory::_narrow (obj.in ()); - ACE_ASSERT (CORBA::is_nil (this_reference.in ())); - // todo: Is there an easier way? - this->reconnect_registry_.send_reconnect (this_reference.in () ACE_ENV_ARG_PARAMETER); + ACE_ASSERT (!CORBA::is_nil (this->channel_factory_.in ())); + this->reconnect_registry_.send_reconnect (this->channel_factory_.in () ACE_ENV_ARG_PARAMETER); ACE_CHECK; // reactivate events in-progress @@ -525,6 +515,39 @@ TAO_Notify_EventChannelFactory::find_proxy_supplier (TAO_Notify::IdVec & id_path return result; } +CosNotifyChannelAdmin::EventChannelFactory_ptr +TAO_Notify_EventChannelFactory::activate_self (ACE_ENV_SINGLE_ARG_DECL) +{ + CORBA::Object_var obj = this->activate (this ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannelFactory::_nil ()); + this->channel_factory_ + = CosNotifyChannelAdmin::EventChannelFactory::_narrow (obj.in() ACE_ENV_ARG_PARAMETER); + CosNotifyChannelAdmin::EventChannelFactory::_narrow (obj.in() ACE_ENV_ARG_PARAMETER); + ACE_TRY_NEW_ENV + { + if (DEBUG_LEVEL > 9) + { + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) TAO_Notify_EventChannelFactory::activate_self") )); + } + this->reconnect (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + // ignore for now + } + ACE_ENDTRY; + return this->channel_factory_._retn(); +} + + +TAO_Notify_Object::ID +TAO_Notify_EventChannelFactory::get_id () const +{ + return id(); +} + + #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class TAO_Notify_Find_Worker_T<TAO_Notify_EventChannel |