From 3d9b12074a603ffa71e0cba303a5b68d834edbd0 Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Mon, 28 Jul 2014 12:42:15 +0000 Subject: [QPID-5931]: [Java client] JMSException instead of InvalidDestinationException raised when sending to temporary destination after session closure git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1613984 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/qpid/client/BasicMessageProducer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qpid/java/client') diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java index 1981d134af..33bafe8f20 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java +++ b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java @@ -527,7 +527,7 @@ public abstract class BasicMessageProducer extends Closeable implements org.apac UUID messageId, int deliveryMode, int priority, long timeToLive, boolean mandatory, boolean immediate) throws JMSException; - private void checkTemporaryDestination(AMQDestination destination) throws JMSException + private void checkTemporaryDestination(AMQDestination destination) throws InvalidDestinationException { if (destination instanceof TemporaryDestination) { @@ -536,13 +536,13 @@ public abstract class BasicMessageProducer extends Closeable implements org.apac if (tempDest.getSession().isClosed()) { _logger.debug("session is closed"); - throw new JMSException("Session for temporary destination has been closed"); + throw new InvalidDestinationException("Session for temporary destination has been closed"); } if (tempDest.isDeleted()) { _logger.debug("destination is deleted"); - throw new JMSException("Cannot send to a deleted temporary destination"); + throw new InvalidDestinationException("Cannot send to a deleted temporary destination"); } } } -- cgit v1.2.1