diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-02-25 18:53:50 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-02-25 18:53:50 +0000 |
commit | 6bd720eec37db769c18fa33c58e5fe03d261ab6e (patch) | |
tree | 2c37b4d0996e929d3c5c0d1cf38eee18c78ea796 | |
parent | eb9324b0ceecde02ed2f4ea3031ad876e60102b9 (diff) | |
download | ATCD-6bd720eec37db769c18fa33c58e5fe03d261ab6e.tar.gz |
ChangeLogTag:Fri Feb 25 10:43:48 2000 Carlos O'Ryan <coryan@uci.edu>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 201 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/CosEvent/CEC_ConsumerAdmin.cpp | 38 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp | 4 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp | 4 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/CosEvent/CEC_SupplierAdmin.cpp | 36 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_Concrete_Proxy_Set.cpp | 37 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp | 43 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h | 6 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp | 42 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp | 44 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_SupplierAdmin.cpp | 17 |
14 files changed, 290 insertions, 188 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 3200ad0b78c..ecbeaca4485 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,133 +1,168 @@ +Fri Feb 25 10:43:48 2000 Carlos O'Ryan <coryan@uci.edu> + + * orbsvcs/orbsvcs/CosEvent/CEC_ConsumerAdmin.cpp: + * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp: + * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp: + * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp: + * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp: + * orbsvcs/orbsvcs/CosEvent/CEC_SupplierAdmin.cpp: + * orbsvcs/orbsvcs/Event/EC_Concrete_Proxy_Set.cpp: + * orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp: + * orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h: + * orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp: + * orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp: + * orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp: + * orbsvcs/orbsvcs/Event/EC_SupplierAdmin.cpp: + Assume that the client invokes obtain_push_consumer() (or any + other obtain_xxx_yyy() call), but never invokes the + corresponding connect_push_consumer() call. + Before this change the only way that object will get destroyed + is by an eventual shutdown, as only the POA is holding a + reference to it. + With the new implementation the EC keeps a reference to it in + the ConsumerAdmin collection, once there the ConsumerControl + strategy can remove the object if it is deemed to have been + there for too long. Notice that the default control strategies + don't do this, but it is relatively easy to add that feature. + This change also simplified the shutdown() and disconnect() + calls for the proxies, and made the code "more exception safe". + This fixes [BUGID:437], and it reduces the probability of + hitting [BUGID:438], even though that last one is very unlikely + to happen in the first place. + Notice how many files where affected, this is a strong argument + for the Event Service Framework, that i'm cooking on the back + burner. + Fri Feb 25 10:49:30 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> - * orbsvcs/orbsvcs/CosConcurrencyControl.idl, - orbsvcs/orbsvcs/RtecDefaultEventData.idl, - orbsvcs/orbsvcs/RtecEventComm.idl: Fixed all three of these - files so that they use the more portable #ifndef FOO rather than - #if !defined (FOO) syntax. Thanks to W. Craig Trader - <ct7@vitelinc.com> for reporting this. + * orbsvcs/orbsvcs/CosConcurrencyControl.idl, + orbsvcs/orbsvcs/RtecDefaultEventData.idl, + orbsvcs/orbsvcs/RtecEventComm.idl: Fixed all three of these + files so that they use the more portable #ifndef FOO rather than + #if !defined (FOO) syntax. Thanks to W. Craig Trader + <ct7@vitelinc.com> for reporting this. Fri Feb 25 08:59:59 2000 Ossama Othman <ossama@uci.edu> - * tao/IIOP_Acceptor.cpp (create_mprofile, open_default): + * tao/IIOP_Acceptor.cpp (create_mprofile, open_default): - Fixed support for hosts with multiple network interfaces. A - profile will be created for each endpoint created on each - network interface. The loopback interface will be excluded, - unless it is the only interface. + Fixed support for hosts with multiple network interfaces. A + profile will be created for each endpoint created on each + network interface. The loopback interface will be excluded, + unless it is the only interface. - (endpoint_count, open, open_i): + (endpoint_count, open, open_i): - Additional minor changes to accomodate the new multi-homed host - support. + Additional minor changes to accomodate the new multi-homed host + support. - * tao/IIOP_Acceptor.h (TAO_IIOP_Acceptor): + * tao/IIOP_Acceptor.h (TAO_IIOP_Acceptor): - Changes in member variables necessary to support multi-homed - hosts (e.g. change from variable to an array, etc). + Changes in member variables necessary to support multi-homed + hosts (e.g. change from variable to an array, etc). - * tao/IIOP_Acceptor.i (address): + * tao/IIOP_Acceptor.i (address): - Return the first addr in the array of ACE_INET_Addrs. This is - a temporary hack. Only the Implementation Repository uses this - method. The Implementation Repository will have to start - supporting IORs with multiple profiles. For now, we just return - the first addr. + Return the first addr in the array of ACE_INET_Addrs. This is + a temporary hack. Only the Implementation Repository uses this + method. The Implementation Repository will have to start + supporting IORs with multiple profiles. For now, we just return + the first addr. - * tao/Makefile.am: + * tao/Makefile.am: - Updated dependencies. + Updated dependencies. Fri Feb 25 10:45:48 2000 Jeff Parsons <parsons@cs.wustl.edu> - * TAO_IDL/include/idl_global.h: - * TAO_IDL/util/utl_global.h: - * TAO_IDL/driver.drv_args.cpp: - * TAO_IDL/be/be_codegen.cpp: - * TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp: - * TAO_IDL/be/be_visitor_exception/cdr_op_ci.cpp: - Added command line option -So to suppress the - generation of ostream operators for exceptions. - Suggested by Greg Holtmeyer <Greg.Holtmeyer@MW.Boeing.com>. + * TAO_IDL/include/idl_global.h: + * TAO_IDL/util/utl_global.h: + * TAO_IDL/driver.drv_args.cpp: + * TAO_IDL/be/be_codegen.cpp: + * TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp: + * TAO_IDL/be/be_visitor_exception/cdr_op_ci.cpp: + Added command line option -So to suppress the + generation of ostream operators for exceptions. + Suggested by Greg Holtmeyer <Greg.Holtmeyer@MW.Boeing.com>. Fri Feb 25 09:44:28 2000 Jeff Parsons <parsons@cs.wustl.edu> - * performance-tests/Latency/dii_client.cpp: - Guarded all pertinent code with - #if !defined (TAO_HAS_MINIMUM_CORBA). If minimum - CORBA is defined, the client code should now just - get and narrow a reference to the server. skip - instantiating the client, and shutdown the server - if that option is selected. + * performance-tests/Latency/dii_client.cpp: + Guarded all pertinent code with + #if !defined (TAO_HAS_MINIMUM_CORBA). If minimum + CORBA is defined, the client code should now just + get and narrow a reference to the server. skip + instantiating the client, and shutdown the server + if that option is selected. Fri Feb 25 09:34:19 2000 Jeff Parsons <parsons@cs.wustl.edu> - * TAO_IDL/be/be_visitor_structure/structure_ch.cpp: - For struct foo, removed typedef of foo_ptr and - foo::_ptr_type. These are not part of the spec. - Thanks to Chris Cleeland <cleeland@cs.wustl.edu> - for pointing this out. + * TAO_IDL/be/be_visitor_structure/structure_ch.cpp: + For struct foo, removed typedef of foo_ptr and + foo::_ptr_type. These are not part of the spec. + Thanks to Chris Cleeland <cleeland@cs.wustl.edu> + for pointing this out. Thu Feb 24 18:33:43 2000 Jeff Parsons <parsons@cs.wustl.edu> - * tests/Param_Test/param_test.idl: - * tests/Param_Test/client.dsp: - * tests/Param_Test/run_test.pl: - * tests/Param_Test/tests.h: - * tests/Param_Test/driver.cpp: - * tests/Param_Test/param_test_i.h: - * tests/Param_Test/param_test_i.cpp: - * tests/Param_Test/multdim_array.h: - * tests/Param_Test/multdim_array.cpp: - Activated the multidimensional array test, which - had been commented out for some time. + * tests/Param_Test/param_test.idl: + * tests/Param_Test/client.dsp: + * tests/Param_Test/run_test.pl: + * tests/Param_Test/tests.h: + * tests/Param_Test/driver.cpp: + * tests/Param_Test/param_test_i.h: + * tests/Param_Test/param_test_i.cpp: + * tests/Param_Test/multdim_array.h: + * tests/Param_Test/multdim_array.cpp: + Activated the multidimensional array test, which + had been commented out for some time. Thu Feb 24 18:21:42 2000 Jeff Parsons <parsons@cs.wustl.edu> - * TAO_IDL/be/be_visitor_argument/upcall_ss.cpp: - If a multidimensional array 'foo' is an IN parameter to an - operation, some compilers have trouble with the - implicit cast to const. We now help them out by casting - (multidimensional arrays only) the IN argument to - const foo_slice * before making the upcall. + * TAO_IDL/be/be_visitor_argument/upcall_ss.cpp: + If a multidimensional array 'foo' is an IN parameter to an + operation, some compilers have trouble with the + implicit cast to const. We now help them out by casting + (multidimensional arrays only) the IN argument to + const foo_slice * before making the upcall. Thu Feb 24 16:25:04 2000 Yamuna Krishnamurthy <yamuna@cs.wustl.edu> - * orbsvcs/tests/AVStreams/mpeg/source/server/Machine_Properties.cpp: - * orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp: - Fixed compile errors on RedHat Linux platform. Thanks to Sandeep - Adwankar <adwankar@rsch.comm.mot.com> for pointing this out. + * orbsvcs/tests/AVStreams/mpeg/source/server/Machine_Properties.cpp: + * orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp: + Fixed compile errors on RedHat Linux platform. Thanks to Sandeep + Adwankar <adwankar@rsch.comm.mot.com> for pointing this out. Thu Feb 24 10:49:32 2000 Ossama Othman <ossama@uci.edu> - * tao/ORB_Core.cpp (init): + * tao/ORB_Core.cpp (init): - Fixed the reason why the seg fault when printing a warning about - an unknown "-ORB" option was occuring in the first place. - "current_arg" was not being set to the current argument. + Fixed the reason why the seg fault when printing a warning about + an unknown "-ORB" option was occuring in the first place. + "current_arg" was not being set to the current argument. Thu Feb 24 09:29:19 2000 Ossama Othman <ossama@uci.edu> - * tao/ORB_Core.cpp (init): + * tao/ORB_Core.cpp (init): - Fixed seg fault that was occurring due to attempt to print a - NULL string (zero pointer). Print "<NULL>" if the pointer to - the current argument is zero. The seg fault occurred when - providing a command such as the following: + Fixed seg fault that was occurring due to attempt to print a + NULL string (zero pointer). Print "<NULL>" if the pointer to + the current argument is zero. The seg fault occurred when + providing a command such as the following: - ./server -ORBDebugLevel 6 -ORBDottedDecimalAddress + ./server -ORBDebugLevel 6 -ORBDottedDecimalAddress - The "-ORBDottedDecimalAddress" option is missing its argument. + The "-ORBDottedDecimalAddress" option is missing its argument. - * tao/POA.cpp (imr_notify_startup): + * tao/POA.cpp (imr_notify_startup): - Corrected spelling of "Notifing." + Corrected spelling of "Notifing." Thu Feb 24 01:32:00 2000 Nanbor Wang <nanbor@cs.wustl.edu> - * tao/Object.cpp (_non_existent): The collocated servant also - throws exception. Moved it into the try block. Thanks to Brian - Wright <bwright@paladyne.com> for reporting this. + * tao/Object.cpp (_non_existent): The collocated servant also + throws exception. Moved it into the try block. Thanks to Brian + Wright <bwright@paladyne.com> for reporting this. Wed Feb 23 18:35:41 2000 Carlos O'Ryan <coryan@uci.edu> diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ConsumerAdmin.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ConsumerAdmin.cpp index 21adda3414f..c6b4be70e73 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ConsumerAdmin.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ConsumerAdmin.cpp @@ -55,31 +55,31 @@ TAO_CEC_ConsumerAdmin::push (const CORBA::Any &event, } void -TAO_CEC_ConsumerAdmin::connected (TAO_CEC_ProxyPushSupplier *supplier, - CORBA::Environment &ACE_TRY_ENV) +TAO_CEC_ConsumerAdmin::connected (TAO_CEC_ProxyPushSupplier * /*supplier*/, + CORBA::Environment & /*ACE_TRY_ENV*/) { - this->push_collection_->connected (supplier, ACE_TRY_ENV); + // this->push_collection_->connected (supplier, ACE_TRY_ENV); } void TAO_CEC_ConsumerAdmin::reconnected (TAO_CEC_ProxyPushSupplier *supplier, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Environment &ACE_TRY_ENV) { this->push_collection_->reconnected (supplier, ACE_TRY_ENV); } void TAO_CEC_ConsumerAdmin::disconnected (TAO_CEC_ProxyPushSupplier *supplier, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Environment &ACE_TRY_ENV) { this->push_collection_->disconnected (supplier, ACE_TRY_ENV); } void -TAO_CEC_ConsumerAdmin::connected (TAO_CEC_ProxyPullSupplier *supplier, - CORBA::Environment &ACE_TRY_ENV) +TAO_CEC_ConsumerAdmin::connected (TAO_CEC_ProxyPullSupplier * /*supplier*/, + CORBA::Environment & /*ACE_TRY_ENV*/) { - this->pull_collection_->connected (supplier, ACE_TRY_ENV); + // this->pull_collection_->connected (supplier, ACE_TRY_ENV); } void @@ -121,7 +121,16 @@ TAO_CEC_ConsumerAdmin::obtain_push_supplier (CORBA::Environment &ACE_TRY_ENV) TAO_CEC_ProxyPushSupplier* supplier = this->event_channel_->create_proxy_push_supplier (); - return supplier->_this (ACE_TRY_ENV); + PortableServer::ServantBase_var holder = supplier; + + CosEventChannelAdmin::ProxyPushSupplier_var result = + supplier->_this (ACE_TRY_ENV); + ACE_CHECK_RETURN (CosEventChannelAdmin::ProxyPushSupplier::_nil ()); + + this->push_collection_->connected (supplier, ACE_TRY_ENV); + ACE_CHECK_RETURN (CosEventChannelAdmin::ProxyPushSupplier::_nil ()); + + return result._retn (); } CosEventChannelAdmin::ProxyPullSupplier_ptr @@ -131,7 +140,16 @@ TAO_CEC_ConsumerAdmin::obtain_pull_supplier (CORBA::Environment &ACE_TRY_ENV) TAO_CEC_ProxyPullSupplier* supplier = this->event_channel_->create_proxy_pull_supplier (); - return supplier->_this (ACE_TRY_ENV); + PortableServer::ServantBase_var holder = supplier; + + CosEventChannelAdmin::ProxyPullSupplier_var result = + supplier->_this (ACE_TRY_ENV); + ACE_CHECK_RETURN (CosEventChannelAdmin::ProxyPullSupplier::_nil ()); + + this->pull_collection_->connected (supplier, ACE_TRY_ENV); + ACE_CHECK_RETURN (CosEventChannelAdmin::ProxyPullSupplier::_nil ()); + + return result._retn (); } PortableServer::POA_ptr diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp index 46f2df0eb7d..77584bfec41 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullConsumer.cpp @@ -325,8 +325,6 @@ TAO_CEC_ProxyPullConsumer::disconnect_pull_consumer ( } ACE_ENDTRY; } - - this->_decr_refcnt (); } PortableServer::POA_ptr diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp index 4315d61d112..f25c142c2b5 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp @@ -54,8 +54,6 @@ TAO_CEC_ProxyPullSupplier::shutdown (CORBA::Environment &ACE_TRY_ENV) this->deactivate (ACE_TRY_ENV); ACE_CHECK; - this->_decr_refcnt (); - ACE_TRY { consumer->disconnect_pull_consumer (ACE_TRY_ENV); @@ -290,8 +288,6 @@ TAO_CEC_ProxyPullSupplier::disconnect_pull_supplier ( } ACE_ENDTRY; } - - this->_decr_refcnt (); } PortableServer::POA_ptr diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp index cb0cc1f2df1..b71e69db0a3 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp @@ -266,8 +266,6 @@ TAO_CEC_ProxyPushConsumer::disconnect_push_consumer ( } ACE_ENDTRY; } - - this->_decr_refcnt (); } PortableServer::POA_ptr diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp index 301f331589f..b1a63a5c84a 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp @@ -54,8 +54,6 @@ TAO_CEC_ProxyPushSupplier::shutdown (CORBA::Environment &ACE_TRY_ENV) this->deactivate (ACE_TRY_ENV); ACE_CHECK; - this->_decr_refcnt (); - ACE_TRY { consumer->disconnect_push_consumer (ACE_TRY_ENV); @@ -229,8 +227,6 @@ TAO_CEC_ProxyPushSupplier::disconnect_push_supplier ( } ACE_ENDTRY; } - - this->_decr_refcnt (); } void diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_SupplierAdmin.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_SupplierAdmin.cpp index e66f58ab334..aef942bfee7 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_SupplierAdmin.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_SupplierAdmin.cpp @@ -46,10 +46,10 @@ TAO_CEC_SupplierAdmin::_default_POA (CORBA::Environment&) } void -TAO_CEC_SupplierAdmin::connected (TAO_CEC_ProxyPushConsumer *consumer, - CORBA::Environment &ACE_TRY_ENV) +TAO_CEC_SupplierAdmin::connected (TAO_CEC_ProxyPushConsumer * /*consumer*/, + CORBA::Environment & /*ACE_TRY_ENV*/) { - this->push_collection_->connected (consumer, ACE_TRY_ENV); + // this->push_collection_->connected (consumer, ACE_TRY_ENV); } void @@ -67,10 +67,10 @@ TAO_CEC_SupplierAdmin::disconnected (TAO_CEC_ProxyPushConsumer *consumer, } void -TAO_CEC_SupplierAdmin::connected (TAO_CEC_ProxyPullConsumer *consumer, - CORBA::Environment &ACE_TRY_ENV) +TAO_CEC_SupplierAdmin::connected (TAO_CEC_ProxyPullConsumer * /*consumer*/, + CORBA::Environment & /*ACE_TRY_ENV*/) { - this->pull_collection_->connected (consumer, ACE_TRY_ENV); + // this->pull_collection_->connected (consumer, ACE_TRY_ENV); } void @@ -112,17 +112,35 @@ TAO_CEC_SupplierAdmin::obtain_push_consumer (CORBA::Environment &ACE_TRY_ENV) TAO_CEC_ProxyPushConsumer* consumer = this->event_channel_->create_proxy_push_consumer (); - return consumer->_this (ACE_TRY_ENV); + PortableServer::ServantBase_var holder = consumer; + + CosEventChannelAdmin::ProxyPushConsumer_var result = + consumer->_this (ACE_TRY_ENV); + ACE_CHECK_RETURN (CosEventChannelAdmin::ProxyPushConsumer::_nil ()); + + this->push_collection_->connected (consumer, ACE_TRY_ENV); + ACE_CHECK_RETURN (CosEventChannelAdmin::ProxyPushConsumer::_nil ()); + + return result._retn (); } CosEventChannelAdmin::ProxyPullConsumer_ptr TAO_CEC_SupplierAdmin::obtain_pull_consumer (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - TAO_CEC_ProxyPullConsumer *consumer = + TAO_CEC_ProxyPullConsumer* consumer = this->event_channel_->create_proxy_pull_consumer (); - return consumer->_this (ACE_TRY_ENV); + PortableServer::ServantBase_var holder = consumer; + + CosEventChannelAdmin::ProxyPullConsumer_var result = + consumer->_this (ACE_TRY_ENV); + ACE_CHECK_RETURN (CosEventChannelAdmin::ProxyPullConsumer::_nil ()); + + this->pull_collection_->connected (consumer, ACE_TRY_ENV); + ACE_CHECK_RETURN (CosEventChannelAdmin::ProxyPullConsumer::_nil ()); + + return result._retn (); } // **************************************************************** diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Concrete_Proxy_Set.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Concrete_Proxy_Set.cpp index ce906d4fdc9..54c2eaef18b 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Concrete_Proxy_Set.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Concrete_Proxy_Set.cpp @@ -28,11 +28,13 @@ TAO_EC_List_Based_Proxy_Set<PROXY>::connected (PROXY *proxy, if (r == 1) { // @@ Already there, throw some user exception.. + proxy->_decr_refcnt (); } if (r == -1) { // @@ Cannot insert, running out of memory? throw some other // user exception + proxy->_decr_refcnt (); } } @@ -41,18 +43,20 @@ TAO_EC_List_Based_Proxy_Set<PROXY>::reconnected (PROXY *proxy, CORBA::Environment &) { int r = this->impl_.insert (proxy); - if (r == 0 || r == 1) { - // Reference count is incremented by the callers to [re]connected. - // @@ Find out if the protocol could be simplified, and decoupling - // increased. - proxy->_decr_refcnt (); - return; - } + if (r == 0 || r == 1) + { + // Reference count is incremented by the callers to [re]connected. + // @@ Find out if the protocol could be simplified, and decoupling + // increased. + proxy->_decr_refcnt (); + return; + } if (r == -1) { // @@ Cannot insert, running out of memory? throw some other // user exception + proxy->_decr_refcnt (); } } @@ -101,11 +105,13 @@ TAO_EC_RB_Tree_Based_Proxy_Set<PROXY>::connected (PROXY *proxy, if (r == 1) { // @@ Already there, throw some user exception.. + proxy->_decr_refcnt (); } if (r == -1) { // @@ Cannot insert, running out of memory? throw some other // user exception + proxy->_decr_refcnt (); } } @@ -114,18 +120,13 @@ TAO_EC_RB_Tree_Based_Proxy_Set<PROXY>::reconnected (PROXY *proxy, CORBA::Environment &) { int r = this->impl_.rebind (proxy, 1); - if (r != 0) { - // Reference count is incremented by the callers to [re]connected. - // @@ Find out if the protocol could be simplified, and decoupling - // increased. - proxy->_decr_refcnt (); - return; - } - - if (r == 0) + if (r != 0) { - // @@ Cannot insert, running out of memory? throw some other - // user exception + // Reference count is incremented by the callers to [re]connected. + // @@ Find out if the protocol could be simplified, and decoupling + // increased. + proxy->_decr_refcnt (); + return; } } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp index b5c9f3fbce1..38570cf7167 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.cpp @@ -11,22 +11,18 @@ ACE_RCSID(Event, EC_ConsumerAdmin, "$Id$") -TAO_EC_ConsumerAdmin::TAO_EC_ConsumerAdmin (TAO_EC_Event_Channel *ec, - Collection *collection) - : event_channel_ (ec), - collection_ (collection) +TAO_EC_ConsumerAdmin::TAO_EC_ConsumerAdmin (TAO_EC_Event_Channel *ec) + : event_channel_ (ec) { - if (this->collection_ == 0) - { - this->collection_ = - this->event_channel_->create_proxy_push_supplier_collection (); - - // @@ - // @@ this->collection_->busy_hwm (this->event_channel_->busy_hwm ()); - // @@ this->collection_->max_write_delay ( - // @@ this->event_channel_->max_write_delay () - // @@ ); - } + this->collection_ = + this->event_channel_->create_proxy_push_supplier_collection (); + + // @@ + // @@ this->collection_->busy_hwm (this->event_channel_->busy_hwm ()); + // @@ this->collection_->max_write_delay ( + // @@ this->event_channel_->max_write_delay () + // @@ ); + this->default_POA_ = this->event_channel_->consumer_poa (); } @@ -65,10 +61,10 @@ TAO_EC_ConsumerAdmin::disconnected (TAO_EC_ProxyPushConsumer *consumer, } void -TAO_EC_ConsumerAdmin::connected (TAO_EC_ProxyPushSupplier *supplier, - CORBA::Environment &ACE_TRY_ENV) +TAO_EC_ConsumerAdmin::connected (TAO_EC_ProxyPushSupplier * /*supplier*/, + CORBA::Environment & /*ACE_TRY_ENV*/) { - this->collection_->connected (supplier, ACE_TRY_ENV); + // this->collection_->connected (supplier, ACE_TRY_ENV); } void @@ -101,7 +97,16 @@ TAO_EC_ConsumerAdmin::obtain_push_supplier (CORBA::Environment &ACE_TRY_ENV) TAO_EC_ProxyPushSupplier* supplier = this->event_channel_->create_proxy_push_supplier (); - return supplier->_this (ACE_TRY_ENV); + PortableServer::ServantBase_var holder = supplier; + + RtecEventChannelAdmin::ProxyPushSupplier_var result = + supplier->_this (ACE_TRY_ENV); + ACE_CHECK_RETURN (RtecEventChannelAdmin::ProxyPushSupplier::_nil ()); + + this->collection_->connected (supplier, ACE_TRY_ENV); + ACE_CHECK_RETURN (RtecEventChannelAdmin::ProxyPushSupplier::_nil ()); + + return result._retn (); } PortableServer::POA_ptr diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h b/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h index ccf41f58432..a5de7a2ce0a 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h +++ b/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h @@ -58,9 +58,7 @@ class TAO_ORBSVCS_Export TAO_EC_ConsumerAdmin : public POA_RtecEventChannelAdmin // = TODO // public: - typedef TAO_EC_Proxy_Collection<TAO_EC_ProxyPushSupplier> Collection; - TAO_EC_ConsumerAdmin (TAO_EC_Event_Channel* event_channel, - Collection* collection = 0); + TAO_EC_ConsumerAdmin (TAO_EC_Event_Channel* event_channel); // constructor. If <supplier_set> is nil then it builds one using // the <event_channel> argument. // In any case it assumes ownership. @@ -106,6 +104,8 @@ private: TAO_EC_Event_Channel *event_channel_; // The Event Channel we belong to + typedef TAO_EC_Proxy_Collection<TAO_EC_ProxyPushSupplier> Collection; + Collection *collection_; // The supplier container. diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp index ed4a03a5b07..30625c1b2f8 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp @@ -137,8 +137,10 @@ TAO_EC_Event_Channel::shutdown (CORBA::Environment& ACE_TRY_ENV) ACE_CHECK; this->supplier_admin_->shutdown (ACE_TRY_ENV); + ACE_CHECK; this->consumer_admin_->shutdown (ACE_TRY_ENV); + ACE_CHECK; } void diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp index 934b74703b6..b4f703da7fb 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp @@ -217,14 +217,25 @@ TAO_EC_ProxyPushConsumer::cleanup_i (void) void TAO_EC_ProxyPushConsumer::deactivate (CORBA::Environment &ACE_TRY_ENV) { - PortableServer::POA_var poa = - this->_default_POA (ACE_TRY_ENV); - ACE_CHECK; - PortableServer::ObjectId_var id = - poa->servant_to_id (this, ACE_TRY_ENV); - ACE_CHECK; - poa->deactivate_object (id.in (), ACE_TRY_ENV); - ACE_CHECK; + ACE_TRY + { + PortableServer::POA_var poa = + this->_default_POA (ACE_TRY_ENV); + ACE_CHECK; + PortableServer::ObjectId_var id = + poa->servant_to_id (this, ACE_TRY_ENV); + ACE_CHECK; + poa->deactivate_object (id.in (), ACE_TRY_ENV); + ACE_CHECK; + } + ACE_CATCHANY + { + // Exceptions here should not be propagated. They usually + // indicate that an object is beign disconnected twice, or some + // race condition, but not a fault that the user needs to know + // about. + } + ACE_ENDTRY; } CORBA::ULong @@ -360,6 +371,7 @@ TAO_EC_ProxyPushConsumer::disconnect_push_consumer ( ACE_THROW_SPEC ((CORBA::SystemException)) { RtecEventComm::PushSupplier_var supplier; + int connected = 0; { ACE_GUARD_THROW_EX ( @@ -368,12 +380,11 @@ TAO_EC_ProxyPushConsumer::disconnect_push_consumer ( // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ()); ACE_CHECK; - if (this->is_connected_i () == 0) - ACE_THROW (CORBA::BAD_INV_ORDER ()); // @@ add user exception? - + connected = this->is_connected_i (); supplier = this->supplier_._retn (); - this->cleanup_i (); + if (connected) + this->cleanup_i (); } this->deactivate (ACE_TRY_ENV); @@ -383,6 +394,11 @@ TAO_EC_ProxyPushConsumer::disconnect_push_consumer ( this->event_channel_->disconnected (this, ACE_TRY_ENV); ACE_CHECK; + if (!connected) + { + return; + } + if (this->event_channel_->disconnect_callbacks ()) { ACE_TRY @@ -397,8 +413,6 @@ TAO_EC_ProxyPushConsumer::disconnect_push_consumer ( } ACE_ENDTRY; } - - this->_decr_refcnt (); } PortableServer::POA_ptr diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp index d93a9327b9a..79666db06fc 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp @@ -106,8 +106,6 @@ TAO_EC_ProxyPushSupplier::shutdown (CORBA::Environment &ACE_TRY_ENV) this->deactivate (ACE_TRY_ENV); ACE_CHECK; - this->_decr_refcnt (); - ACE_TRY { consumer->disconnect_push_consumer (ACE_TRY_ENV); @@ -136,14 +134,25 @@ TAO_EC_ProxyPushSupplier::cleanup_i (void) void TAO_EC_ProxyPushSupplier::deactivate (CORBA::Environment &ACE_TRY_ENV) { - PortableServer::POA_var poa = - this->_default_POA (ACE_TRY_ENV); - ACE_CHECK; - PortableServer::ObjectId_var id = - poa->servant_to_id (this, ACE_TRY_ENV); - ACE_CHECK; - poa->deactivate_object (id.in (), ACE_TRY_ENV); - ACE_CHECK; + ACE_TRY + { + PortableServer::POA_var poa = + this->_default_POA (ACE_TRY_ENV); + ACE_CHECK; + PortableServer::ObjectId_var id = + poa->servant_to_id (this, ACE_TRY_ENV); + ACE_CHECK; + poa->deactivate_object (id.in (), ACE_TRY_ENV); + ACE_CHECK; + } + ACE_CATCHANY + { + // Exceptions here should not be propagated. They usually + // indicate that an object is beign disconnected twice, or some + // race condition, but not a fault that the user needs to know + // about. + } + ACE_ENDTRY; } CORBA::ULong @@ -245,6 +254,7 @@ TAO_EC_ProxyPushSupplier::disconnect_push_supplier ( ACE_THROW_SPEC ((CORBA::SystemException)) { RtecEventComm::PushConsumer_var consumer; + int connected = 0; { ACE_GUARD_THROW_EX ( @@ -253,12 +263,11 @@ TAO_EC_ProxyPushSupplier::disconnect_push_supplier ( // @@ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ()); ACE_CHECK; - if (this->is_connected_i () == 0) - ACE_THROW (CORBA::BAD_INV_ORDER ()); - + connected = this->is_connected_i (); consumer = this->consumer_._retn (); - this->cleanup_i (); + if (connected) + this->cleanup_i (); } this->deactivate (ACE_TRY_ENV); @@ -268,6 +277,11 @@ TAO_EC_ProxyPushSupplier::disconnect_push_supplier ( this->event_channel_->disconnected (this, ACE_TRY_ENV); ACE_CHECK; + if (!connected) + { + return; + } + if (this->event_channel_->disconnect_callbacks ()) { ACE_TRY @@ -284,8 +298,6 @@ TAO_EC_ProxyPushSupplier::disconnect_push_supplier ( } ACE_ENDTRY; } - - this->_decr_refcnt (); } void diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_SupplierAdmin.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_SupplierAdmin.cpp index 8deb691a277..4b22fafae14 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_SupplierAdmin.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_SupplierAdmin.cpp @@ -64,10 +64,10 @@ TAO_EC_SupplierAdmin::disconnected (TAO_EC_ProxyPushSupplier *supplier, } void -TAO_EC_SupplierAdmin::connected (TAO_EC_ProxyPushConsumer *consumer, - CORBA::Environment &ACE_TRY_ENV) +TAO_EC_SupplierAdmin::connected (TAO_EC_ProxyPushConsumer * /*consumer*/, + CORBA::Environment &/*ACE_TRY_ENV*/) { - this->collection_->connected (consumer, ACE_TRY_ENV); + // this->collection_->connected (consumer, ACE_TRY_ENV); } void @@ -100,7 +100,16 @@ TAO_EC_SupplierAdmin::obtain_push_consumer (CORBA::Environment &ACE_TRY_ENV) TAO_EC_ProxyPushConsumer* consumer = this->event_channel_->create_proxy_push_consumer (); - return consumer->_this (ACE_TRY_ENV); + PortableServer::ServantBase_var holder = consumer; + + RtecEventChannelAdmin::ProxyPushConsumer_var result = + consumer->_this (ACE_TRY_ENV); + ACE_CHECK_RETURN (RtecEventChannelAdmin::ProxyPushConsumer::_nil ()); + + this->collection_->connected (consumer, ACE_TRY_ENV); + ACE_CHECK_RETURN (RtecEventChannelAdmin::ProxyPushConsumer::_nil ()); + + return result._retn (); } // **************************************************************** |