mirror of https://github.com/apache/activemq.git
Applied patch: https://issues.apache.org/activemq/browse/AMQ-891
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@439939 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ac66a09dab
commit
b75a6dac1b
|
@ -1409,6 +1409,7 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
|
|||
try {
|
||||
brokerInfoReceived.await();
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw JMSExceptionSupport.create(e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -143,6 +143,7 @@ public class ActiveMQInputStream extends InputStream implements ActiveMQDispatch
|
|||
try {
|
||||
md = unconsumedMessages.dequeue(-1);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw JMSExceptionSupport.create(e);
|
||||
}
|
||||
|
||||
|
|
|
@ -400,6 +400,7 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
|
|||
}
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw JMSExceptionSupport.create(e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1337,6 +1337,7 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
|
|||
try {
|
||||
executor.execute(messageDispatch);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
connection.onAsyncException(e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,6 +118,7 @@ public class ActiveMQSessionExecutor implements Task {
|
|||
}
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw JMSExceptionSupport.create(e);
|
||||
}
|
||||
}
|
||||
|
@ -160,4 +161,4 @@ public class ActiveMQSessionExecutor implements Task {
|
|||
return messageQueue.removeAll();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ public abstract class DemandForwardingBridgeSupport implements Bridge {
|
|||
protected int prefetchSize = 1000;
|
||||
protected boolean dispatchAsync;
|
||||
protected String destinationFilter = ">";
|
||||
protected boolean bridgeTempDestinations = false;
|
||||
protected boolean bridgeTempDestinations = true;
|
||||
protected String name = "bridge";
|
||||
protected ConsumerInfo demandConsumerInfo;
|
||||
protected int demandConsumerDispatched;
|
||||
|
@ -271,20 +271,13 @@ public abstract class DemandForwardingBridgeSupport implements Bridge {
|
|||
// Listen to consumer advisory messages on the remote broker to determine demand.
|
||||
demandConsumerInfo=new ConsumerInfo(remoteSessionInfo,1);
|
||||
demandConsumerInfo.setDispatchAsync(dispatchAsync);
|
||||
demandConsumerInfo.setDestination(new ActiveMQTopic(AdvisorySupport.CONSUMER_ADVISORY_TOPIC_PREFIX
|
||||
+destinationFilter));
|
||||
demandConsumerInfo.setPrefetchSize(prefetchSize);
|
||||
remoteBroker.oneway(demandConsumerInfo);
|
||||
|
||||
String advisoryTopic = AdvisorySupport.CONSUMER_ADVISORY_TOPIC_PREFIX+destinationFilter;
|
||||
if( bridgeTempDestinations ) {
|
||||
//we want information about Destinations as well
|
||||
ConsumerInfo destinationInfo = new ConsumerInfo(remoteSessionInfo,2);
|
||||
destinationInfo.setDestination(AdvisorySupport.TEMP_DESTINATION_COMPOSITE_ADVISORY_TOPIC);
|
||||
destinationInfo.setPrefetchSize(prefetchSize);
|
||||
destinationInfo.setDispatchAsync(dispatchAsync);
|
||||
remoteBroker.oneway(destinationInfo);
|
||||
advisoryTopic += ","+AdvisorySupport.TEMP_DESTINATION_COMPOSITE_ADVISORY_TOPIC;
|
||||
}
|
||||
|
||||
demandConsumerInfo.setDestination(new ActiveMQTopic(advisoryTopic));
|
||||
demandConsumerInfo.setPrefetchSize(prefetchSize);
|
||||
remoteBroker.oneway(demandConsumerInfo);
|
||||
startedLatch.countDown();
|
||||
|
||||
if (!disposed){
|
||||
|
|
|
@ -55,7 +55,7 @@ public abstract class NetworkConnector extends ServiceSupport {
|
|||
private boolean dispatchAsync = true;
|
||||
private String userName;
|
||||
private String password;
|
||||
private boolean bridgeTempDestinations=false;
|
||||
private boolean bridgeTempDestinations=true;
|
||||
|
||||
protected ConnectionFilter connectionFilter;
|
||||
|
||||
|
|
|
@ -313,6 +313,7 @@ public class JournalPersistenceAdapter implements PersistenceAdapter, JournalEve
|
|||
}
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
log.warn("Request to start checkpoint failed: " + e, e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -312,6 +312,7 @@ public class QuickJournalPersistenceAdapter implements PersistenceAdapter, Journ
|
|||
}
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
log.warn("Request to start checkpoint failed: " + e, e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,6 +98,7 @@ class DedicatedTaskRunner implements TaskRunner {
|
|||
|
||||
} catch (InterruptedException e) {
|
||||
// Someone really wants this thread to die off.
|
||||
Thread.currentThread().interrupt();
|
||||
} finally {
|
||||
// Make sure we notify any waiting threads that thread
|
||||
// has terminated.
|
||||
|
@ -107,4 +108,4 @@ class DedicatedTaskRunner implements TaskRunner {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,6 +81,7 @@ public class WireFormatNegotiator extends TransportFilter {
|
|||
if( !readyCountDownLatch.await(negotiateTimeout, TimeUnit.MILLISECONDS) )
|
||||
throw new IOException("Wire format negociation timeout: peer did not send his wire format.");
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new InterruptedIOException();
|
||||
}
|
||||
super.oneway(command);
|
||||
|
|
|
@ -138,6 +138,7 @@ public class SimpleDiscoveryAgent implements DiscoveryAgent {
|
|||
|
||||
sleepMutex.wait(event.reconnectDelay);
|
||||
}catch(InterruptedException ie){
|
||||
Thread.currentThread().interrupt();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,6 +115,7 @@ public class FailoverTransport implements CompositeTransport {
|
|||
handleTransportFailure(error);
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
transportListener.onException(new InterruptedIOException());
|
||||
}
|
||||
}
|
||||
|
@ -349,6 +350,7 @@ public class FailoverTransport implements CompositeTransport {
|
|||
reconnectMutex.wait(1000);
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
log.debug("Interupted: " + e, e);
|
||||
}
|
||||
}
|
||||
|
@ -399,6 +401,7 @@ public class FailoverTransport implements CompositeTransport {
|
|||
}
|
||||
catch (InterruptedException e) {
|
||||
// Some one may be trying to stop our thread.
|
||||
Thread.currentThread().interrupt();
|
||||
throw new InterruptedIOException();
|
||||
}
|
||||
if(!disposed){
|
||||
|
|
|
@ -142,6 +142,7 @@ public class FanoutTransport implements CompositeTransport {
|
|||
}
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
transportListener.onException(new InterruptedIOException());
|
||||
}
|
||||
}
|
||||
|
@ -394,6 +395,7 @@ public class FanoutTransport implements CompositeTransport {
|
|||
}
|
||||
} catch (InterruptedException e) {
|
||||
// Some one may be trying to stop our thread.
|
||||
Thread.currentThread().interrupt();
|
||||
throw new InterruptedIOException();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -407,6 +407,7 @@ public class UdpTransport extends TransportThreadSupport implements Transport, S
|
|||
try {
|
||||
Thread.sleep(BIND_ATTEMPT_DELAY);
|
||||
} catch (InterruptedException e1) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue