Jose, On 10/22/15 2:22 PM, Jose María Zaragoza wrote: > 2015-10-22 18:26 GMT+02:00 Christopher Schultz <ch...@christopherschultz.net>: >> Ognjen, >> >> On 10/22/15 9:10 AM, Ognjen Blagojevic wrote: >>> Jose & Chris, >>> >>> On 21.10.2015 20:47, Christopher Schultz wrote: >>>> Jose, >>>> >>>> On 10/21/15 7:33 AM, Jose María Zaragoza wrote: >>>>> IMHO >>>>> >>>>> $CATALINA_HOME/lib would be the right place >>>> >>>> +1 >>> >>> Are you willing to elaborate why do you prefer $CATALINA_HOME instead of >>> $CATALINA_BASE? >>> >>> I don't have multiple Tomcat instances running, but I still split >>> $CATALINA_HOME and $CATALINA_BASE to different directories in order to >>> make Tomcat upgrades easier. Everything that is different from original >>> installation goes to $CATALINA_BASE (bin/setenv.sh, conf/*, logs, >>> webapp, etc... as well as additional jars including lib/(jdbc).jar. Thus >>> when I upgrade Tomcat and change $CATALINA_HOME I don't have to think >>> about additional jars. >> >> Our build process auto-builds CATALINA_BASE and so it's (marginally) >> more convenient to have it in CATALINA_HOME. We also have 4 applications >> running on each server from the same CATALINA_HOME and different >> CATALINA_BASEs, but they all use the same JDBC driver. >> >> IMHO, it doesn't matter which one you use. I would have +1'd Jose >> whichever one he said. > > Cool ! > >> Honestly, CATALINA_BASE is probably much better, >> since it won't interfere with other applications that might not need the >> driver, or might require a different version, etc. > > Honestly I've never needed to use CATALINA_BASE > But I 've a question > > every instance uses only its CATALINA_BASE directories or there is any > kind of delegation hierachy for libraries ? > > For example,if my webapp doesn't find a jar file on $CATALINA_BASE/lib > , doest it search on $CATALINA_HOME/lib ?
Yes: the server's ClassLoader prefers JAR files found in CATALINA_BASE over CATALINA_HOME. But if they conflict in odd ways, there can be problems. I can't really think of a good example off-hand, but users seem to find ways of shooting themselves in the foot with the ClassLoaders quite well. -chris --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org