git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@565382 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2007-08-13 15:44:51 +00:00
parent df6b54240c
commit 13a9200e3e
4 changed files with 11 additions and 6 deletions

View File

@ -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;

View File

@ -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);

View File

@ -174,6 +174,7 @@ public class Producer extends BenchmarkSupport {
buffer.append(line);
buffer.append(File.separator);
}
in.close();
return buffer.toString();
}
}

View File

@ -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;
}