qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject svn commit: r1102102 - /qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
Date Wed, 11 May 2011 21:43:58 GMT
Author: rajith
Date: Wed May 11 21:43:58 2011
New Revision: 1102102

URL: http://svn.apache.org/viewvc?rev=1102102&view=rev
Log:
QPID-3254
Added a check to ensure that durable subscriptions are only created for Topics.
Added code to mark a destination durable. If the addressing string explicitly specified durable==false,
it will be overriden.

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

Modified: qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java?rev=1102102&r1=1102101&r2=1102102&view=diff
==============================================================================
--- qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java (original)
+++ qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java Wed May
11 21:43:58 2011
@@ -1058,6 +1058,11 @@ public abstract class AMQSession<C exten
             try
             {
                 handleAddressBasedDestination(dest,false,true);
+                if (dest.getAddressType() !=  AMQDestination.TOPIC_TYPE)
+                {
+                    throw new JMSException("Durable subscribers can only be created for Topics");
+                }
+                dest.getSourceNode().setDurable(true);
             }
             catch(AMQException e)
             {



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message