users@glassfish.java.net

Re: can a web app update itself?

From: Tom Mueller <tom.mueller_at_oracle.com>
Date: Wed, 21 Dec 2011 11:03:42 -0600

An app can invoke the GlassFish REST interface to do this. However,
since the running app will be disabled as part of the operation, it
wouldn't be able to report results to the user. Another idea might be
to have a companion "upgrade" app. The main app could redirect the
upgrade request to the upgrade app, which would then upgrade the main
app and report the results. Essentially, the "upgrade" app is acting
like a mini-console. The main app could upgrade the upgrade app.

Tom


On 12/21/2011 10:28 AM, forums_at_java.net wrote:
> Hi,
>
> Is there a way for a deployed web app running in GF to upgrade itself to
> another version? Assuming a war file is publically available, can a
> deployed
> app run the equivalent of "asadmin deploy --force <etc>"? I suppose,
> if tied
> to a certain OS, it could runtime#exec some script, or copy the file
> to the
> autodeploy directory, but those options are not ideal certainly.
>
> Thanks,
>
> Bobby
>
>
>
>
> --
>
> [Message sent by forum member 'bbissett']
>
> View Post: http://forums.java.net/node/876182
>
>