I'm running H2 in mixed-mode (embedded & TCP), but I can't seem to get
it to shutdown cleanly because I can see that my sequence numbers are
jumping by 50 every time I bounce the JVM. The app is running as a
service using the Java Service Wrapper. When shutdown I see the lock
file is gone, but the trace file remains. Is that right? What can I do
to make sure it shuts down clean? Is there any way of figuring out if
all connections are closed or what may be hanging on using logging/
debugging?

Here is the URL used by the connection pool: jdbc:h2:../h2/
db;FILE_LOCK=SOCKET;IFEXISTS=FALSE

Here is how the app is started in the service wrapper:

<code>
                HibernateManager.instance(); // starts db connection pool using 
url

                final ArrayList<String> parms = new ArrayList<String>();
                parms.add("-tcpAllowOthers");
                parms.add("-baseDir");
                parms.add("../h2");
                h2Server = Server.createTcpServer(parms.toArray(new
String[parms.size()]));
                h2Server.start();
                logger.info("H2 Server started in: " + 
CommonUtil.getTime(start) +
"s.");
</code>

Here is how it stops:

<code>
                if (h2Server != null) {
                        h2Server.stop();
                        logger.info("H2 shut down normally");
                }
                HibernateManager.instance().destroy(); // shuts down pool and 
closes
all pooled connections
</code>

TIA.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to