Thanks Chris! On Tue, Nov 4, 2014 at 10:41 AM, Christopher Schultz < ch...@christopherschultz.net> wrote:
> > I guess, it's easy to add new directories to > > TOMCAT/conf/catalina.properties file: > > > > common.loader= > > > ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar > > > > > > > > to now read: > > > > common.loader= > > > ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.base}/shared,${catalina.base}/shared/*.jar,${catalina.home}/shared,${catalina.home}/shared/*.jar > > just use shared.loader, which is I think what you're asking for. > It's blank in a default configuration. > > Yes, I missed that one :) that's what I had in mind. > > What are you thoughts? Would it make sense to keep a separate > > directory for shared libraries? Should we make it default - to > > encourage others to create a directory if they want to. > > - -1 This is confusing and would be surprising if you hadn't intended to > use this. The "shared" loader was disabled by default because nobody > could figure out what the heck it was for and basically continually > broke their own configurations using it. So, now, everything goes into > either lib/ or the web application's WEB-INF/lib and everyone seems to > be happy. One can always re-enable the shared loader if you know it > exists, in which case you probably know what it's for and why you'd > use it. (Hint: use of the shared loader almost never makes any sense). > > Agreed, it might confusing. It's probably better idea to pack up your libraries with your apps in WEB-INF/lib. Why do shared loaders "almost never make any sense"? What kind of problems did you have with shared.loader? However, here's an (rare) example where that might be useful: - one box with limited memory - one tomcat instance hosting X (e.g. 10) applications - all applications are using the same large shared libraries - e.g. 200MB - you don't want to have a separate libraries for each application (your PermGen space will grow significantly otherwise) - it might make sense to move the shared libraries into shared folder (or tomcat/lib) Now, this architecture is probably not the greatest idea. I always strive for the application/process isolation, i.e. one-application-per-tomcat-instance - so I can have independent lifecycles for my apps, but that requires more resources (memory,cpu) or even more hardware. > I like the current default configuration but I'm willing to entertain > other ideas. I just don't like this one in particular (default to > split configuration). > > So, I do agree - keeping it how it is - is probably the best idea. There is always an option for people that would like to configure that further. Thanks! Neven PS. Apologies for the off-topic diversion :)