« Return to Thread: Possible to assign different class loader for each web app with tomcat

Re: Possible to assign different class loader for each web app with tomcat

by David Delbecq-2 :: Rate this Message:

Reply to Author | View in Thread

This all depends on your webapp structure. If your config class is on the
common or system class loader, it's shared by all webapps. Otherwise, (that
mean if class is in WEB-INF/lib or WEB-INF/classes), it shouldn't be shared.

Unless, of course, you specified a specific classloader to use by tomcat in
your context.xml.


Le Friday 09 May 2008 12:16:23 paul.ockleford@..., vous avez écrit :

> Ok, that's strange because yesterday I had a small problem, and I assumed
> that it was due to the same class being loaded on startup by 2 web apps.
>
> I had a url endpoint loaded into a config class on startup from the
> web.xml, for some reason no messages were reaching the correct end point.
> This config class is also loaded by a test version of the app running under
> the same tomcat as pre prod. When the second web app was loaded and its
> config class was loaded and the parameter read in from the web.xml it
> changed the value for both web apps.
>
> I have not being using java or tomcat for all that long, but I would have
> thought if a class loader was assigned for each web app then they would
> each have their own copy of the config class? Meaning that web app1 should
> not have been pointing at the end point for web app 2? If not then could
> you tell me why?
>
> Thanks
>
> -----Original Message-----
> From: Mark Thomas [mailto:markt@...]
> Sent: 09 May 2008 11:10
> To: Tomcat Users List
> Subject: Re: Possible to assign different class loader for each web app
> with tomcat
>
> paul.ockleford@... wrote:
> > Hi,
> >
> > Is it possible to configure a separate class loader for each web app
> > running under tomcat? A colleague has informed that he can do this
> > with web sphere and I am wondering if it is possible with tomcat.
>
> This is the case by default. No configuration is required.
>
> Mark
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@... To unsubscribe,
> e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>
>
> **********************************************************************
> This message  may  contain  confidential  and  privileged information.
> If you are not  the intended  recipient please  accept our  apologies.
> Please do not disclose, copy or distribute  information in this e-mail
> or take any  action in reliance on its  contents: to do so is strictly
> prohibited and may be unlawful. Please inform us that this message has
> gone  astray  before  deleting it.  Thank  you for  your co-operation.
>
> NHSmail is used daily by over 100,000 staff in the NHS. Over a million
> messages  are sent every day by the system.  To find  out why more and
> more NHS personnel are  switching to  this NHS  Connecting  for Health
> system please visit www.connectingforhealth.nhs.uk/nhsmail
> **********************************************************************
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@...
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...



---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: Possible to assign different class loader for each web app with tomcat