[jboss-jira] [JBoss JIRA] Commented: (JBREM-1189) Graceful connection close
David Lloyd (JIRA)
jira-events at lists.jboss.org
Mon Mar 1 11:33:19 EST 2010
[ https://jira.jboss.org/jira/browse/JBREM-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12517341#action_12517341 ]
David Lloyd commented on JBREM-1189:
------------------------------------
In order to ensure smooth operation of the test suite, I've added an "awaitClosed()/awaitClosedUninterruptibly()" method pair to coordinate clean shutdown. Maybe all that's needed is one more method - requestClose(), something like that - on Connection which does the graceful shutdown?
Or maybe close() should be graceful by default with an additional closeImmediate() method.
I think the first might be better though. Then the pattern would look something like this:
connection = do connect;
try {
... do work ...
connection.requestClose();
connection.awaitClosed();
} finally {
// make sure it is shut down either way...
safeClose(connection);
// this might be needed as well:
connection.awaitClosedUninterruptibly();
}
> Graceful connection close
> -------------------------
>
> Key: JBREM-1189
> URL: https://jira.jboss.org/jira/browse/JBREM-1189
> Project: JBoss Remoting
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: r3 core: api, r3 core: remote
> Reporter: David Lloyd
> Fix For: 3.1.0.Beta2
>
>
> Design a mechanism for graceful connection shutdown. This could work in one of a few ways:
> 1. Refuse new clients, immediately close all clients, allow outstanding requests to finish
> 2. Refuse new clients, keep connection up until all clients are closed and all outstanding requests to finish
> #1 might be better - since requests have a finite lifespan but clients can hang around indifinitely.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list