Dres Den wrote:
I'm using Derbie as an embedded database for my single-user,
single-threaded, single-everything app.
My question is, if I already do a JDBC close (i.e. Connection.close()),
do I still have to issue a:
DriverManager.getConnection
("jdbc:derby:;shutdown=true");
Ideally yes. You will not corrupt any data if you don't, but the next
time you open a connection to the same database roll-foward recovery
will occur, possibly slowing down your startup. The shutdown just
ensures the database is in a consistent state on disk, so that no
recovery is needed.
(I know that the ensuing SQLException about Derby shutdown is normal).
(PS. I know this is a general JDBC question, but Derby seems like a
friendlier place to ask! :))
I would say actually you asked in the right place, the shutdown=true is
Derby specific. I'm glad you find this a friendly place. :-)
Dan.