Don't use the inactivity monitor when the stomp protocol is in use.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@382741 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-03-03 09:49:07 +00:00
parent e87f4c9106
commit c916749e78
2 changed files with 7 additions and 3 deletions

View File

@ -36,7 +36,7 @@ public class StompTransportFactory extends TransportFactory {
URI tcpURI = new URI(
"tcp://"+location.getHost()+
(location.getPort()>=0 ? ":"+location.getPort() : "")+
"?wireFormat=stomp"
"?wireFormat=stomp&maxInactivityDuration=0"
);
return TransportFactory.bind(brokerId, tcpURI);
} catch (URISyntaxException e) {

View File

@ -72,7 +72,9 @@ public class TcpTransportFactory extends TransportFactory {
if( format instanceof OpenWireFormat )
transport = new WireFormatNegotiator(transport, format, tcpTransport.getMinmumWireFormatVersion());
transport = new InactivityMonitor(transport, tcpTransport.getMaxInactivityDuration());
if( tcpTransport.getMaxInactivityDuration() > 0 ) {
transport = new InactivityMonitor(transport, tcpTransport.getMaxInactivityDuration());
}
transport = new MutexTransport(transport);
transport = new ResponseCorrelator(transport);
@ -91,7 +93,9 @@ public class TcpTransportFactory extends TransportFactory {
// temp.getMaxInactivityDuration(), activityMonitor.getReadCounter(),
// activityMonitor.getWriteCounter());
transport = new WireFormatNegotiator(transport, format, tcpTransport.getMinmumWireFormatVersion());
transport = new InactivityMonitor(transport, tcpTransport.getMaxInactivityDuration());
if( tcpTransport.getMaxInactivityDuration() > 0 ) {
transport = new InactivityMonitor(transport, tcpTransport.getMaxInactivityDuration());
}
return transport;
}