I have just started writing my first webapp using java/wicket/db4o and all technologies are new to me so please forgive what might be a daft question.
I have created a simple MyDao singleton class that connects to a file-based db4o database and I can write some objects into it and read them back. The problem I have is each time I redeploy my app from Netbeans, I get a com.db4o.ext.DatabaseFileLockedException exception during the tests. This goes away if I delete the DB.
I would think that I need to close() the db4o connection once my MyDao object goes out of scope, but I dont know how to do this. If I was using Perl, I would have a DESTROY() method in my MyDao class that calls the close() on my db4o db. Im not sure what the equivalent mechanism is in java. I have tried to use the finalize() method on my MyDao object but this hasnt worked .
Thanks in advance. Tom