dev@glassfish.java.net

Re: Inconsistency between deploy & undeploy CLI

From: Kedar Mhaswade <Kedar.Mhaswade_at_Sun.COM>
Date: Mon, 19 May 2008 15:44:08 -0700

Jason Lee wrote:
> On Mon, May 19, 2008 at 1:56 PM, Lloyd L Chambers
> <Lloyd.Chambers_at_sun.com> wrote:
>> I think it would be better to reject deployments that are of a different
>> type; eg replacing 'war' with 'ear'. This is not a common case, so it's
>> likely to be a unintentional mistake. Better to have the user undeploy the
>> 'war', the deploy the 'ear'.
>
> I agree. I'd hate to be the maintainer of foo.war and start getting
> support calls on my broken app, only to find out that another
> developer/admin deployed foo.ear and silently replaced my app. In an
> ideal world, there would be organizational controls in place to help
> mitigate that kind of scenario, but we're not always in such a world.
> :)

In the world without such controls, just remember not to give your domain
user name and password to anyone. If you are worried about not accidentally
removing an app with a given "name" check what names are already taken, before
attempting a fresh deployment, that too, on a server in staging/production.

Also, it is important to understand the difference between the "name of an
archive file/folder representing the app" and the "name of the application as
GlassFish understands it". Though the default case makes them the same, one
can easily name the application contained in hello.war as "sayhello".

For a "developer case", I still think --force true is not required to be
specified and repeated deployments with "asadmin deploy hello.war" should
just result in redeployment. This, for 1 is compatible with GlassFish V1, V2
*and* is more frequent use case.