servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lh...@apache.org
Subject svn commit: r795747 - /servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java
Date Mon, 20 Jul 2009 10:33:28 GMT
Author: lhein
Date: Mon Jul 20 10:33:28 2009
New Revision: 795747

URL: http://svn.apache.org/viewvc?rev=795747&view=rev
Log:
On failures withing the processing of the polled file the lock isn't released. If for example
the file is locked by the underlying OS the processing may fail with an IO exception. In that
case the file will never again be processed unless you restart the polling process. Now the
lock is released upon failure and another thread may try to process the file again.

Modified:
    servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java

Modified: servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java?rev=795747&r1=795746&r2=795747&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java
(original)
+++ servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java
Mon Jul 20 10:33:28 2009
@@ -372,6 +372,8 @@
             }
         } catch (Exception e) {
             logger.error("Failed to process file: " + aFile + ". Reason: " + e, e);
+            // unlock the file on processing failures, otherwise it won't be processed any
more
+            unlockAsyncFile(aFile);
         }
     }
 



Mime
View raw message