Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: Contractors - open/close database

 
Rick DeBay
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Rick DeBay
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic