diff options
Diffstat (limited to 'java/perftests')
| -rw-r--r-- | java/perftests/pom.xml | 1 | ||||
| -rw-r--r-- | java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java | 21 |
2 files changed, 12 insertions, 10 deletions
diff --git a/java/perftests/pom.xml b/java/perftests/pom.xml index 874cbd3e52..2f79654e6a 100644 --- a/java/perftests/pom.xml +++ b/java/perftests/pom.xml @@ -146,6 +146,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> + <version>${assembly.version}</version> <configuration> <descriptors> <descriptor>jar-with-dependencies.xml</descriptor> diff --git a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java index 8bb2da8b6f..c1d42eeed4 100644 --- a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java +++ b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java @@ -20,23 +20,19 @@ */
package org.apache.qpid.requestreply;
-import java.net.InetAddress;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jms.*;
-
import org.apache.log4j.Logger;
-
import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQNoConsumersException;
import org.apache.qpid.client.AMQQueue;
-import org.apache.qpid.client.message.TestMessageFactory;
import org.apache.qpid.jms.MessageProducer;
import org.apache.qpid.jms.Session;
import org.apache.qpid.ping.AbstractPingProducer;
import org.apache.qpid.util.concurrent.BooleanLatch;
+import javax.jms.*;
+import java.net.InetAddress;
+import java.util.HashMap;
+import java.util.Map;
+
/**
* PingPongProducer is a client that sends pings to a queue and waits for pongs to be bounced back by a bounce back
* client (see {@link org.apache.qpid.requestreply.PingPongClient} for the bounce back client). It is designed to be run from the command line
@@ -238,7 +234,7 @@ public class PingPongProducer extends AbstractPingProducer implements Runnable, *
* @throws JMSException All underlying JMSExceptions are allowed to fall through.
*/
- public Message pingAndWaitForReply(Message message, long timeout) throws JMSException
+ public Message pingAndWaitForReply(Message message, long timeout) throws JMSException, InterruptedException
{
_producer.send(message);
@@ -297,5 +293,10 @@ public class PingPongProducer extends AbstractPingProducer implements Runnable, _publish = false;
_logger.debug("There was a JMSException: " + e.getMessage(), e);
}
+ catch (InterruptedException e)
+ {
+ _publish = false;
+ _logger.debug("There was an interruption: " + e.getMessage(), e);
+ }
}
}
|
