[GLASSFISH-14059] list-components, list-applications and list-application-refs output could be more user friendly Created: 18/Oct/10  Updated: 23/Oct/12  Resolved: 23/Oct/12

Status: Resolved
Project: glassfish
Component/s: deployment
Affects Version/s: 3.1
Fix Version/s: 4.0_b59

Type: Improvement Priority: Major
Reporter: shreedhar_ganapathy Assignee: Jeremy_Lv
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: All
Platform: Macintosh

Attachments: XML File domain.xml     Zip Archive GLASSFISH-14059_revised_source.zip    
Issuezilla Id: 14,059


Used latest 3.1 nightly b24 dated Oct 16th, 2010

To reproduce,
1. Start domain
2. create a cluster of two or more instances, and start it.
3. deploy any application to the cluster (in my example I used clusterjsp with availabilityenabled=true)
4. asadmin list-applications - shows Nothing to list
5. asadmin list-application-refs - shows Nothing to list

Sample output from my deployment :
dhcp-santaclara22-1fl-west-10-132-181-151:bin shreed$ ./asadmin deploy –
availabilityenabled=true --target shreedhar-cluster
Application deployed with name clusterjsp.

Command deploy executed successfully.
dhcp-santaclara22-1fl-west-10-132-181-151:bin shreed$ ./asadmin list-applications
Nothing to list.

Command list-applications executed successfully.
dhcp-santaclara22-1fl-west-10-132-181-151:bin shreed$ ./asadmin list-application-refs
Nothing to list.

Command list-application-refs executed successfully.
dhcp-santaclara22-1fl-west-10-132-181-151:bin shreed$

Comment by shreedhar_ganapathy [ 18/Oct/10 ]

Created an attachment (id=5161)
Domain xml attached for reference

Comment by Tom Mueller [ 18/Oct/10 ]

The default target for the list-applications command is the DAS, i.e., "server".
Did you try:

asadmin list-applications shreedhar-cluster


Comment by shreedhar_ganapathy [ 18/Oct/10 ]

I tried
./asadmin list-applications --target shreedhar-cluster
assuming that the --target would be more consistent with commands involving targets
That obviously failed but I just tried what you've suggested :
./asadmin list-applications shreedhar-cluster
That worked :

dhcp-santaclara22-1fl-west-10-132-181-151:bin shreed$ ./asadmin list-applications shreedhar-
ShoppingCart <web>
clusterjsp <ear, web>

Seems like a usability gap in that there is no obvious information from the command when executed as
is. Aren't all applications deployed to the domain regardless of what target they are ultimately deployed
to? It'd be nice to have this command show deployed apps with their targets

Aside, I expected list application refs to provide references to the app in the domain.

Comment by Hong Zhang [ 18/Oct/10 ]

If you want to list all the applications deployed to this domain, you need to
use the "domain" target:

asadmin list-components domain

As Tom said, the default target is DAS (the DAS target means the default server
instance, not the domain).

This syntax is used in v2 and the previous releases.

Comment by shreedhar_ganapathy [ 18/Oct/10 ]

Hong, Tom
Based on your feedback I have marked this as an enhancement. IMO the command output could give a bit
more specific info that there is no app deployed 'to the domain' or perhaps a hint that components/apps
could be found on other targets.

Comment by Hong Zhang [ 23/Mar/11 ]

target for 3.2

Comment by Tom Mueller [ 17/Oct/12 ]

Marking the fix version field as "future-release". This is based on an evaluation by John, Michael, and Tom WRT to the PRD for the Java EE 7 RI/SDK. This issues was deemed to not be a P1 for that release. If this is in error or there are other reasons why this RFE should be targeted for the Java EE 7 RI/SDK release, then change the fix version field back to an appropriate build.

Comment by Jeremy_Lv [ 19/Oct/12 ]


Hong, Tom
Based on your feedback I have marked this as an enhancement. IMO the command output could give a bit
more specific info that there is no app deployed 'to the domain' or perhaps a hint that components/apps
could be found on other targets.

shall we add some infos about this phenomenon in the latest trunk?

for example´╝Ü
>asadmin list-applications
There is no applications REF by server
Nothing to list
Command list-applications executed successfully

BTW, I will look into it if it is needed to be add some infos.
IMO, I think it is no need to mark it as an enhancement in JIRA but add some description in the document about deployment to let the user know the default target value is server in the version of GFV4.

Comment by Hong Zhang [ 19/Oct/12 ]

It's already in the documentation that the default target is server, but I guess users don't always read documentation.

I guess the additional message will help "No applications are deployed to this target <target name>".

Comment by Jeremy_Lv [ 22/Oct/12 ]

try to add some messages about some related list commands and have attached my revised source to the JIRA. pls check it.

Comment by Hong Zhang [ 22/Oct/12 ]

Changes look pretty good. Please go ahead and check in after running the usual set of the tests.

Comment by Jeremy_Lv [ 23/Oct/12 ]

Run all of the QL tests and dev tests and all of them have passed.
Sending E:\GF_MAIN\SOURCE_1017\nucleus\deployment\admin\src\main\java\org\glassfish\deployment\admin\ListApplicationRefsCommand.java
Sending E:\GF_MAIN\SOURCE_1017\nucleus\deployment\admin\src\main\java\org\glassfish\deployment\admin\ListComponentsCommand.java
Sending E:\GF_MAIN\SOURCE_1017\nucleus\deployment\admin\src\main\java\org\glassfish\deployment\admin\LocalStrings.property
Transmitting file data .
Committed revision 56684.

Generated at Mon Oct 24 16:50:54 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.