From e5147d0df8b76db94059a442cfbe40cbce22d79f Mon Sep 17 00:00:00 2001 From: Robert Greig Date: Tue, 16 Jan 2007 19:38:51 +0000 Subject: Fix to broken build due to missing file. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@496833 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/qpid/requestreply/PingPongProducer.java | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'java/perftests/src') 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); + } } } -- cgit v1.2.1