My experience has been the reverse -- shared/lib is usually disabled and not working, common/lib is used most of the time.

The difference between the two is common/lib is visible to both tomcat internals and the webapps. That's why we put the db drivers in there for container managed connection pooling. Shared/lib is only visible to the webapps -- tomcat internals can't see or access it.

--David

Luis Rivera wrote:

  Hi,

Just as a comment. I use the shared classloader by using the shared folder to avoid loading multiple times my shared libraries (for jni use). I am not sure what is the difference with the common/lib classloader, but it did not
work when I used that one.

--Luis R.

On 4/24/07, David Delbecq <[EMAIL PROTECTED]> wrote:


Sorry Leon but you are wrong.
What Thomas looks for is common/lib, not server/lib
according to
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html it's
common/lib that is loaded in common classloader. server/lib is loaded in
catalina classloader which is not visible for webapps.


To answer Thomas, yes, classes in common/lib get loaded only once in
permgen. The problem of loading classes in common/lib is that they get
shared. If some webapp call some static setter in JAF or JavaMail (to
set a resolver of any kind) this one will be used by all running
webapps. This can lead to curious bugs you might take a lot of time to
solve.


En l'instant précis du 24/04/07 10:42, Leon Rosenberg s'exprimait en ces
termes:
> i thinks its server/lib you are looking for (or common/endorsed) but
> i'm not sure whether java mail has some static fields which will be
> screwed by sharing them among all apps.
>
> leon
>
>
> On 4/24/07, Thomas Papke <[EMAIL PROTECTED]> wrote:
>> I need some help to the classloader concept of tomcat... (version 5.5.)
>>
>> Our Tomcat has about 60 webapps running - right now every webapps have >> in their Web/lib directory the libs for activation and java mail (among
>> other libs). As I understand, right now this libs are 60times loaded
>> into Permgen - if i will but them into the common/lib of tomcat - they >> are loaded only once info permgen? Any problem to share activation.jar
>> and mail.jar inside common/lib for all webapps?
>>
>> Thanks a lot,
>>
>> Thomas
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to