You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Johan Eltes <jo...@callista.se> on 2002/11/26 07:15:14 UTC

Re: J2EE-compliant class loading

Den 02-11-26 00.47, skrev "Craig R. McClanahan" <cr...@apache.org>:

> 
> IMHO, however, sharing JAR files has a very serious drawback, IMHO -- it
> *forces* a cross dependency between webapps that is not otherwise
> necessary.  Web appliations should be designed to be as completely
> independent of each other as possible, so that you can do things like
> upgrade the Struts version in a suite of apps one application at a time,
> without forcing them to *all* be upgraded at once.
>

I'm not sure it is valid to assume that multiple wars within an ear could
use different versions of struts on their respective WEB-INF/lib. The J2EE
spec (1.3) states:

"There must be only one version of each class in an application. If one
component depends on one version of an optional package, and another
component depends on another version, it may not be possible to deploy an
Application Assembly application containing both components. A J2EE
application should not assume that each component is loaded in a separate
class loader and has a separate namespace."

/johan


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: J2EE-compliant class loading

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 26 Nov 2002, Johan Eltes wrote:

> Date: Tue, 26 Nov 2002 07:15:14 +0100
> From: Johan Eltes <jo...@callista.se>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: Struts Users Mailing List <st...@jakarta.apache.org>
> Subject: Re: J2EE-compliant class loading
>
> Den 02-11-26 00.47, skrev "Craig R. McClanahan" <cr...@apache.org>:
>
> >
> > IMHO, however, sharing JAR files has a very serious drawback, IMHO -- it
> > *forces* a cross dependency between webapps that is not otherwise
> > necessary.  Web appliations should be designed to be as completely
> > independent of each other as possible, so that you can do things like
> > upgrade the Struts version in a suite of apps one application at a time,
> > without forcing them to *all* be upgraded at once.
> >
>
> I'm not sure it is valid to assume that multiple wars within an ear could
> use different versions of struts on their respective WEB-INF/lib. The J2EE
> spec (1.3) states:
>
> "There must be only one version of each class in an application. If one
> component depends on one version of an optional package, and another
> component depends on another version, it may not be possible to deploy an
> Application Assembly application containing both components. A J2EE
> application should not assume that each component is loaded in a separate
> class loader and has a separate namespace."
>

You might want to review section 9 of the Servlet Spec, which (among other
things) specifically describes the class loader that a servlet container
(in a J2EE server or not doesn't matter) is required to provide to each
web application.

> /johan

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>