tags:

views:

78

answers:

1

My boss is worried that our NFS file system will not be happy with the jboss run java process calling getFD().sync on the files we are writing. We have noticed that frequently the time stamp on the created file is minutes (sometimes as many as 15 minutes) after the log claims the file was finished writing. My only guess is that the NFS is hanging on to the file in memory and not writing it till it feels like it. sync should solve that probelm, right?

I also noticed that there is never a close() called on the file. Wondering if that could have been the cause as well?

any thoughts appreciated.

+1  A: 

If you mean that the Java code never calls close() on the stream, yes, that is a bug. Always close a stream, input or output, as soon as use is complete. Good static analysis tools will warn about code that fails to do this.

erickson