Hi Thomas,
I think that the problem of the remaining lock.db file is caused by the 
problem discussed by the thread.
The problem is that when I shut down tomcat the web application is shutdown 
first but due to the way H2 driver is loaded (as discussed in the Tomcat 
thread) the pool is not being disposed of by Tomcat at that point and hence 
the problem appears (since H2 has open connections). This is an interaction 
of H2 driver with Tomcat
So I can't figure out what you mean that "the database stays open, that's 
correct and OK. "


Am Donnerstag, 21. Juni 2012 22:41:15 UTC+3 schrieb Thomas Mueller:
>
> Hi, 
>
> > I stop Tomcat using $CATALINA_HOME/bin/shutdown.sh and I occusionally 
> > expererience that the .lock.db file is not deleted. 
>
> What happens if you delete this file? Does it stay deleted, or does it 
> re-appear after a few seconds? If it stays deleted, then the database 
> was not closed but the process was stopped. If it re-appears, then the 
> process is still running. 
>
> > You are saying: 
> >>>This is a bit strange. Tomcat should dispose the connection pool, 
> >>>which in turn should close all connections to the database. That would 
> >>>delete the .lock.db file. If it's not deleted, then at least one 
> >>>database connection remains open during the Tomcat shutdown. 
>
> > But this is the issue of this thread. 
>
> Well, it's a problem... It might not be your problem. 
>
> > My application closes all the 
> > connections, which are returned to Tomcat's pool and on shutdown Tomcat 
> does 
> > not dispose all of the connections before shutting down the web app and 
> so 
> > on and as a result the .lock.db file remains. 
>
> Well, at the beginning of the mail you wrote you shut down *Tomcat*, 
> not just the web app. If the web app is stopped, then the database 
> stays open, that's correct and OK. 
>
> > Does your solution solve this issue as well? 
>
> No. 
>
> Regards, 
> Thomas 
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/Xz5bGvt2F-kJ.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to