Author: ron.sigal(a)jboss.com
Date: 2008-06-09 21:58:04 -0400 (Mon, 09 Jun 2008)
New Revision: 4278
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/SocketClientInvoker.java
Log:
JBREM-954: Wraps InterruptedException in a RuntimeException.
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java
===================================================================
---
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java 2008-06-10
01:43:37 UTC (rev 4277)
+++
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java 2008-06-10
01:58:04 UTC (rev 4278)
@@ -550,6 +550,12 @@
{
socketWrapper = getConnection(marshaller, unmarshaller, timeLeft);
}
+ catch (InterruptedException e)
+ {
+ semaphore.release();
+ if (trace) log.trace(this + " released semaphore: " +
semaphore.permits(), e);
+ throw new RuntimeException(e);
+ }
catch (Exception e)
{
// if (bailOut)
@@ -718,6 +724,12 @@
throw (ClassNotFoundException)ex;
}
+ if (ex instanceof InterruptedException)
+ {
+ log.debug(this, ex);
+ throw new RuntimeException(ex);
+ }
+
throw new MarshalException(
"Failed to communicate. Problem during marshalling/unmarshalling.",
ex);
}
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/SocketClientInvoker.java
===================================================================
---
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/SocketClientInvoker.java 2008-06-10
01:43:37 UTC (rev 4277)
+++
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/SocketClientInvoker.java 2008-06-10
01:58:04 UTC (rev 4278)
@@ -118,7 +118,12 @@
throw new MarshalException("Socket timed out. Waited " +
socketWrapper.getTimeout() + " milliseconds for response while calling on " +
getLocator(), ex);
}
-
+ else if (ex instanceof InterruptedException)
+ {
+ log.debug(this, ex);
+ throw new RuntimeException(ex);
+ }
+
throw new MarshalException("Failed to communicate. Problem during
marshalling/unmarshalling", ex);
}
Show replies by date