Hi there,

I've been using Apache Commons VFS for implementing a file replication solution. I'm facing a couple issues which I would like to check if someone can give some thoughts.

First issue is regarding the default cache implementation and resolve of local files. Even though I'm setting cache strategy to manual and keeping the local file strongly reachable by keeping a reference to the FileObject in a static field the cache seems not to be working as I would expect. I was expecting that resolving the file once I would have that file in memory no matter what operations would be performed by another process into the same file. But it seems this is not happening... so question is: is my expectation correct and if that's not is there a way to achieve what I'm looking for?

Second issue is mostly a question: the list of final destination/server (I call them Endpoints) for each file that I need to replicate is always the same and so I would like to keep FileSystemManager in memory to avoid opening/closing session for the remote filesystems. But unfortunatelly I've not been able to because of two problems: 1) I do not control and even know when resources needs to be released and so close the FileSystemManager; 2) SoftRefReleaseThread is a daemon thread and so my system hangs in a "clean shutdown" because of this thread. Any thoughts on how I could handle this? Is there a way to set another cache implementation which doesn't requires a daemon thread? Why is this thread a daemon thread by the way?

Thanks in advance for any support you might provide.

regards,
Davi Menezes

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to