tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Geisser <>
Subject Re: Best practice question: where to place project libraries
Date Wed, 11 Feb 2004 19:12:35 GMT

Josh Rehman wrote:
> Justin Ruthenbeck wrote:
>> As a general rule, strive to keep your webapp self-contained and 
>> autonomous with only J2EE-standard dependencies (things like JNDI 
>> objects that are configurable in every container).  Unless there's a 
>> reason not to (JDBC drivers is one common one), package your own 
>> dependent libraries with your app -- it frees you from versioning 
>> problems (maintaining the correct library versions for your app over 
>> time) and makes migration between containers much easier.
> Thanks. You bring up an interesting aspect of container configuration: 
> database drivers. It would be interesting to extend the 
> META-INF/context.xml tomcat convention to include support for the 
> installation of 3rd party libraries. E.g., libraries placed in 
> META-INF/server/lib will be placed into the similiar tomcat directory on 
> deployment. Same thing for common/lib.

No. I don't think this is a good solution.

The best solution would be to use the database driver inside the 
webapp.war (if there is one provided).
This would require some (heavy) refactoring of the classloader/JNDI
mechanism, but it can be done.

And in an perfect world this would be part of the (next) servlet spec
so every container would behave in the same way.

Ciao, Olli

-- og

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message