Since I too have had this question/issue, I tried this.. it worked!
(nut using "-tcpShutdownForce", not "-shutdownForce" which Thomas gave
probably from memory). I never could figure out why it would stay
running, but with connection-pools, Thomas's explanation makes sense
(and -tcpShutdownForce seems to be required).
A simple Linux init script I use:
#!/bin/bash
#
# h2db
#
# chkconfig: - 80 20
# description: H2DB
# processname: h2db
# pidfile: /var/run/hsdb.pid
# config: /var/tomcat/conf/
H2_HOME="/var/tomcat/h2db/h2-1.3.159.jar"
H2_DATA="/var/tomcat/h2db/"
# Source function library.
. /etc/init.d/functions
RETVAL=$?
start() {
echo -n $"Starting H2DB"
daemon --user www "java -Xmx256M -Dh2.queryCacheSize=0 -
Dh2.returnLobObjects=false -Dh2.objectCacheSize=50000 -
Dh2.pageSize=8192 -Dh2.maxMemoryRows=100000 -cp $H2_HOME
org.h2.tools.Server -tcpAllowOthers -tcpPort 9101 -baseDir $H2_DATA &"
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/h2db
}
stop() {
echo -n $"Stopping H2DB"
daemon --user www "java -cp $H2_HOME org.h2.tools.Server -
tcpShutdownForce -tcpShutdown \"tcp://localhost:9101\" "
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/h2db
}
case "$1" in
start)
start
;;
restart)
stop
start
;;
stop)
stop
;;
esac
exit $RETVAL
--
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.