diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-06-04 11:15:22 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-06-04 11:15:22 +0000 |
commit | a4e116e478ae385d95cc17b681e92b8b31f1da77 (patch) | |
tree | 30ac4222027a3c71c9c2e16cede6034eb93ae280 | |
parent | c8660eceadf15f97e24db8d811245c8541016287 (diff) | |
download | ATCD-a4e116e478ae385d95cc17b681e92b8b31f1da77.tar.gz |
Thu Jun 4 11:15:50 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* orbsvcs/Notify_Service/Notify_Service.cpp:
Another set of cleanup improvements
* orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp:
Added a missing \n
* orbsvcs/tests/Notify/Bug_3646d_Regression/server.cpp:
Use a loop and more worker threads
-rw-r--r-- | TAO/ChangeLog | 11 | ||||
-rw-r--r-- | TAO/orbsvcs/Notify_Service/Notify_Service.cpp | 27 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Bug_3646d_Regression/server.cpp | 33 |
4 files changed, 45 insertions, 28 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 51e7443b99a..9070ca032dc 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,14 @@ +Thu Jun 4 11:15:50 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl> + + * orbsvcs/Notify_Service/Notify_Service.cpp: + Another set of cleanup improvements + + * orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp: + Added a missing \n + + * orbsvcs/tests/Notify/Bug_3646d_Regression/server.cpp: + Use a loop and more worker threads + Thu Jun 4 10:17:50 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl> * orbsvcs/Notify_Service/Notify_Service.cpp: diff --git a/TAO/orbsvcs/Notify_Service/Notify_Service.cpp b/TAO/orbsvcs/Notify_Service/Notify_Service.cpp index 3aac53c7b46..4a8b221ae11 100644 --- a/TAO/orbsvcs/Notify_Service/Notify_Service.cpp +++ b/TAO/orbsvcs/Notify_Service/Notify_Service.cpp @@ -343,7 +343,7 @@ TAO_Notify_Service_Driver::run (void) if (this->nthreads_ > 0) { - worker_.wait (); + this->worker_.wait (); return 0; } else @@ -365,7 +365,6 @@ TAO_Notify_Service_Driver::fini (void) CORBA::ORB_var dispatching_orb = this->dispatching_orb_._retn (); PortableServer::POA_var poa = this->poa_._retn (); CosNaming::NamingContextExt_var naming = this->naming_._retn (); - worker_.orb (CORBA::ORB::_nil ()); // This must be called to ensure that all services shut down // correctly. Depending upon the type of service loaded, it may @@ -403,24 +402,38 @@ TAO_Notify_Service_Driver::fini (void) poa->destroy (true, true); poa = PortableServer::POA::_nil (); } - + if (this->shutdown_dispatching_orb_ && !CORBA::is_nil (dispatching_orb_.in ())) { dispatching_orb->shutdown (); - - dispatching_orb->destroy (); } - dispatching_orb_ = CORBA::ORB::_nil (); - // shutdown the ORB. if (this->shutdown_orb_ && !CORBA::is_nil (orb.in ())) { orb->shutdown (); + } + + // Make sure all worker threads are gone. + this->worker_.wait (); + this->logging_worker_.wait (); + + // Destroy the ORB + if (this->shutdown_dispatching_orb_ && !CORBA::is_nil (dispatching_orb_.in ())) + { + dispatching_orb->destroy (); + } + // Destroy the ORB. + if (this->shutdown_orb_ && !CORBA::is_nil (orb.in ())) + { orb->destroy (); } + dispatching_orb_ = CORBA::ORB::_nil (); + + worker_.orb (CORBA::ORB::_nil ()); + orb = CORBA::ORB::_nil (); return 0; diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp index e615a5c588a..462aa969035 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp @@ -515,7 +515,7 @@ TAO_Notify_EventChannelFactory::activate_self (void) { if (DEBUG_LEVEL > 9) { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) TAO_Notify_EventChannelFactory::activate_self") )); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) TAO_Notify_EventChannelFactory::activate_self\n") )); } this->reconnect (); } diff --git a/TAO/orbsvcs/tests/Notify/Bug_3646d_Regression/server.cpp b/TAO/orbsvcs/tests/Notify/Bug_3646d_Regression/server.cpp index 6b675c8866b..cd124d8fed8 100644 --- a/TAO/orbsvcs/tests/Notify/Bug_3646d_Regression/server.cpp +++ b/TAO/orbsvcs/tests/Notify/Bug_3646d_Regression/server.cpp @@ -22,7 +22,7 @@ ACE_TCHAR const * const scpc_loadNotifyService = ACE_DYNAMIC_SERVICE_DIRECTIVE( "testNotifyService", "TAO_Notify_Service", "_make_TAO_Notify_Service_Driver", - "-Channel -ChannelName Channel1 -ChannelName Channel2 -RunThreads 1 -ORBInitRef NameService=file://naming.ior -IORoutput notify.ior" + "-Channel -ChannelName Channel1 -ChannelName Channel2 -RunThreads 10 -ORBInitRef NameService=file://naming.ior -IORoutput notify.ior" ); ACE_TCHAR const * const scpc_unloadNotifyService = ACE_REMOVE_SERVICE_DIRECTIVE("testNotifyService"); @@ -128,25 +128,18 @@ int ACE_TMAIN (int , ACE_TCHAR **) ACE_TEXT ("(%P|%t) main - entered\n") )); - ACE_DEBUG(( - LM_DEBUG, - ACE_TEXT ("(%P|%t) main - cycle 1 ...\n") - )); - loadunloadcycle(); - ACE_DEBUG(( - LM_DEBUG, - ACE_TEXT ("(%P|%t) main - cycle 1 done\n") - )); - - ACE_DEBUG(( - LM_DEBUG, - ACE_TEXT ("(%P|%t) main - cycle 2 ...\n") - )); - loadunloadcycle(); - ACE_DEBUG(( - LM_DEBUG, - ACE_TEXT ("(%P|%t) main - cycle 2 done\n") - )); + for (int cnt = 0, max = 10; cnt < max; ++cnt) + { + ACE_DEBUG(( + LM_DEBUG, + ACE_TEXT ("(%P|%t) main - cycle %d ...\n"), cnt + )); + loadunloadcycle(); + ACE_DEBUG(( + LM_DEBUG, + ACE_TEXT ("(%P|%t) main - cycle %d done\n"), cnt + )); + } ACE_DEBUG(( LM_DEBUG, |