You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ra...@apache.org on 2012/07/30 23:18:16 UTC

svn commit: r1367309 - /qpid/branches/0.18/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java

Author: rajith
Date: Mon Jul 30 21:18:16 2012
New Revision: 1367309

URL: http://svn.apache.org/viewvc?rev=1367309&view=rev
Log:
Porting to 0.18 branch.
QPID-3575 Changed the name of the system prop to
"qpid.session.legacy_exception_behaviour". The system prop will now
restore the old behavior.

(cherry picked from commit 3f3d5165649e78bba094dce6443ff9eeeb56af0c)

Modified:
    qpid/branches/0.18/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java

Modified: qpid/branches/0.18/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.18/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java?rev=1367309&r1=1367308&r2=1367309&view=diff
==============================================================================
--- qpid/branches/0.18/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java (original)
+++ qpid/branches/0.18/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java Mon Jul 30 21:18:16 2012
@@ -129,7 +129,7 @@ public class AMQSession_0_10 extends AMQ
      */
     private final RangeSet _txRangeSet = RangeSetFactory.createRangeSet();
     private int _txSize = 0;
-    private boolean _isHardError = Boolean.getBoolean("qpid.session.is_hard_error");
+    private boolean _isHardError = Boolean.getBoolean("qpid.session.legacy_exception_behaviour");
     //--- constructors
 
     /**
@@ -1051,15 +1051,18 @@ public class AMQSession_0_10 extends AMQ
             AMQException amqe = new AMQException(AMQConstant.getConstant(code), _isHardError, se.getMessage(), se.getCause());
             _currentException = amqe;
         }
-        cancelTimerTask();
-        stopDispatcherThread();
-        try
-        {
-            closed(_currentException);
-        }
-        catch(Exception e)
+        if (!_isHardError)
         {
-            _logger.warn("Error closing session", e);
+            cancelTimerTask();
+            stopDispatcherThread();
+            try
+            {
+                closed(_currentException);
+            }
+            catch(Exception e)
+            {
+                _logger.warn("Error closing session", e);
+            }
         }
         getAMQConnection().exceptionReceived(_currentException);
     }



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