Hello Bernd,
I already indicated in my previous post why I needed my own interface, but apparently I didn't explain it very well, so I give it another shot
I opted for a singleton Data class with a record cache (a map containing the database records). In my opinion that's the easiest and simplest approach possible (for example you don't have to cope with IOExceptions in read, update,... methods). So before you can call the read-method on your Data instance you have to first initialize (and populate) the record cache. So in Sun's interface there isn't any method suitable to do this, so I created my own interface:
And of course I needed also a method to write the records from the cache back to the file (invoked when the server is stopped or the standalone application exits).
I also redefined some methods from Sun's interface. More info about this approach you can read in
this thread.
Kind regards,
Roel