You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ole Ersoy <ol...@gmail.com> on 2011/06/01 21:08:19 UTC

Tomcat 7 Shared Class Loader Removed?

Hi,

I noticed that the tomcat 7 documentation has removed the "Shared" classloader description.  Has the shared classloader been removed from tomcat?

TIA,
- Ole

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 7 Shared Class Loader Removed?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ole,

On 6/1/2011 4:33 PM, Ole Ersoy wrote:
> Thank you.  I have some jars that I'm going to create an RPM for to help
> with provisioning.  Since I'm doing that I thought linking or putting
> them in the shared class loader repository might be smart, but perhaps
> not :).

You would really only be saving the in-memory representation of the
java.lang.Class objects, which is relatively modest in terms of memory use.

- From our experience, shared ClassLoaders are more trouble than they are
worth.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3moxQACgkQ9CaO5/Lv0PAZHwCglvfJpoUwZG8aM/LJEzOcn/wA
n9kAnRPen5Ok+qonldPGq7TQAop6XeJv
=pjae
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 7 Shared Class Loader Removed?

Posted by Ole Ersoy <ol...@gmail.com>.
Chuck,

Thank you.  I have some jars that I'm going to create an RPM for to help with provisioning.  Since I'm doing that I thought linking or putting them in the shared class loader repository might be smart, but perhaps not :).

Thanks again,
- Ole




On 06/01/2011 03:10 PM, Caldarale, Charles R wrote:
>> From: Ole Ersoy [mailto:ole.ersoy@gmail.com]
>> Subject: Re: Tomcat 7 Shared Class Loader Removed?
>
>> I was thinking about putting the jars in the shared repository,
>> rather than deploying them with the war.  Could you please help
>> me understand why this is bad?
>
> 1) You would have data sharing - probably inadvertent - across all the webapps.  Information can leak from one to another, which has serious integrity and security implications.
>
> 2) You would introduce versioning dependencies across all your webapp deployments, so if one copy of the webapp needed to be updated for a given client set, all would have to be updated simultaneously.
>
> 3) Redeployment or restart of a single webapp would be impossible.
>
> Other than saving a certain amount of disk and memory space (both of which are exceedingly cheap these days), what do you think you would gain?
>
>   - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat 7 Shared Class Loader Removed?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Ole Ersoy [mailto:ole.ersoy@gmail.com] 
> Subject: Re: Tomcat 7 Shared Class Loader Removed?

> I was thinking about putting the jars in the shared repository,
> rather than deploying them with the war.  Could you please help
> me understand why this is bad?

1) You would have data sharing - probably inadvertent - across all the webapps.  Information can leak from one to another, which has serious integrity and security implications.

2) You would introduce versioning dependencies across all your webapp deployments, so if one copy of the webapp needed to be updated for a given client set, all would have to be updated simultaneously.

3) Redeployment or restart of a single webapp would be impossible.

Other than saving a certain amount of disk and memory space (both of which are exceedingly cheap these days), what do you think you would gain?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 7 Shared Class Loader Removed?

Posted by Ole Ersoy <ol...@gmail.com>.
Hi Chuck,

I may have a server that has several instances of the same web application running under different contexts.  I was thinking about putting the jars in the shared repository, rather than deploying them with the war.  Could you please help me understand why this is bad?

TIA,
- Ole     

On 06/01/2011 02:12 PM, Caldarale, Charles R wrote:
>> From: Ole Ersoy [mailto:ole.ersoy@gmail.com]
>> Subject: Tomcat 7 Shared Class Loader Removed?
>
>> I noticed that the tomcat 7 documentation has removed the "Shared"
>> classloader description.  Has the shared classloader been removed
>> from tomcat?
>
> It wasn't removed per se, but it is no longer used by default.  You may still configure it in catalina.properties, if you have a pressing need to do so (usually a very, very bad idea).
>
> Note that this actually happened with Tomcat 6, about 4.5 years ago...
>
>   - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat 7 Shared Class Loader Removed?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Ole Ersoy [mailto:ole.ersoy@gmail.com] 
> Subject: Tomcat 7 Shared Class Loader Removed?

> I noticed that the tomcat 7 documentation has removed the "Shared" 
> classloader description.  Has the shared classloader been removed 
> from tomcat?

It wasn't removed per se, but it is no longer used by default.  You may still configure it in catalina.properties, if you have a pressing need to do so (usually a very, very bad idea).

Note that this actually happened with Tomcat 6, about 4.5 years ago...

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org