views:

75

answers:

3

Disclaimer: I've never used the technique which is described below. That's why there may occur some mistakes or misunderstandings in its description.

I heard that some teams (developers) use 'pre-configured' tomcat. As I understand they add different jars to tomcat \lib folder and do something else.

Once I've read a thread in a java forum where one developer wrote something about recompilation (or reassembly?) of tomcat for certain needs.

Just yesterday I heard a dialog where one developer sayd that his team-mates were not able to deploy the project until he would give them configured tomcat version.

So, I wonder, what is it all about and why do they do it? What benefits can they gain from that?

+1  A: 

Open source projects, always have been an space for customizations (I believe, that's something of its charm), and I think it's acceptable to modify Tomcat for very specific in-house requirements.

But in general I would recommend to avoid a solution that requires hard modifications of open source tools -probably there is another way to do what you want using the existing ; ) (this do not apply for general accepted changes i.e. community Addons, bug fixes, and all the stuff you publish in the project spaces that are accepted and made part of the final solution).

About external lib, I would mentioned them in the project README as platform requirements. so to have a pre-configured server it's not that crazy. in fact it can save you some time, but it's a bonus. you should mention your dependencies somewhere anyway : )

Hope it helps.

SDReyes
A: 

Using a customized version of Tomcat could make upgrading very difficult. The benefit of having an application that does not require a specially configured server is that you can easily move to a new version or even move to an entirely different app server (e.g. Jetty, GlassFish)

I'd also point out that you do not specify the context of the changes. The special configuration may not have been application specific, but was required for security settings, compatibility with the web server being used, etc. You should talk to the developer's in question and learn more about why they require the specialized configuration.

Donal Boyle
A: 

This is the mechanism necessary to provide e.g. JDBC pools and objects over JNDI since that requires it to be in the Tomcat classloader. That is a necessity.

It may also be used to allow multiple deployments to share the same single jar file instead of having it in each WAR file. That is in my opinion generally a bad idea which should be avoided unless absolutely necessary. Keep to standard mechanisms if at all possible.

Thorbjørn Ravn Andersen
downvoting usually go with a reason...
Thorbjørn Ravn Andersen
@Thorbjørn Ravn Andersen: it's not me. Also wonder why you were downvoted.
Roman