servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r691063 - /servicemix/components/engines/servicemix-wsn2005/trunk/src/main/java/org/apache/servicemix/wsn/jms/JmsPullPoint.java
Date Mon, 01 Sep 2008 21:24:11 GMT
Author: gnodet
Date: Mon Sep  1 14:24:11 2008
New Revision: 691063

URL: http://svn.apache.org/viewvc?rev=691063&view=rev
Log:
Fix wrong use of JMS session

Modified:
    servicemix/components/engines/servicemix-wsn2005/trunk/src/main/java/org/apache/servicemix/wsn/jms/JmsPullPoint.java

Modified: servicemix/components/engines/servicemix-wsn2005/trunk/src/main/java/org/apache/servicemix/wsn/jms/JmsPullPoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-wsn2005/trunk/src/main/java/org/apache/servicemix/wsn/jms/JmsPullPoint.java?rev=691063&r1=691062&r2=691063&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-wsn2005/trunk/src/main/java/org/apache/servicemix/wsn/jms/JmsPullPoint.java
(original)
+++ servicemix/components/engines/servicemix-wsn2005/trunk/src/main/java/org/apache/servicemix/wsn/jms/JmsPullPoint.java
Mon Sep  1 14:24:11 2008
@@ -104,7 +104,6 @@
     @Override
     protected synchronized List<NotificationMessageHolderType> getMessages(int max)
throws ResourceUnknownFault,
             UnableToGetMessagesFault {
-        Session jmsSession = null;
         try {
             if (max == 0) {
                 max = 256;
@@ -124,13 +123,13 @@
             return messages;
         } catch (JMSException e) {
             log.info("Error retrieving messages", e);
-            if (jmsSession != null) {
+            if (session != null) {
                 try {
-                    jmsSession.close();
+                    session.close();
                 } catch (JMSException inner) {
                     log.debug("Error closing session", inner);
                 } finally {
-                    jmsSession = null;
+                    session = null;
                 }
             }
             UnableToGetMessagesFaultType fault = new UnableToGetMessagesFaultType();



Mime
View raw message