You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gal Robert <ro...@gmail.com> on 2005/07/05 14:21:19 UTC
Silent runtime replace of a class
Hi,
we have a new user requriement: to be able to modifiy the application
without affecting user work.
Is there any way to achieve this under tomcat? Currently we're
building war file. Is there any way to replace a class (maybe jsp class)
runtime, without restarting the tomcat?
any information is welcome
thanks.
robert
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Silent runtime replace of a class
Posted by Charles Meier <cm...@peerpro.net>.
This article may help...
http://www.fawcette.com/javapro/2002_09/magazine/columns/proshop/
Gal Robert wrote:
> Hi,
> we have a new user requriement: to be able to modifiy the application
> without affecting user work.
> Is there any way to achieve this under tomcat? Currently we're
> building war file. Is there any way to replace a class (maybe jsp class)
> runtime, without restarting the tomcat?
> any information is welcome
>
> thanks.
> robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Silent runtime replace of a class
Posted by delbd <de...@oma.be>.
This is tricky.
Concerning jsp, you can simply replace old jsp with new one, they'll get recompiled.
But what do you mean by replacing a class without affecting user work? This is practically impossible to do,
because you can't change the class of an existing instance, all you can do is load new instances with
the new .class. Howevr that mean datas saved in sessions and the new class will indeed be different (so things like
(MyClass)session.get("someKey"), will fail because someKey is of the old type.
If what you want is redeploy a war without restarting tomcat, no problem, tomcat doens only restart the redeployed webapp.
Le Mardi 5 Juillet 2005 14:21, Gal Robert a écrit :
> Hi,
> we have a new user requriement: to be able to modifiy the application
> without affecting user work.
> Is there any way to achieve this under tomcat? Currently we're
> building war file. Is there any way to replace a class (maybe jsp class)
> runtime, without restarting the tomcat?
> any information is welcome
>
> thanks.
> robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
--
David Delbecq
Royal Meteorological Institute of Belgium
-
Is there life after /sbin/halt -p?
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Silent runtime replace of a class
Posted by Sriram N <sr...@yahoo.com>.
--- Gal Robert <ro...@gmail.com> wrote:
> Hi,
> we have a new user requriement: to be able to modifiy the application
> without affecting user work.
> Is there any way to achieve this under tomcat? Currently we're
> building war file. Is there any way to replace a class (maybe jsp class)
> runtime, without restarting the tomcat?
> any information is welcome
>
JSPs are recompiled and reloaded when ever the JSP source file is changed.
If you have other .class files such (including servlets), then you need to
create a context.xml as per the documentation provided at
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html
You'll could place the context.xml in either the conf directory, or in the
war's WEB-INF folder. Just ensure that the "reloadable" attribute is set to
"true".
Since you've not specified which Tomcat version you're using, I've pointed you
to the latest Tomcat 5.5 documentation.
> thanks.
> robert
>
-- Sriram
____________________________________________________
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
http://football.fantasysports.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org