Now that Kernel seems to be going away there needs to be some other assembly point for those services. JMX would be a great framework for this and you could shutdown, restart and configure services in runtime etc.
When running Xindice stand-alone we just start a JMX spine and let it be the server where the services start up. When running embedded you just add those services to an existing spine making integration with tomcat, Jboss, Weblogic etc. etc. very easy ;). For those servers that are not JMX based we provide a way for simple lifecycle administration (start and shutdown) of the stand-alone server without calls to System.exit() and the like.
In my opinion, JMX is the right way to move things forward. The above provides a general summary; it should be said that from what I've seen in the Tomcat 4.1.x releases there seems to be more mbean implementing classes. Either way, separating the db core from the 'connector' layer, and making the db core itself an MBean means that it can readily be deployed into various containers, not just Servlet containers. Think JMS, for example - how cool would it be store messages on a JMS channel directly into Xindice!
Perhaps a look at Slide is also in order - they have defined a special Tomcat SlideHost class:
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="false"
configPath="slide" className="wrappers.catalina.SlideHost">
That they use for dealing with calls to the Slide content management system.
just my $0.02, Pratik
