11/13/2007

Glassfish asadmin command auto suggestions

In previous post, I mentioned Glassfish asadmin command auto suggestions. When you enter an invalid command, glassfish can suggest how to fix it. It has been very handy for me, given that most asadmin commands are quite verbose with multiple words concatenated with "-." More examples of using asadmin auto-correction:

Say I want to work with glassfish cluster but don't know what commands are available:
C:\glassfish\bin> asadmin cluster
Closest matching command(s):
configure-ha-cluster
create-cluster
delete-cluster
list-clusters
remove-ha-cluster
start-cluster
stop-cluster
CLI001 Invalid Command, cluster.
To do something with glassfish server jvm options:
C:\glassfish\bin> asadmin jvm
Closest matching command(s):
create-jvm-options
delete-jvm-options
generate-jvm-report
CLI001 Invalid Command, jvm.
For database operations:
C:\glassfish\bin>asadmin database
Closest matching command(s):
start-database
stop-database
CLI001 Invalid Command, database.
How to manage jdbc-related tasks:
C:\glassfish\bin>asadmin jdbc
Closest matching command(s):
create-jdbc-connection-pool
create-jdbc-resource
delete-jdbc-connection-pool
delete-jdbc-resource
list-jdbc-connection-pools
list-jdbc-resources
CLI001 Invalid Command, jdbc.
How to do jms stuff:
C:\glassfish\bin>asadmin jms
Closest matching command(s):
create-jms-host
create-jms-resource
create-jmsdest
delete-jms-host
delete-jms-resource
delete-jmsdest
flush-jmsdest
jms-ping
list-jms-hosts
list-jms-resources
list-jmsdest
CLI001 Invalid Command, jms.
Anything to do with glassfish connection-pool or thread-pool:
C:\glassfish\bin>asadmin pool
Closest matching command(s):
create-connector-connection-pool
create-jdbc-connection-pool
create-threadpool
delete-connector-connection-pool
delete-jdbc-connection-pool
delete-threadpool
list-connector-connection-pools
list-jdbc-connection-pools
list-threadpools
ping-connection-pool
CLI001 Invalid Command, pool.
Technorati Tags: ,