tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Costin Manolache" <cos...@gmail.com>
Subject Re: How to reload web app from java program?
Date Sun, 04 May 2008 15:41:11 GMT
Did you try using JMX ? Unless you use security manager, this should give
you access to many internals.


Costin

On Sun, May 4, 2008 at 7:59 AM, David Smith <dns4@cornell.edu> wrote:

> But to use the api that the manager app uses, your webapp needs to have
> privileged="true" set in the context first.  Second, look at the source for
> the manager webapp for exactly what it does.  And lastly, notice the manager
> webapp can't reload itself -- I suspect there's a reason for that.
> I'm not sure a webapp being reloaded can request the manager reload it as
> the manager does it during the request and doesn't send a response until the
> reload is complete.  If you have code that can't unload because it's
> actively being executed, it might block the reload.
>
>
> --David
>
> milos@grf.bg.ac.yu wrote:
>
> > Hello,
> >
> >
> >
> > > If you wanted to go that route, might as well call wget or curl to hit
> > > the manager webapp with a reload command.
> > >
> > >
> >
> >
> > It is then possible to send appropriate http request from java class to
> > manager webapp, isn't it?
> > But is there any API to reload the context from the app itself? I
> > suppose
> > I need exactly the same API call as manager app does to reload the
> > context!
> >
> >
> > Regards, Milos
> >
> >
> >
> > > The OP is trying to reload
> > > one webapp, not the entire tomcat.
> > >
> > > --David
> > >
> > > David Kerber wrote:
> > >
> > >
> > > > David Smith wrote:
> > > >
> > > >
> > > > > Don't think so.  The next best things are a) using the manager
> > > > > webapp
> > > > > to reload or b) design the webapp to reload local config
> > > > > information
> > > > > itself.  The only down side to (b) is it can't work on resources
> > > > > defined in tomcat configs like database pools.
> > > > >
> > > > >
> > > > Couldn't you call an external batch file that stopped and then
> > > > restarted Tomcat?  Like calling a windows .cmd file that issued NET
> > > > STOP and NET START commands?  That's not exactly the application
> > > > itself doing the restart, but it's probably close enough for most
> > > > purposes.
> > > >
> > > > D
> > > >
> > > >
> > > >
> > > > > --David
> > > > >
> > > > > milos@grf.bg.ac.yu wrote:
> > > > >
> > > > >
> > > > > > Hello,
> > > > > > is there any way to reload deployed application from the
> > > > > > application
> > > > > > itself?
> > > > > > I suppose there must be an API to do that.
> > > > > >
> > > > > > Thanks in advance,
> > > > > > Milos Kovacevic
> > > > > >
> > > > > >
> > > > >
> > > > ---------------------------------------------------------------------
> > > > 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
> > > >
> > > >
> > > >
> > > --
> > > David Smith
> > > Network Operations Supervisor
> > > Department of Entomology
> > > Cornell University
> > > 2132 Comstock Hall
> > > Ithaca, NY 14853
> > > Phone: (607) 255-9571
> > > Fax: (607) 255-0940
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
> >
>
>
> --
> David Smith
> Network Operations Supervisor
> Department of Entomology
> Cornell University
> 2132 Comstock Hall
> Ithaca, NY 14853
> Phone: (607) 255-9571
> Fax: (607) 255-0940
>
>
> ---------------------------------------------------------------------
> 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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message