geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Possible for G to directly consume a Tomcat server config w/o changes?
Date Tue, 02 Jun 2009 22:46:57 GMT

On May 19, 2009, at 3:09 PM, David Jencks wrote:

>
> On May 19, 2009, at 12:42 PM, Bill Stoddard wrote:
>
>> Lin Sun wrote:
>>> One quick way would be allow users to start a tomcat server from a
>>> geronimo tomcat javaee5 assembly  or little G tomcat assembly(say
>>> geronimo.sh start tomcatOnly=true).   It is possible to just launch
>>> the tomcat server, and read the configuration files (conf/ 
>>> server.xml,
>>> etc) and start a tomcat server from a geronimo tomcat assembly, by
>>> using the Catalina.java provided by tomcat.   But this server/app
>>> would have no relationship with geronimo, other than using the jars
>>> provided by the geronimo tomcat assembly.   The deployed app would  
>>> be
>>> tracked only by tomcat, and not by geronimo.   We should be able to
>>> achieve this without adding any new jars.
>>>
>>> If we need more than that, I can for seen the following issues that
>>> need investigation -
>>> 1. We'll have to provide better server integration with tomcat and  
>>> be
>>> able to read the server configuration from tomcat's server
>>> configuration files, along with using config.xml configurations.
>>>
>> This would be an absolute minimal requirement.  Would this be  
>> really difficult?
>>
>>> 2. We'll have to migrate user's app automatically for the user, when
>>> the user's app is a bit complicated that contains any need to  
>>> require
>>> a geronimo-web.xml
>>>
>>>
>> This is where things get more interesting.... lots of permutations  
>> and edge cases to consider.
>
> I'm not enough of a tomcat expert to know exactly what information a  
> server.xml contains so I'm not quite sure how much the following  
> makes sense.
>
> I think I would approach this by building a namespace aware builder  
> that can interpret documents following the server.xml schema  and  
> construct the entire tomcat server from it.  In other words, instead  
> of starting with our current tomcat6 plugin, the builder would  
> construct a replacement for it from the server.xml.  If server.xml  
> contains info on apps that are deployed in the tomcat instance, this  
> could perhaps hook into or extend the current TomcatModuleBuilder to  
> also set up plugins for each web app involved.
>
> The first part here might not be too hard.  IMO if we treat the  
> server.xml as a geronimo plan that would be acceptable.  I'd  
> recommend trying jaxb rather than using xmlbeans.  I don't know how  
> practical this would turn out to be but it's worth starting with.
>
> I personally think this is too large an addition to plan to get into  
> 2.2.  However if a motivated person shows up with something working  
> before we solve the other problems I think we could consider it.   
> 2.2 is already so much later than we had planned I don't want to  
> hold it up for any new features after the other problems have been  
> solved.

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.

thanks
david jencks

>
>
> thanks
> david jencks
>
>>
>>> Lin
>>>
>>> On Mon, May 18, 2009 at 3:49 PM, Bill Stoddard  
>>> <wgstoddard@gmail.com> wrote:
>>>
>>>> I know G can't consume tomcat configs today, but is this a  
>>>> feature that
>>>> could be developed for G 2.2?
>>>>
>>>> Say I have an application successfully deployed and running under  
>>>> Tomcat..
>>>> wouldn't it be nice if I were able to drop the tomcat server  
>>>> config into a
>>>> Geronimo-Tomcat assembly, start the server, deploy the app and be  
>>>> up and
>>>> running in seconds.  I'm talking about a seamless, zero effort/ 
>>>> zero touch
>>>> migration from Tomcat to a Geronimo-Tomcat assembly.  Is it  
>>>> possible?  If
>>>> not, what simplifying assumptions could be made to 'mostly'  
>>>> achieve a
>>>> zero-touch migration?
>>>> What are the primary challenges with consuming a tomcat config  
>>>> unchanged
>>>> with a G-Tomcat assembly?  Same Q's apply for Jetty... what's  
>>>> 'doable'
>>>> with-in reason?
>>>>
>>>> Thanks,
>>>> Bill
>>>>
>>>>
>>>
>>>
>>

Mime
View raw message