Author: chirino
Date: Sat Jun 17 10:40:40 2006
New Revision: 415036
URL: http://svn.apache.org/viewvc?rev=415036&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQ-759
Removed:
incubator/activemq/trunk/activemq-gbean/
incubator/activemq/trunk/activemq-gbean-management/
Modified:
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java
Modified:
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java
URL:
http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java?rev=415036&r1=415035&r2=415036&view=diff
==============================================================================
---
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java
(original)
+++
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java
Sat Jun 17 10:40:40 2006
@@ -37,17 +37,15 @@
}
public Response getResult() throws IOException {
- while (true) {
- try {
- return (Response) responseSlot.take();
- }
- catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- if (log.isDebugEnabled()) {
- log.debug("Operation interupted: " + e, e);
- }
- // throw new InterruptedIOException("Interrupted.");
+ try {
+ return (Response) responseSlot.take();
+ }
+ catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ if (log.isDebugEnabled()) {
+ log.debug("Operation interupted: " + e, e);
}
+ throw new InterruptedIOException("Interrupted.");
}
}
@@ -60,13 +58,10 @@
}
public void set(Response result) throws InterruptedIOException {
- try {
- responseSlot.put(result);
- } catch (InterruptedException e) {
- throw new InterruptedIOException("Interrupted.");
+ if( responseSlot.offer(result) ) {
+ if( responseCallback !=null ) {
+ responseCallback.onCompletion(this);
+ }
}
- if( responseCallback !=null ) {
- responseCallback.onCompletion(this);
- }
}
}