diff options
author | Martin Ritchie <ritchiem@apache.org> | 2007-06-15 11:21:40 +0000 |
---|---|---|
committer | Martin Ritchie <ritchiem@apache.org> | 2007-06-15 11:21:40 +0000 |
commit | 566e17c53b8317261bf41ef957caf23cc80034cc (patch) | |
tree | 48295a6796392848dff00418cd628ee15a28bf07 | |
parent | dd7fbb765c7fe4a5ff1c0506bd296d553282b7a9 (diff) | |
download | qpid-python-566e17c53b8317261bf41ef957caf23cc80034cc.tar.gz |
QPID-511 adjusted to use the ReadWriteThreadModel rather than setting editing the filterChain directly which could cause problems when using an InVM transport due to the way the InVM transport alters the filter chain during a connect call.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@547627 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/transport/VmPipeTransportConnection.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/transport/VmPipeTransportConnection.java b/java/client/src/main/java/org/apache/qpid/client/transport/VmPipeTransportConnection.java index 2893d175c7..d9137dc8b1 100644 --- a/java/client/src/main/java/org/apache/qpid/client/transport/VmPipeTransportConnection.java +++ b/java/client/src/main/java/org/apache/qpid/client/transport/VmPipeTransportConnection.java @@ -29,6 +29,7 @@ import org.apache.qpid.client.protocol.AMQProtocolHandler; import org.apache.qpid.jms.BrokerDetails; import org.apache.qpid.pool.PoolingFilter; import org.apache.qpid.pool.ReferenceCountingExecutorService; +import org.apache.qpid.pool.ReadWriteThreadModel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -50,11 +51,8 @@ public class VmPipeTransportConnection implements ITransportConnection { final VmPipeConnector ioConnector = new VmPipeConnector(); final IoServiceConfig cfg = ioConnector.getDefaultConfig(); - ReferenceCountingExecutorService executorService = ReferenceCountingExecutorService.getInstance(); - PoolingFilter asyncRead = PoolingFilter.createAynschReadPoolingFilter(executorService, "AsynchronousReadFilter"); - cfg.getFilterChain().addFirst("AsynchronousReadFilter", asyncRead); - PoolingFilter asyncWrite = PoolingFilter.createAynschWritePoolingFilter(executorService, "AsynchronousWriteFilter"); - cfg.getFilterChain().addLast("AsynchronousWriteFilter", asyncWrite); + + cfg.setThreadModel(ReadWriteThreadModel.getInstance()); final VmPipeAddress address = new VmPipeAddress(_port); _logger.info("Attempting connection to " + address); |