activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r565382 - in /activemq/trunk/activemq-optional/src/main/java/org/apache/activemq: axis/ActiveMQVendorAdapter.java benchmark/BenchmarkSupport.java benchmark/Producer.java transport/http/HttpTransportFactory.java
Date Mon, 13 Aug 2007 15:44:51 GMT
Author: rajdavies
Date: Mon Aug 13 08:44:51 2007
New Revision: 565382

URL: http://svn.apache.org/viewvc?view=rev&rev=565382
Log:
Applied patch from http://issues.apache.org/activemq/browse/AMQ-1361 

Modified:
    activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/axis/ActiveMQVendorAdapter.java
    activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/BenchmarkSupport.java
    activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/Producer.java
    activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportFactory.java

Modified: activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/axis/ActiveMQVendorAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/axis/ActiveMQVendorAdapter.java?view=diff&rev=565382&r1=565381&r2=565382
==============================================================================
--- activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/axis/ActiveMQVendorAdapter.java
(original)
+++ activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/axis/ActiveMQVendorAdapter.java
Mon Aug 13 08:44:51 2007
@@ -90,7 +90,7 @@
 
         // compare broker url
         String propertyBrokerURL = (String)properties.get(BROKER_URL);
-        if (!brokerURL.equals(propertyBrokerURL)) {
+        if (brokerURL == null || !brokerURL.equals(propertyBrokerURL)) {
             return false;
         }
         return true;

Modified: activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/BenchmarkSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/BenchmarkSupport.java?view=diff&rev=565382&r1=565381&r2=565382
==============================================================================
--- activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/BenchmarkSupport.java
(original)
+++ activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/BenchmarkSupport.java
Mon Aug 13 08:44:51 2007
@@ -176,7 +176,7 @@
                 times++;
             }
             if (times > 0) {
-                average = total / times;
+                average = total / (double) times;
             }
 
             System.out.println(getClass().getName() + " Processed: " + processed + " messages
this second. Average: " + average);

Modified: activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/Producer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/Producer.java?view=diff&rev=565382&r1=565381&r2=565382
==============================================================================
--- activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/Producer.java
(original)
+++ activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/Producer.java
Mon Aug 13 08:44:51 2007
@@ -174,6 +174,7 @@
             buffer.append(line);
             buffer.append(File.separator);
         }
+        in.close();
         return buffer.toString();
     }
 }

Modified: activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportFactory.java?view=diff&rev=565382&r1=565381&r2=565382
==============================================================================
--- activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportFactory.java
(original)
+++ activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportFactory.java
Mon Aug 13 08:44:51 2007
@@ -22,7 +22,7 @@
 
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportLogger;
+import org.apache.activemq.transport.TransportLoggerFactory;
 import org.apache.activemq.transport.TransportServer;
 import org.apache.activemq.transport.util.TextWireFormat;
 import org.apache.activemq.transport.xstream.XStreamWireFormat;
@@ -59,10 +59,14 @@
     }
 
     public Transport compositeConfigure(Transport transport, WireFormat format, Map options)
{
-        HttpClientTransport httpTransport = (HttpClientTransport)super.compositeConfigure(transport,
format, options);
+        HttpClientTransport httpTransport = (HttpClientTransport) super.compositeConfigure(transport,
format, options);
         transport = httpTransport;
-        if (httpTransport.isTrace()) {
-            transport = new TransportLogger(httpTransport);
+        if( httpTransport.isTrace() ) {
+            try {
+                transport = TransportLoggerFactory.getInstance().createTransportLogger(transport);
+            } catch (Throwable e) {
+                LOG.error("Could not create TransportLogger object for: " + TransportLoggerFactory.defaultLogWriterName
+ ", reason: " + e, e);
+            }
         }
         return transport;
     }



Mime
View raw message