From 24d8986cee13b7c14333026912e7cd034231f5c8 Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Fri, 30 Jun 2006 01:43:12 +0000 Subject: [PATCH] Allow the connector to override if async dispatch is allowed. git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@418162 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/broker/TransportConnector.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java b/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java index 28cc4086b3..b82e81b271 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java @@ -64,6 +64,7 @@ public class TransportConnector implements Connector { private URI discoveryUri; private URI connectUri; private String name; + private boolean disableAsyncDispatch=false; /** @@ -94,6 +95,7 @@ public class TransportConnector implements Connector { rc.setDiscoveryAgent(discoveryAgent); rc.setDiscoveryUri(discoveryUri); rc.setName(name); + rc.setDisableAsyncDispatch(disableAsyncDispatch); return rc; } @@ -228,7 +230,7 @@ public class TransportConnector implements Connector { // Implementation methods // ------------------------------------------------------------------------- protected Connection createConnection(Transport transport) throws IOException { - TransportConnection answer = new TransportConnection(this, transport, broker, taskRunnerFactory); + TransportConnection answer = new TransportConnection(this, transport, broker, disableAsyncDispatch ? null : taskRunnerFactory); answer.setMessageAuthorizationPolicy(messageAuthorizationPolicy); return answer; } @@ -303,4 +305,12 @@ public class TransportConnector implements Connector { public String toString() { return getName(); } + + public boolean isDisableAsyncDispatch() { + return disableAsyncDispatch; + } + + public void setDisableAsyncDispatch(boolean disableAsyncDispatch) { + this.disableAsyncDispatch = disableAsyncDispatch; + } }