summaryrefslogtreecommitdiff
path: root/qpid/java/client/src
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@apache.org>2014-07-28 12:42:15 +0000
committerPavel Moravec <pmoravec@apache.org>2014-07-28 12:42:15 +0000
commit3d9b12074a603ffa71e0cba303a5b68d834edbd0 (patch)
tree19ccca98426d8145f03402e80e7188902e4c5a34 /qpid/java/client/src
parentb877fef68695499fc63c1d0aef19cd1415981052 (diff)
downloadqpid-python-3d9b12074a603ffa71e0cba303a5b68d834edbd0.tar.gz
[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
Diffstat (limited to 'qpid/java/client/src')
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java6
1 files changed, 3 insertions, 3 deletions
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");
}
}
}