Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

How to release lock of file to move it on exception (corrupted gz file)

$
0
0
I need to implement a handler that reacts on ZipException to move away
corrupted gz files, otherwise the route will endlessly retry to unmarshal
the gz.

The problem is that at the moment the exception is thrown there is a lock on
this file (on linux "canWrite()" returns fals) and ther is the camel lock
file.

Is there an elegant camel way to say/configure the onException that the lock
is released?

at the moment it looks like that:
onException(ZipException.class).handled(true).process(corruptedFileProcessor).stop();

thanks in advance

Viewing all articles
Browse latest Browse all 5648

Trending Articles