Dave Johnson on open web technologies, social software and software development
Dave Johnson in Links
01:57AM Jun 25, 2004
Comments [0]
Tags:
Links
Dave Johnson in Links
01:36AM Jun 25, 2004
Comments [0]
Tags:
Links
Dave Johnson in Links
04:04PM Jun 24, 2004
Comments [0]
Tags:
Links
Dave Johnson in Links
12:40PM Jun 24, 2004
Comments [0]
Tags:
Links
Dave Johnson in Links
12:11PM Jun 24, 2004
Comments [0]
Tags:
Links
Dave Johnson in Links
11:28AM Jun 24, 2004
Comments [0]
Tags:
Links
Dave Johnson in Links
05:59AM Jun 24, 2004
Comments [0]
Tags:
Links
Dave Johnson in Links
01:45PM Jun 23, 2004
Comments [0]
Tags:
Links
Dave Johnson in Links
01:36PM Jun 23, 2004
Comments [0]
Tags:
Links
I'm messing around with HSQLDB because I need to create an easy-to-install demo-only version of Roller. I want to bundle everything needed to run Roller and make it drop-dead simple to try Roller on your own machine. All that you, the potential Roller user, will have to do is to unzip the distribution file and run a startup script.
To make this work I need Roller, a database, and a Web app server, all bundled together into one downloadable file. That is easy to do: I start with a Tomcat distribution and drop Roller into the webapps directory. When Tomcat starts, Roller will start. Roller won't function without a database, so I need to add the tiny pure-Java HSQLDB database to the mix. I need to get HSQLDB started before Roller starts. This part is not so easy: after looking at the HSQLDB docs I found that I have at least three options:
import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; import org.roller.util.HSQLDBUtility; public class TomcatHSQLDBPlugin implements LifecycleListener { public void lifecycleEvent(LifecycleEvent event) { if (event.getType().equals(Lifecycle.START_EVENT)) { HSQLDBUtility.start(); } else if (event.getType().equals(Lifecycle.STOP_EVENT)) { HSQLDBUtility.stop(); } else { System.out.println(getClass().getName()+": Not handling LifecycleEvent: "+event.getType()); } } }
To plug-in to the Tomcat startup and shutdown process, I had to do two things. First, I placed a jar with my TomcatHSQLDBPlugin and HSQLDBUtility classes in a jar in tomcat/server/lib. Second, I added the following XML to the tomcat/conf/server.xml file along side the listeners already in the file:
<Listener className="org.roller.tomcat.TomcatHSQLDBPlugin" debug="0"/>
That's that. I've got this stuff working now. Next up: JSPWiki integration and then I'll make Roller-Demo available for download on SourceForge.
Dave Johnson in Roller
01:30PM Jun 23, 2004
Comments [4]
Tags:
Roller
I'll be at JavaOne this year, my first time ever. I haven't been to a real conference or to San Franciso in a couple of years, so I am pretty excited about the whole deal. I'm looking forward to meeting the Java bloggers, too. For example, I've never met Matt Raible or Russell Beattie or Simon Brown, or any of the other Java bloggers and I hope to change that next week. I also hope to hook up with some of the Sun Bloggers to talk about Roller at Sun. Along those lines: Atlassian is organizing a meetup that looks to be interesting.
Dave Johnson in Java
01:59PM Jun 22, 2004
Comments [5]
Tags:
Java
Dave Johnson in Java
01:30PM Jun 22, 2004
Comments [2]
Tags:
Java
Dave Johnson in Links
07:27AM Jun 22, 2004
Comments [0]
Tags:
Links
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
Comments [3]
Tags:
Java
Testing Roller 0.9.9.1.
Dave Johnson in General
11:18AM Jun 20, 2004
Comments [1]
Tags:
General
Joel Spolsky Microsoft took over the browser market fair and square by making a better product, but they were so afraid that Web-based applications would eliminate the need for Windows that they locked the IE team in a dark dungeon and they haven't allowed improvements to IE for several years now.
Dave Johnson in Microsoft
07:53PM Jun 15, 2004
Comments [0]
Tags:
Microsoft
« Previous page | Main | Next page »