This week's book giveaway is in the Java 9 forum. We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line! See this thread for details.
The interface DBAccess doesn't have any open() or close() methods. I'd like to implement close() so I can close the RandomAccessFile object I keep open during the life of the object that maps to the database file. The open() is no big deal as the Data class which implements DBAccess can call open() from the constructor, but there is nowhere to call close() from. Any ideas on cleaning things without waiting for the GC thread to get around to it?
posted 14 years ago
Never mind, the situation shouldn't be a problem. The only way there could be an issue is if the server or stand-alone client is restarted within the same JVM, and the way the programs are to be run will cause a new JVM to be created each time.