qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmora...@apache.org
Subject svn commit: r1613984 - /qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java
Date Mon, 28 Jul 2014 12:42:16 GMT
Author: pmoravec
Date: Mon Jul 28 12:42:15 2014
New Revision: 1613984

URL: http://svn.apache.org/r1613984
Log:
[QPID-5931]: [Java client] JMSException instead of InvalidDestinationException raised when
sending to temporary destination after session closure

Modified:
    qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java

Modified: qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java?rev=1613984&r1=1613983&r2=1613984&view=diff
==============================================================================
--- qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java
(original)
+++ qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java
Mon Jul 28 12:42:15 2014
@@ -527,7 +527,7 @@ public abstract class BasicMessageProduc
                               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 BasicMessageProduc
             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");
             }
         }
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message