diff options
author | bala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-11-21 01:56:55 +0000 |
---|---|---|
committer | bala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-11-21 01:56:55 +0000 |
commit | 5eb553c7765887857730a8cc3a9a843032038cd4 (patch) | |
tree | 70aa5c98f8c2ab40718565fac79bfb1e67f66cbc | |
parent | f0cff8ed706c9f66655cdb06e6d9233711f4cc83 (diff) | |
download | ATCD-5eb553c7765887857730a8cc3a9a843032038cd4.tar.gz |
ChangeLogTag: Mon Nov 20 19:51:06 2000 Balachandran Natarajan <bala@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 14 | ||||
-rw-r--r-- | TAO/tao/Connection_Handler.cpp | 10 | ||||
-rw-r--r-- | TAO/tao/Connection_Handler.h | 3 | ||||
-rw-r--r-- | TAO/tao/IIOP_Connect.h | 7 | ||||
-rw-r--r-- | TAO/tao/IIOP_Transport.cpp | 28 | ||||
-rw-r--r-- | TAO/tao/IIOP_Transport.h | 4 |
6 files changed, 54 insertions, 12 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index f1f1de7a6d9..556698b6729 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,17 @@ +Mon Nov 20 19:51:06 2000 Balachandran Natarajan <bala@cs.wustl.edu> + + * tao/Connection_Handler.cpp: + * tao/Connection_Handler.h: Added a method purge_entry (). + + * tao/IIOP_Connect.h (TAO_IIOP_Server_Connection_Handler): + * tao/IIOP_Transport.cpp: + * tao/IIOP_Transport.h: Removed the method close_connection () + from the base class and moved it to the server & client + transport classes. Further, added a call to purge_entry () on + the service handler when close_connection () is called. This is + required as we need to purge the cache map entries when the ORB + decides to shutdown the connection. + Mon Nov 20 18:59:28 2000 Angelo Corsaro <corsaro@cs.wustl.edu> * TAO_IDL/be/be_visitor_interface/base_proxy_impl_ch.cpp: diff --git a/TAO/tao/Connection_Handler.cpp b/TAO/tao/Connection_Handler.cpp index a32c953509d..bb6ac1521b2 100644 --- a/TAO/tao/Connection_Handler.cpp +++ b/TAO/tao/Connection_Handler.cpp @@ -20,7 +20,15 @@ TAO_Connection_Handler::TAO_Connection_Handler (TAO_ORB_Core *orb_core) is_registered_ (0) { } - +int +TAO_Connection_Handler::purge_entry (void) +{ + // Decerment our reference count before we remove ourselves from the + // map as our references are not held by the map + this->decr_ref_count (); + return + this->orb_core_->connection_cache ().purge_entry (this->cache_map_entry_); +} int TAO_Connection_Handler::make_idle (void) diff --git a/TAO/tao/Connection_Handler.h b/TAO/tao/Connection_Handler.h index b7a0567be43..0488a8b5c7e 100644 --- a/TAO/tao/Connection_Handler.h +++ b/TAO/tao/Connection_Handler.h @@ -94,6 +94,9 @@ public: virtual ACE_HANDLE fetch_handle (void) = 0; // Get the underlying handle + int purge_entry (void); + // Purge our entry from the Connection Cache + protected: TAO_ORB_Core *orb_core (void); diff --git a/TAO/tao/IIOP_Connect.h b/TAO/tao/IIOP_Connect.h index b8811d2c0b4..39193408cea 100644 --- a/TAO/tao/IIOP_Connect.h +++ b/TAO/tao/IIOP_Connect.h @@ -94,6 +94,9 @@ public: virtual ACE_HANDLE fetch_handle (void); // Return the underlying handle + virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE, + ACE_Reactor_Mask = ACE_Event_Handler::NULL_MASK); + // Perform appropriate closing. protected: // = Event Handler overloads @@ -107,10 +110,6 @@ protected: // after <max_wait_time>, this is used in thread-per-connection to // ensure that server threads eventually exit. - virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE, - ACE_Reactor_Mask = ACE_Event_Handler::NULL_MASK); - // Perform appropriate closing. - protected: TAO_IIOP_Server_Transport transport_; diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp index 5e12f437595..786abdc88b0 100644 --- a/TAO/tao/IIOP_Transport.cpp +++ b/TAO/tao/IIOP_Transport.cpp @@ -68,12 +68,6 @@ TAO_IIOP_Transport::~TAO_IIOP_Transport (void) } -void -TAO_IIOP_Transport::close_connection (void) -{ - this->service_handler ()->handle_close (); -} - ACE_HANDLE TAO_IIOP_Transport::handle (void) { @@ -114,6 +108,17 @@ TAO_IIOP_Server_Transport::service_handler (void) return this->handler_; } +void +TAO_IIOP_Server_Transport::close_connection (void) +{ + // Purge the entry from the Cache map first and then close the + // handler + this->handler_->purge_entry (); + + // Now close the handler + this->handler_->handle_close (); +} + // **************************************************************** @@ -403,6 +408,17 @@ TAO_IIOP_Client_Transport::send_request_header (TAO_Operation_Details &opdetails } +void +TAO_IIOP_Client_Transport::close_connection (void) +{ + // Purge the entry from the Cache map first and then close the + // handler + this->handler_->purge_entry (); + + // Now close the handler + this->handler_->handle_close (); +} + // ********************************************************************* ssize_t diff --git a/TAO/tao/IIOP_Transport.h b/TAO/tao/IIOP_Transport.h index 9049dbff429..0b52efb9f29 100644 --- a/TAO/tao/IIOP_Transport.h +++ b/TAO/tao/IIOP_Transport.h @@ -64,7 +64,7 @@ public: // = The TAO_Transport methods, please check the documentation in // "tao/Pluggable.h" for more details. - virtual void close_connection (void); + virtual ACE_HANDLE handle (void); @@ -120,6 +120,7 @@ public: // = The TAO_Transport methods, please check the documentation in // "tao/Pluggable.h" for more details. + virtual void close_connection (void); virtual int idle (void); virtual void start_request (TAO_ORB_Core *orb_core, @@ -202,6 +203,7 @@ public: // Default destructor // Please see Pluggable.h for documentation + virtual void close_connection (void); virtual int idle (void); virtual TAO_IIOP_SVC_HANDLER *service_handler (void); |