diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp | 67 |
1 files changed, 21 insertions, 46 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp index 2cf855c3009..7358af79f29 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp @@ -1,23 +1,22 @@ // $Id$ -#include "orbsvcs/Notify/EventChannelFactory.h" +#include "EventChannelFactory.h" ACE_RCSID(Notify, TAO_Notify_EventChannelFactory, "$Id$") -#include "orbsvcs/Notify/Properties.h" -#include "orbsvcs/Notify/Factory.h" -#include "orbsvcs/Notify/Builder.h" -#include "orbsvcs/Notify/Topology_Saver.h" -#include "orbsvcs/Notify/Topology_Loader.h" -#include "orbsvcs/Notify/Save_Persist_Worker_T.h" -#include "orbsvcs/Notify/Reconnect_Worker_T.h" -#include "orbsvcs/Notify/Event_Persistence_Strategy.h" -#include "orbsvcs/Notify/Routing_Slip_Persistence_Manager.h" -#include "orbsvcs/Notify/EventChannel.h" -#include "orbsvcs/Notify/Container_T.h" -#include "orbsvcs/Notify/Find_Worker_T.h" -#include "orbsvcs/Notify/Seq_Worker_T.h" -#include "orbsvcs/Notify/POA_Helper.h" +#include "Properties.h" +#include "Factory.h" +#include "Builder.h" +#include "Topology_Saver.h" +#include "Topology_Loader.h" +#include "Save_Persist_Worker_T.h" +#include "Reconnect_Worker_T.h" +#include "Event_Persistence_Strategy.h" +#include "Routing_Slip_Persistence_Manager.h" +#include "EventChannel.h" +#include "Container_T.h" +#include "Find_Worker_T.h" +#include "Seq_Worker_T.h" #include "ace/Dynamic_Service.h" @@ -27,18 +26,6 @@ ACE_RCSID(Notify, TAO_Notify_EventChannelFactory, "$Id$") # define DEBUG_LEVEL TAO_debug_level #endif //DEBUG_LEVEL -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -// Include this here since this is the only file that -// requires Topology_Factory. -namespace TAO_Notify -{ - // virtual - Topology_Factory::~Topology_Factory () - { - } -} - typedef TAO_Notify_Find_Worker_T<TAO_Notify_EventChannel , CosNotifyChannelAdmin::EventChannel , CosNotifyChannelAdmin::EventChannel_ptr @@ -52,6 +39,7 @@ TAO_Notify_EventChannelFactory::TAO_Notify_EventChannelFactory (void) , topology_factory_(0) , reconnect_registry_(*this) , loading_topology_ (false) + { } @@ -65,9 +53,7 @@ TAO_Notify_EventChannelFactory::destroy (ACE_ENV_SINGLE_ARG_DECL) CORBA::SystemException )) { - int result = this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - if ( result == 1) + if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1) return; TAO_Notify_Properties* properties = TAO_Notify_PROPERTIES::instance(); @@ -75,8 +61,6 @@ TAO_Notify_EventChannelFactory::destroy (ACE_ENV_SINGLE_ARG_DECL) // Reset references to CORBA objects. properties->orb (CORBA::ORB::_nil ()); properties->default_poa (PortableServer::POA::_nil ()); - - ec_container_.reset( 0 ); } void @@ -107,7 +91,7 @@ TAO_Notify_EventChannelFactory::init (PortableServer::POA_ptr poa ACE_ENV_ARG_DE CORBA::NO_MEMORY ()); ACE_CHECK; - ACE_Auto_Ptr<TAO_Notify_POA_Helper> auto_object_poa (object_poa); + auto_ptr<TAO_Notify_POA_Helper> auto_object_poa (object_poa); object_poa->init (poa ACE_ENV_ARG_PARAMETER); ACE_CHECK; @@ -156,10 +140,7 @@ TAO_Notify_EventChannelFactory::remove (TAO_Notify_EventChannel* event_channel A int TAO_Notify_EventChannelFactory::shutdown (ACE_ENV_SINGLE_ARG_DECL) { - int sd_ret = TAO_Notify_Object::shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (1); - - if (sd_ret == 1) + if (TAO_Notify_Object::shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1) return 1; this->ec_container().shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); @@ -191,9 +172,9 @@ TAO_Notify_EventChannelFactory::get_default_filter_factory (ACE_ENV_SINGLE_ARG_D , initial_admin , id ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannel::_nil()); + ACE_CHECK_RETURN (ec._retn ()); this->self_change (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannel::_nil()); + ACE_CHECK_RETURN (ec._retn ()); return ec._retn (); } @@ -238,7 +219,6 @@ TAO_Notify_EventChannelFactory::load_topology (ACE_ENV_SINGLE_ARG_DECL) this->loading_topology_ = true; if (this->topology_factory_ != 0) { - // create_loader will open and load the persistence file for validation auto_ptr<TAO_Notify::Topology_Loader> tl(this->topology_factory_->create_loader()); if (tl.get () != 0) { @@ -357,7 +337,6 @@ TAO_Notify_EventChannelFactory::change_to_parent (ACE_ENV_SINGLE_ARG_DECL) this->save_persistent(*saver ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN(false); saver->close (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (false); } this->topology_save_seq_ += 1; } @@ -526,10 +505,7 @@ TAO_Notify_EventChannelFactory::activate_self (ACE_ENV_SINGLE_ARG_DECL) ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannelFactory::_nil ()); this->channel_factory_ = CosNotifyChannelAdmin::EventChannelFactory::_narrow (obj.in() ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannelFactory::_nil ()); - CosNotifyChannelAdmin::EventChannelFactory::_narrow (obj.in() ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannelFactory::_nil ()); - + CosNotifyChannelAdmin::EventChannelFactory::_narrow (obj.in() ACE_ENV_ARG_PARAMETER); ACE_TRY_NEW_ENV { if (DEBUG_LEVEL > 9) @@ -561,4 +537,3 @@ TAO_Notify_EventChannelFactory::ec_container() return *ec_container_; } -TAO_END_VERSIONED_NAMESPACE_DECL |