I've seen the same thing with embedded Derby while using SLIME. From within the REPL I was always able to reconnect to the same database, so it didn't really impact me. Outside the REPL I didn't notice a problem.
If it holds you up, here's one observation you might investigate. Calling (.close conn) doesn't remove the lock file, however causing a new connection to fail does. It seems the embedded Derby driver may have some locking clean-up logic in its connect call. Perhaps browsing the Derby source might show how to invoke the real "release lock" method. - Jeff On Tuesday 17 February 2009 12:57, Stuart Sierra wrote: > > Is your Clojure app running in a REPL? I've run into situations where > it seems like the Derby lock file doesn't go away until the Clojure > process terminates. > > -Stuart Sierra > > > On Feb 17, 10:28 am, BrianS <bstephen...@enclojure.org> wrote: > > Has anyone had experience creating clojure applications that use the > > embedded derby database driver? I am having an issue where I am unable > > to get the derby embedded database to shut down properly from within > > clojure. > > > > More specifically, whenever a java app accesses a derby embedded > > database, it creates a lock file to prevent other apps from accessing > > the db and corrupting it. This file should be removed in a proper > > shutdown of a derby database, but so far, even though I appear to have > > gotten the derby database engine to shutdown from within clojure with > > (java.sql.DriverManager/getConnection "jdbc:derby:;shutdown=true"), > > the lock file still remains, and no app can access the derby database > > until the db.lck file is deleted manually. > > > > I assumed this file would be deleted automagically during database > > shutdown, but is this actually something my app should do manually > > after shutting down its derby database? Thanks in advance for any > > assistance, I appreciate that this is only marginally a clojure issue. > > > > Brian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---