You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2007/06/14 00:37:46 UTC

svn commit: r547051 - /activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelatorFactory.cpp

Author: tabish
Date: Wed Jun 13 15:37:45 2007
New Revision: 547051

URL: http://svn.apache.org/viewvc?view=rev&rev=547051
Log:
https://issues.apache.org/activemq/browse/AMQCPP-127

Added new configuration option for max response wait time.

Modified:
    activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelatorFactory.cpp

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelatorFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelatorFactory.cpp?view=diff&rev=547051&r1=547050&r2=547051
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelatorFactory.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelatorFactory.cpp Wed Jun 13 15:37:45 2007
@@ -18,11 +18,13 @@
 #include "ResponseCorrelatorFactory.h"
 
 #include <activemq/transport/filters/ResponseCorrelator.h>
+#include <activemq/util/Long.h>
 
 using namespace activemq;
 using namespace activemq::transport;
 using namespace activemq::transport::filters;
 using namespace activemq::exceptions;
+using namespace activemq::util;
 
 ////////////////////////////////////////////////////////////////////////////////
 TransportFactory& ResponseCorrelatorFactory::getInstance(void)
@@ -42,7 +44,15 @@
     bool own ) throw ( ActiveMQException ) {
 
     try {
-        return new ResponseCorrelator( next, own );
+
+        ResponseCorrelator* transport = new ResponseCorrelator( next, own );
+
+        transport->setMaxResponseWaitTime(
+            (unsigned long)Long::parseLong( 
+                properties.getProperty( 
+                    "transport.ResponseCorrelator.maxResponseWaitTime", "3000" ) ) );
+
+        return transport;
     }
     AMQ_CATCH_RETHROW( ActiveMQException )
     AMQ_CATCHALL_THROW( ActiveMQException )