fix for AMQ-600 to detect IOExceptions as being transport exceptions, not service exceptions (which are normally things like JMSException or security exceptions etc) and then disposing the connection eagerly - to free up the clientID so that the client can reconnect

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@386610 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-03-17 11:19:12 +00:00
parent 2bc9a83508
commit c559a8093f
1 changed files with 6 additions and 1 deletions

View File

@ -169,7 +169,12 @@ public abstract class AbstractConnection implements Service, Connection, Task, C
} }
public void serviceException(Throwable e) { public void serviceException(Throwable e) {
if( !disposed && !inServiceException ) { // are we a transport exception such as not being able to dispatch
// synchronously to a transport
if (e instanceof IOException) {
serviceTransportException((IOException) e);
}
else if( !disposed && !inServiceException ) {
inServiceException = true; inServiceException = true;
try { try {
serviceLog.info("Async error occurred: "+e,e); serviceLog.info("Async error occurred: "+e,e);