You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Richard Gill <ri...@3kb.com> on 2001/11/05 05:08:05 UTC

TC 4 - Reloading Web Apps from within the App?

Hi, I need to be able to force the reloading of a Context from within a
running web app.  Does anyone have any idea how to achieve this?

eg: I have used the webapp itself to upload a new JAR file to install an
upgrade to itself, then want the user to be able to trigger a reload
(without having to use the current TC4 Manager app, and without needing to
have automatic reload checking turned on).

Any ideas?


thanks.
Richard Gill



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: TC 4 - Reloading Web Apps from within the App?

Posted by Richard Gill <ri...@3kb.com>.
Yeah, gone for this approach now.  Kept getting lockup if I tried to do a
reload on the current app from within it (the same virtual host).  Tomcat
would lock solid and have to be killed.

Now I just have a link that can be clicked on that calls thru to the manager
app, and have configured it as a context on each of the hosts on the server
(with the docBase being the absolute path to the manager app in the
TC4/webapps dir).

Isn't really what I wanted to do, but it works so that is a start.

Thanks for the help,

Richard

----- Original Message -----
From: "Frederick J. Ingham" <fi...@earthlink.net>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, November 05, 2001 6:10 PM
Subject: Re: TC 4 - Reloading Web Apps from within the App?


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I know you said you did not want to use the manager application
> itself (I am assuming you mean having the user interact with the
> manager application), but why not call the manager application from
> within your application?  For a reason different than yours, I call
> the manager application from within another servlet to do a similar
> thing.  The only thing that was moderately difficult in doing so (and
> only because I had not done it before) was sending the HTTP basic
> authentication credentials to the manager application.
>
> Of course the other alternative is to read what the manager
> application actually does and duplicate that functionality in your
> own application... but why do that if you can simply call the manager
> application directly.
>
> The last thing you would have to deal with is a catch-22 situation...
> if you incorporate calling the manager application in your
> application, once the user has initiated the 'reload' to load the new
> application, the initial application that he was dealing with is no
> longer active, so what are you supposed to show the user (or for that
> matter, how do you even know who to talk to... you have lost your
> connection to him...).
>
> Fred
>
> - ----- Original Message -----
> From: Richard Gill <ri...@3kb.com>
> To: <to...@jakarta.apache.org>
> Sent: Sunday, November 04, 2001 11:08 PM
> Subject: TC 4 - Reloading Web Apps from within the App?
>
>
> > Hi, I need to be able to force the reloading of a Context from
> > within a running web app.  Does anyone have any idea how to achieve
> > this?
> >
> > eg: I have used the webapp itself to upload a new JAR file to
> > install an upgrade to itself, then want the user to be able to
> > trigger a reload (without having to use the current TC4 Manager
> > app, and without needing to have automatic reload checking turned
> > on).
> >
> > Any ideas?
> >
> >
> > thanks.
> > Richard Gill
> >
> >
> >
> > --
> > To unsubscribe:
> > <ma...@jakarta.apache.org> For additional
> > commands: <ma...@jakarta.apache.org> Troubles
> > with the list: <ma...@jakarta.apache.org>
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGP Personal Privacy 6.5.3
>
> iQA/AwUBO+YfHjfZU7KW7A6DEQIWNQCg4HJUQ3qn7D032YQ2QSbUB2zZjHwAn063
> ti14Hzf8/9jdDgeC8f+fznvF
> =q8nP
> -----END PGP SIGNATURE-----
>
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: TC 4 - Reloading Web Apps from within the App?

Posted by "Frederick J. Ingham" <fi...@earthlink.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I know you said you did not want to use the manager application
itself (I am assuming you mean having the user interact with the
manager application), but why not call the manager application from
within your application?  For a reason different than yours, I call
the manager application from within another servlet to do a similar
thing.  The only thing that was moderately difficult in doing so (and
only because I had not done it before) was sending the HTTP basic
authentication credentials to the manager application.

Of course the other alternative is to read what the manager
application actually does and duplicate that functionality in your
own application... but why do that if you can simply call the manager
application directly.

The last thing you would have to deal with is a catch-22 situation...
if you incorporate calling the manager application in your
application, once the user has initiated the 'reload' to load the new
application, the initial application that he was dealing with is no
longer active, so what are you supposed to show the user (or for that
matter, how do you even know who to talk to... you have lost your
connection to him...).

Fred

- ----- Original Message ----- 
From: Richard Gill <ri...@3kb.com>
To: <to...@jakarta.apache.org>
Sent: Sunday, November 04, 2001 11:08 PM
Subject: TC 4 - Reloading Web Apps from within the App?


> Hi, I need to be able to force the reloading of a Context from
> within a running web app.  Does anyone have any idea how to achieve
> this?
> 
> eg: I have used the webapp itself to upload a new JAR file to
> install an upgrade to itself, then want the user to be able to
> trigger a reload (without having to use the current TC4 Manager
> app, and without needing to have automatic reload checking turned
> on).
> 
> Any ideas?
> 
> 
> thanks.
> Richard Gill
> 
> 
> 
> --
> To unsubscribe:  
> <ma...@jakarta.apache.org> For additional
> commands: <ma...@jakarta.apache.org> Troubles
> with the list: <ma...@jakarta.apache.org> 

-----BEGIN PGP SIGNATURE-----
Version: PGP Personal Privacy 6.5.3

iQA/AwUBO+YfHjfZU7KW7A6DEQIWNQCg4HJUQ3qn7D032YQ2QSbUB2zZjHwAn063
ti14Hzf8/9jdDgeC8f+fznvF
=q8nP
-----END PGP SIGNATURE-----




--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>