mirror of https://github.com/apache/activemq.git
Applied patch from http://issues.apache.org/activemq/browse/AMQ-1361
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@565382 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
df6b54240c
commit
13a9200e3e
|
@ -90,7 +90,7 @@ public class ActiveMQVendorAdapter extends BeanVendorAdapter {
|
|||
|
||||
// compare broker url
|
||||
String propertyBrokerURL = (String)properties.get(BROKER_URL);
|
||||
if (!brokerURL.equals(propertyBrokerURL)) {
|
||||
if (brokerURL == null || !brokerURL.equals(propertyBrokerURL)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -176,7 +176,7 @@ public class BenchmarkSupport {
|
|||
times++;
|
||||
}
|
||||
if (times > 0) {
|
||||
average = total / times;
|
||||
average = total / (double) times;
|
||||
}
|
||||
|
||||
System.out.println(getClass().getName() + " Processed: " + processed + " messages this second. Average: " + average);
|
||||
|
|
|
@ -174,6 +174,7 @@ public class Producer extends BenchmarkSupport {
|
|||
buffer.append(line);
|
||||
buffer.append(File.separator);
|
||||
}
|
||||
in.close();
|
||||
return buffer.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ import java.util.Map;
|
|||
|
||||
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 class HttpTransportFactory extends TransportFactory {
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue