[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-user
Subject:    Re: Question for posgresq, and jdbc.jar placement.
From:       Christopher Schultz <chris () christopherschultz ! net>
Date:       2015-10-22 20:28:00
Message-ID: 562946D0.6040003 () christopherschultz ! net
[Download RAW message or body]

Jose,

On 10/22/15 2:22 PM, Jose María Zaragoza wrote:
> 2015-10-22 18:26 GMT+02:00 Christopher Schultz <chris@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic