tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject jaxb alternative to digester
Date Fri, 10 Jul 2009 22:39:12 GMT
Geronimo's tomcat integration has up till recently used tomcat server  
components wrapped in geronimo gbean components, and server  
configuration through gbean configuration.  This is less flexible and  
less convenient than server.xml configuration, and we've had several  
requests to provide configuration via server.xml.  However, we need to  
typically use subclasses of the tomcat server classes.  Unfortunately  
I have an unreasoning hatred of digester formed when I tried to debug  
what it was doing.

After a little bit of thought I came up with an alternative jaxb based  
system.  There' s a schema I reverse engineered from digester rules,  
and a bunch of classes modified from ones jaxb generated from the  
schema.  After generating the classes I added some "build" methods  
that go through the jaxb model tree and construct the tomcat  
components and wire them together.  This seems to work fine and I find  
it easy to modify and debug and understand what it's doing.

In case anyone is interested in looking at this it's in our geronimo- 
tomcat6 module in the "model" package.  The schema is under src/main/ 
xsd.

https://svn.apache.org/repos/asf/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6

thanks
david jencks





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message