We have a light weight Enterprise Service Bus. I am replacing the connection
management component with Grizzly. Grizzly will accept a message from a
client and I have a Asynchronous adpater class in Grizzly that puts the
request, response and the processTask that are created in Grizzly into a
wrapper class. This wrapper class (event) then sits on a queue for later
processing. The wrapper class may get put onto other queues as it progresses
along its processing lifecycle through the ESB. When the wrapper class
(event) is created it is registered with a timeout monitor. The timeout
monitor will tell the event to timeout after a period of time. When the
event times out it should close itself down and tidy up, freeing any
resources e.g. connections, selector keys etc without writing any messages
back to the client.
Effectively we have a reference to an open connection sitting on a Selector
within Grizzly (via the processorTask) and we need to be able to close that
connection and free its resources (slector keys etc) at any point in the
messages processing (event/wrapper class) life cycle.
Hope this clarifies.
--
View this message in context: http://www.nabble.com/Closing-connections-tp18026485p18028926.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.