You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Yair Zohar <ya...@ard.huji.ac.il> on 2007/03/01 14:33:04 UTC

Reloading shared classes

Hello,
I'm using tomcat 5.0.28 on a Linux machine.
My web applications are using some shared class. I put them under 
$CATALINA_HOME/shared/classes.
The problem: When I make changes in the shared classes, restarting a web 
application by tomcat's manager is not enough for the changes to be 
reloaded. Only the tomcat server shutdown + start cause the changes to 
be reloaded.
How do I configure the web application or tomcat to reload the shared 
classes when restarting the web application?
Thanks ahead,
Yair.



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


RE: Reloading shared classes

Posted by Peter Crowther <Pe...@melandra.com>.
> From: Yair Zohar [mailto:yair@ard.huji.ac.il] 
> I've just wanted to avoid multiple copies of the same 
> classes. They are not really shared.

One of the web application philosophies (now copied by frameworks like
.NET) is that an app should contain everything it needs for successful
deployment.  Change your mindset and think of it as a positive, like I
keep trying to :-).

Seriously, there's always a tension between ease of deployment (by
minimising external dependencies) and size.  I'm coming round to the
view that ease of deployment is good, as brains are more expensive than
RAM and disk space.  However, the relative expense varies by country and
by sector - for example, I've seen academics spend *ages* trying to
solve a problem that could have been dealt with by $100 of kit, because
their time wasn't correctly accounted for and there was no budget for
the $100 of kit.

		- Peter

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


Re: Reloading shared classes

Posted by Yair Zohar <ya...@ard.huji.ac.il>.
You are right,
I've just wanted to avoid multiple copies of the same classes. They are 
not really shared.
If the classes are shared, all the web applications should be restarted, 
because the change affect all of them.
Yair.

Peter Crowther wrote:
>> From: Yair Zohar [mailto:yair@ard.huji.ac.il] 
>> My web applications are using some shared class. I put them under 
>> $CATALINA_HOME/shared/classes.
>> The problem: When I make changes in the shared classes, 
>> restarting a web 
>> application by tomcat's manager is not enough for the changes to be 
>> reloaded. Only the tomcat server shutdown + start cause the 
>> changes to 
>> be reloaded.
>> How do I configure the web application or tomcat to reload the shared 
>> classes when restarting the web application?
>>     
>
> You can't.  To reload those classes, you'd have to reload the contents
> of the shared classloader - which you can't do without restarting all
> the other webapps.  Any other approach removes the need for the *shared*
> classes.
>
> Do the classes genuinely need to be shared between the webapps, or are
> you doing this to save space?
>
> 		- Peter
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   

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


RE: Reloading shared classes

Posted by Peter Crowther <Pe...@melandra.com>.
> From: Yair Zohar [mailto:yair@ard.huji.ac.il] 
> My web applications are using some shared class. I put them under 
> $CATALINA_HOME/shared/classes.
> The problem: When I make changes in the shared classes, 
> restarting a web 
> application by tomcat's manager is not enough for the changes to be 
> reloaded. Only the tomcat server shutdown + start cause the 
> changes to 
> be reloaded.
> How do I configure the web application or tomcat to reload the shared 
> classes when restarting the web application?

You can't.  To reload those classes, you'd have to reload the contents
of the shared classloader - which you can't do without restarting all
the other webapps.  Any other approach removes the need for the *shared*
classes.

Do the classes genuinely need to be shared between the webapps, or are
you doing this to save space?

		- Peter

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