Blogging Roller

Dave Johnson on open web technologies, social software and software development

Embedding HSQLDB in Tomcat.

I found an interesting article on Embedding HSQLDB in Eclipse, but what I really want to do is to embed HSQLDB in Tomcat. Is there an easy way to add a "lifecycle" plugin to Tomcat so that HSQLDB is started by Tomcat startup and shutdown by Tomcat shutdown .

Dave Johnson in Java • 🕒 04:42AM Jun 21, 2004
Tags: Java
Comments:

[Trackback] Instead of fixing real bugs in Roller Dave is playing with HSQLDB . Well it is understandable if we want to take a break from boring Jroller maintenance... Anyway specs are written to be readed carefully. However for those who don't wan't to re...

Posted by Euxx on June 22, 2004 at 04:36 AM EDT #

After Eugene's snide comment, he suggests using a Servlet ContextListener to start HSQLDB at web application startup time. This is not exactly the same thing as Tomcat start time, but it may work for me. First, I'm going to look at the embedding options offered by HSQLDB.

Posted by Dave Johnson on June 22, 2004 at 11:15 AM EDT #

The great thing about using the context listener is that different applications don't see (or must not see) each other's database. And that could mean less locking.

Btw, if you need two webapps to see the same database, either they are the same application, or one of them is not web-based.

Posted by Tiago Silveira on June 22, 2004 at 05:39 PM EDT #

Post a Comment:
  • HTML Syntax: NOT allowed