geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Quick Jetty/Tomcat configuration idea
Date Mon, 27 Jun 2005 07:06:41 GMT
Aaron Mulder <> wrote on 27/06/2005 03:28:28 

> On Tue, 14 Jun 2005, Jeff Genender wrote:
> > I was talking with Bruce about making the Jetty/Tomcat choice a simple
> > comment and uncomment task and we came up with a possible idea 
andwanted to
> > run this by people.
> > 
> > Can the plan parsers support the <!ENTITY> to be used as an include?
> > Example:
> > 
> > <!ENTITY jetty SYSTEM "includes/jetty.xml"> 
>    I like the idea of splitting out the Tomcat and Jetty information. 
> I'm not sure how well the deployer will handle it if you give it an XML 
> file as a deployment plan argument and that XML file imports or includes 

> other XML files.  Certainly JSR-88 only lets you specify a single 
> "deployment plan" file, which is why we need to be able to put all an 
> EAR's modules' deployment information into a single file -- so remote 
> deployment would undoubtedly not work this way (though this only matters 

> if you're trying to redeploy your J2EE server configuration remotely, 
> which would be a little odd).

I would like to see remote deployment working for all cases.  Who knows 
when you might need to be odd :-)

>    In any case, it might be more workable if part of the build
> process did some kind of file merging.  We already run velocity on the
> plans -- I bet there's some way to have velocity insert either
> "jetty-content.xml" or "tomcat-content.xml" into "j2ee-server-plan.xml" 
> about the same time we substitute version numbers and things.  Then if 
> goes well, you could just do something like "maven 
> or whatever, and it would produce a formatted server plan with the 
> appropriate web container content.

I like the idea of splitting the files up, but if that is going to break 
remote deployment then I think we need to come up with another way.

Could we do a simple hack (not a long term solution) that does a textual 
replace (e.g. using Ant's replace task) on comment start/end statements 
containing special markers in the plans, depending on whether Tomcat or 
Jetty has been selected? I haven't tried this out.

This still allows easy editing/validation of the plans in any XML editor. 
We may want to have something in the marker to indicate it shouldn't be 
edited by users.

Assuming we only allow Jetty OR Tomcat (not both to be enabled), if Tomcat 
was enabled, then the following string replacements would occur:

"<!--plan_marker_if_tomcat_enabled_startcomment-->" replaced with "<!--"
"<!--plan_marker_if_tomcat_enabled_endcomment-->" replaced with "-->"
"<!--plan_marker_if_jetty_enabled_startcomment-->" replaced with ""
"<!--plan_marker_if_jetty_enabled_endcomment-->" replaced with ""

example of changes to j2ee-deployer-plan.xml

    <gbean name="WebBuilder" 
        <attribute name="defaultSessionTimeoutSeconds">1800</attribute>

    <gbean name="WebBuilder" 


> Aaron
> > I am sure you can start to see the idea? The idea is to remove all
> > references to Jetty in the j2ee-server-plan.xml, and allow it to 
> > the proper configuration.  We can do this for the deployer and
> > runtime-deployer plans as well.  This way we only need to 
> > just a couple of places.
> > 
> > Is this something that is doable?  Thoughts?
> > 
> > Jeff
> > 
> > 
> > 

This e-mail message and any attachments may contain confidential, 
proprietary or non-public information.  This information is intended 
solely for the designated recipient(s).  If an addressing or transmission 
error has misdirected this e-mail, please notify the sender immediately 
and destroy this e-mail.  Any review, dissemination, use or reliance upon 
this information by unintended recipients is prohibited.  Any opinions 
expressed in this e-mail are those of the author personally.
View raw message