users@glassfish.java.net

Re: Start/stop webapp with Glassfish administration REST interface

From: Cyril DANGERVILLE <darthvader7777_at_gmail.com>
Date: Thu, 5 Jan 2012 00:29:23 +0100

Hello,
I am using Glassfish 3.1.1 actually. I got the solution from the link you
pointed me to. I was using the wrong configuration node to enable/disable
my webapp via the REST interface or "asadmin set" command.

I was using
"applications.application.HelloWorld"
instead of... *
"servers.server.server.application-ref.HelloWorld"*

So sending a HTTP POST request to REST URL:
http://localhost:4848/management/domain/servers/server/server/application-ref/HelloWorld
with parameters:
enabled=true (or false)
works for me!*

T*hanks!

Which leads me to another question if you may: what is then the effect of
updating the "applications.application..." node, i.e. doing the following?
asadmin> set applications.application.my-application-name.enabled=true"
I can't find out.*
*Thanks again.*

*Regards,
CD*
*
On Tue, Jan 3, 2012 at 9:59 PM, Anissa Lam <anissa.lam_at_oracle.com> wrote:

>
> If you are using GlassFish 3.1, and there is no other cluster or
> instances created, you maybe seeing this bug which is release noted and
> fixed in 3.1.1.
> http://docs.oracle.com/cd/**E18930_01/html/821-2434/ggrvi.**html#gkyys<http://docs.oracle.com/cd/E18930_01/html/821-2434/ggrvi.html#gkyys>
>
> If you want to confirm the status of the application, you can verify that
> using CLI.
> eg.
> %asadmin list-applications --long
> NAME TYPE STATUS
> hello <web> enabled
> Command list-applications executed successfully.
>
> Hope this help.
> Anissa.
>
>
> On 1/3/12 12:25 PM, Cyril DANGERVILLE wrote:
>
>> Hello,
>> I am trying to disable an application via Glassfish 3.1's admin REST
>> interface. I am using URL:
>> http://localhost:4848/**management/domain/**applications/application/**
>> HelloWorld<http://localhost:4848/management/domain/applications/application/HelloWorld>
>> where HelloWorld is the name of my webapp (I got the URL via the "Child
>> Resources" entry in the parent URL: http://localhost:4848/**
>> management/domain/**applications/application/<http://localhost:4848/management/domain/applications/application/>
>> ).
>>
>> When I changed the 'enabled' attribute to false/true, this has no effect
>> on the application status: when I checked via the Admin Console GUI, the
>> application status is unchanged. Vice versa, if I enable/disble the
>> application via the admin console GUI, the "enabled" attribute is unchanged
>> in the response from the REST interface.
>>
>> Is this a known issue or am I doing this wrong ?
>>
>> Thanks for your help.
>>
>> Regards,
>> CD
>>
>
>