this is what i have done :
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
System.err.println("Calling Shutdown Hook");
docleanup();
System.exit(0);
}
});
public void docleanup() {
activeconnection.close();
server.stop();
}
i get the expected line 'Calling Shutdown Hook', but otherwise there is no
error/stack trace if the shutdownhook is called. Also if i see the db files
folder i can see the 'lock' file still there after a restart.
regards
Akshay
On Wed, Aug 24, 2011 at 10:43 PM, Thomas Mueller <
[email protected]> wrote:
> Hi,
>
> By default, H2 registers its own shutdown hook.
>
> > I an already using Runtime.addShutDownHook method , but it does not seems
> to
> > be effective.
>
> Well, what exactly did you do, and what was the result (exception,
> stack traces)?
>
> Regards,
> Thomas
>
> --
> 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.
>
>
--
Akshay Mehta
Ph. - 09302104522
--
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.