You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Tony Cooke <To...@elders.com.au> on 2006/07/21 02:50:17 UTC

[Commons VFS] Remote file monitoring with network interruption or server maintenance

Hi all.

 

I was just wondering what would happen if I was monitoring a remote file
and there was a network interruption or server maintenance.

(For example. If I was monitoring a file located on another server and
that server was taken down for maintenance)

 

Would the "fileDeleted" event be fired? Would there be an exception
because the file could not be reached?

 

If so would that automatically remove the file from being monitored or
does that need to be programmatically included?

 

The reason I ask is that if it happens automatically then I would need
to add recovery reties in and when the server is operational again I'd
then need to reconnect and keep checking.

 

Thanks.

 

All the best,

Tony

 


Re: [Commons VFS] Remote file monitoring with network interruption or server maintenance

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
> I was just wondering what would happen if I was monitoring a remote file
> and there was a network interruption or server maintenance.
>   
To say the truth, I dont know exactly ;-)

Well, not reaching a network resource should result in an exception -
what I can see from the source-code, this exception will be catched and
logged. So you might get flooded with log.error() messages.
The file will still be monitored and no event (delete, etc) should be fired.

But best will be you try it - monitor a ftp file and shutdown the ftp
server .... if the system did not behave as outlined above we should fix it.

Ciao,
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org