qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1535365 - in /qpid/trunk/qpid/java: amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/impl/ amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/
Date Thu, 24 Oct 2013 12:50:49 GMT
Author: rgodfrey
Date: Thu Oct 24 12:50:48 2013
New Revision: 1535365

URL: http://svn.apache.org/r1535365
Log:
QPID-5206 : Applied patch from David Ingham

Modified:
    qpid/trunk/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/impl/SessionImpl.java
    qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/LinkEndpoint.java
    qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/SessionEndpoint.java

Modified: qpid/trunk/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/impl/SessionImpl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/impl/SessionImpl.java?rev=1535365&r1=1535364&r2=1535365&view=diff
==============================================================================
--- qpid/trunk/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/impl/SessionImpl.java
(original)
+++ qpid/trunk/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/impl/SessionImpl.java
Thu Oct 24 12:50:48 2013
@@ -921,7 +921,9 @@ public class SessionImpl implements Sess
                             consumers.remove();
                             try
                             {
-                                _connection.getExceptionListener().onException(e);
+                                ExceptionListener expListener = _connection.getExceptionListener();
+                                if (expListener != null)
+                                    expListener.onException(e);
                                 consumer.close();
                             }
                             catch (JMSException e1)

Modified: qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/LinkEndpoint.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/LinkEndpoint.java?rev=1535365&r1=1535364&r2=1535365&view=diff
==============================================================================
--- qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/LinkEndpoint.java
(original)
+++ qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/LinkEndpoint.java
Thu Oct 24 12:50:48 2013
@@ -395,14 +395,17 @@ public abstract class LinkEndpoint<T ext
                 default:
                     return;
             }
+            
+            if (getSession().getState() != SessionState.END_RECVD)
+            {
+                Detach detach = new Detach();
+                detach.setHandle(getLocalHandle());
+                if(close)
+                    detach.setClosed(close);
+                detach.setError(error);
 
-            Detach detach = new Detach();
-            detach.setHandle(getLocalHandle());
-            if(close)
-                detach.setClosed(close);
-            detach.setError(error);
-
-            getSession().sendDetach(detach);
+                getSession().sendDetach(detach);
+            }
 
             getLock().notifyAll();
         }

Modified: qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/SessionEndpoint.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/SessionEndpoint.java?rev=1535365&r1=1535364&r2=1535365&view=diff
==============================================================================
--- qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/SessionEndpoint.java
(original)
+++ qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/SessionEndpoint.java
Thu Oct 24 12:50:48 2013
@@ -187,9 +187,16 @@ public class SessionEndpoint
     private void detachLinks()
     {
         Collection<UnsignedInteger> handles = new ArrayList<UnsignedInteger>(_remoteLinkEndpoints.keySet());
+        Error error = new Error();
+        error.setCondition(LinkError.DETACH_FORCED);
+        error.setDescription("Force detach the link because the session is remotely ended.");
         for(UnsignedInteger handle : handles)
         {
-            detach(handle, null);
+            Detach detach = new Detach();
+            detach.setClosed(false);
+            detach.setHandle(handle);
+            detach.setError(error);
+            detach(handle, detach);
         }
     }
 



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


Mime
View raw message