activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r754963 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
Date Mon, 16 Mar 2009 17:22:41 GMT
Author: chirino
Date: Mon Mar 16 17:22:40 2009
New Revision: 754963

URL: http://svn.apache.org/viewvc?rev=754963&view=rev
Log:
The useInactivityMonitor option can now be used to disable configuring a inactivity montior
on the transport.

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java?rev=754963&r1=754962&r2=754963&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
Mon Mar 16 17:22:40 2009
@@ -96,7 +96,8 @@
             }
         }
 
-        if (isUseInactivityMonitor(transport)) {
+        boolean useInactivityMonitor = "true".equals(getOption(options, "useInactivityMonitor",
"true"));
+        if (useInactivityMonitor && isUseInactivityMonitor(transport)) {
             transport = new InactivityMonitor(transport, format);
         }
 
@@ -108,6 +109,14 @@
         return transport;
     }
 
+    private String getOption(Map options, String key, String def) {
+        String rc = (String) options.remove(key);
+        if( rc == null ) {
+            rc = def;
+        }
+        return rc;
+    }
+
     /**
      * Returns true if the inactivity monitor should be used on the transport
      */



Mime
View raw message