Labels

Monday, September 10, 2012

GlassFish multimode Command for Batch Processing?

GlassFish asadmin multimode command runs a series of asadmin subcommands within one single session. The --file option takes a file containing the list of subcommands.

In the following example, I created 2 files named asadmin-create-resources and asadmin-delete-resources, and pass each of them to asadmin multimode:















# content of file asadmin-create-resources
create-jms-resource --restype javax.jms.QueueConnectionFactory jms/QueueConnectionFactory1
create-jms-resource --restype javax.jms.Queue jms/Queue1
create-jms-resource --restype javax.jms.Queue jms/Queue2
 
 
$ asadmin multimode --file /tmp/asadmin-create-resources
 
 
# content of file asadmin-delete-resources
delete-jms-resource jms/Queue1
delete-jms-resource jms/Queue2
delete-jms-resource jms/QueueConnectionFactory1
 
 
$ asadmin multimode --file /tmp/asadmin-delete-resources
More details are available in asadmin help:
asadmin help multimode
asadmin multimode --help
asadmin multimode -\?

No comments:

Post a Comment