[netcdf-java] IOSP open file risk

Hi,

Our Tomcat server was barfing with "too many open files." The files (including /dev/null) that were left open where those in my ncml "location." My custom IOSP "close" method simply delegates to super.close(). However, the RandomAccessFile in the superclass that is closed is null. It is not the file that was handed to my IOSP. I see that the "raf" there is protected, so I could set it, but that seems a bit obscure.

This seems rather dangerous for the unwitting IOSP developer like me. It seems like you, on the NetCDF side, could set the "raf" in AbstractIOServiceProvider when you construct my IOSP. Otherwise, I would suggest that you make "close" abstract to ensure that it is dealt with.

Cheers,
Doug



  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: