On Jun 5, 2009, at 3:00 AM, David Jencks wrote:
On Jun 3, 2009, at 10:35 PM, Kevan Miller wrote:
On Jun 2, 2009, at 6:46 PM, David Jencks wrote:
<snip>
I played with something like this on the plane today..... it might
not take more that a couple days to get _something_ working that
interprets server.xml files. It turns out there's no schema for
tomcat configurations so it may be an adventure interpreting the
same files they do.
We might be able to copy their digester configuration but replace
defaults with geronimo classes instead of tomcat classes. I find
digester grammar so hard to understand however that I started by
generating a schema from a sample file and modifying it to fit the
digeter rules.
My current idea is to have a TomcatServerGBean that has a
server.xml as an attribute, which it reads into a jaxb tree, which
we call a "construct(ClassLoader cl)" method on to set up the
tomcat objects. If this works it should be fairly easy.... no
idea if it will actually work though.
Next step would be a builder that, given a server.xml, sets up
such a gbean.
Sounds interesting. IIUC, this embedded Tomcat instance replaces
our current embedded Tomcat. It improves our ability to configure
this instance -- it's native Tomcat config.
Are you thinking about all configuration files? E.g. WEB-INF/
context.xml, conf/context.xml? There are catalina.policy,
catalina.properties, tomcat-users.xml, also. Hmm. gets a little
messier...
I have enough working now so I can run the admin console on a server
set up this way. I haven't looked at any files other than
server.xml yet. Some like tomcat-users.xml are for a security realm
we aren't going to use or, probably, support using. Not sure about
the others.
Cool. Can you point me to the code?
--kevan