A rough comparison of GlassFish 3.x CLI and JBoss AS 7 CLI commands:
Tasks GlassFish 3.x JBoss AS 7
List all available commands asadmin list-commands jboss-cli.sh -c "help --commands"
Display help info asadmin --help jboss-cli.sh --help
Check version asadmin version jboss-cli.sh version
Start server or domain asadmin start-domain standalone.sh, or domain.sh
Stop server or domain asadmin stop-domain jboss-cli.sh -c :shutdown
Restart server or domain asadmin restart-domain jboss-cli.sh -c ":shutdown(restart=true)"
Start in debug mode asadmin start-domain -d
asadmin start-domain --debug
standalone.sh --debug
Deploy an app with CLI asadmin deploy ~/test.war jboss-cli.sh -c "deploy ~/test.war"
Undeploy the test.war app asadmin undeploy test jboss-cli.sh -c "undeploy test.war"
List deployed apps asadmin list-applications
asadmin list-components
asadmin list-applications -l
asadmin list-components --long
jboss-cli.sh -c deploy
jboss-cli.sh -c undeploy
jboss-cli.sh -c "deploy -l"
jboss-cli.sh -c "undeploy -l"
jboss-cli.sh -c "ls deploy"
Add a server system property asadmin create-jvm-options -Dbuzz="This is buzz" jboss-cli.sh
-c "/system-property=buzz:add(value='This\ is\ buzz')"
List all server system properties asadmin list-jvm-options jboss-cli.sh -c "/system-property=*:read-resource"
Create a string or primitive JNDI resource asadmin create-custom-resource
--restype=java.lang.Boolean
--factoryclass=
org.glassfish.resources.custom.factory.PrimitivesAndStringFactory
--property value=true resource/flag
jboss-cli.sh -c
"/subsystem=naming/binding=
java\:global\/env\/flag:add(
binding-type=simple, type=boolean, value=true)"
List datasources asadmin list-jdbc-resources jboss-cli.sh -c
"/subsystem=datasources:read-resource-description"
Create datasource using the default db config asadmin create-jdbc-resource --connectionpoolid DerbyPool jdbc/test jboss-cli.sh -c "data-source add --name=test-ds --jndi-name=java\:jboss\/datasources\/test-ds --driver-name=h2 --connection-url=jdbc\:h2\:mem\:test;DB_CLOSE_DELAY\=-1"

jboss-cli.sh -c "data-source enable --name=test-ds"
Delete a datasource asadmin delete-jdbc-resource jdbc/test jboss-cli.sh -c "data-source remove --name=test-ds"
Batch processing based on file input asadmin multimode --file /tmp/glassfish-cli-commands.txt jboss-cli.sh -c "batch --file=/tmp/jboss-cli-commands.txt"
0

Add a comment

Labels
Archive
Popular Posts
Popular Posts
  • Two JVM options are often used to tune JVM heap size: -Xmx for maximum heap size, and -Xms for initial heap size. Here are some common mi...
  • Simple enum . The ; after the last element is optional, when this is the end of enum definition. public enum Color { WHITE, BLACK, RED, ...
  • How to set project classpath in Eclipse and NetBeans are similar: just right-click the project name, choose Properties to bring up the Prope...
  • Let's say I need to spawn multiple threads to do the work, and continue to the next step only after all of them complete. I will need t...
  • This is a sample web.xml based on Servlet 2.5 (part of Java EE 5) that declares common elements. All top-level elements are optional, and c...
  • The default string value for java enum is its face value, or the element name. However, you can customize the string value by overriding toS...
  • Prior to JDK 6, we can check if a string is empty in 2 ways: if(s != null && s.length() == 0) if(("").equals(s)) Checking ...
  • When writing javadocs, IntelliJ automatically adds a closing tag for html elements. For instance, after typing <lt>, it automaticaly a...
  • StringBuilder was introduced in JDK 1.5. What's the difference between StringBuilder and StringBuffer? According to javadoc , StringBu...
  • With array, we can easily declare and initialize it at the same time: String[] favorites = new String[] {"EJB", "JPA", ...
Loading