only use the wire format negociator if needed.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@358216 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2005-12-21 05:43:16 +00:00
parent d0e9fa2990
commit b6eb3a6319
1 changed files with 4 additions and 1 deletions

View File

@ -19,6 +19,7 @@
package org.activemq.transport.tcp;
import org.activeio.command.WireFormat;
import org.activemq.openwire.OpenWireFormat;
import org.activemq.transport.MutexTransport;
import org.activemq.transport.ResponseCorrelator;
import org.activemq.transport.Transport;
@ -68,7 +69,9 @@ public class TcpTransportFactory extends TransportFactory {
// transport = new InactivityMonitor(transport,
// temp.getMaxInactivityDuration(), activityMonitor.getReadCounter(),
// activityMonitor.getWriteCounter());
if( format instanceof OpenWireFormat )
transport = new WireFormatNegotiator(transport, format, tcpTransport.getMinmumWireFormatVersion());
transport = new MutexTransport(transport);
transport = new ResponseCorrelator(transport);
return transport;