I'm fairly new to JBoss and I was trying to figure out how to administer JBoss 
via scripting. One word: twiddle. I did not find a lot of documentation or 
examples posted and for some reason I could not get it through my fat head. 
Anyhow, here's my explanation and a couple of examples:

twiddle is the command line/scripting way to do everything you do in the 
jmx-console GUI. 

All you have to know is the syntax to communicate with a particular MBean. With 
twiddle you can get information about your server, query the server for MBeans, 
get the attributes of a particular MBean, invoke operations on an MBean, etc. 
Until I got used the various functions, I used the jmx-console to SEE the 
various domains, Mbeans and operations and then write the corresponding twiddle 
command for what I wanted to do.

Here's some examples:

Stop and Start an application
./twiddle.sh invoke jboss.web.deployment:id=-#######,war=your-app.war stop
./twiddle.sh invoke jboss.web.deployment:id=-#######,war=your-app.war start
Note: ####### is unique to your environment

Dump the JNDI NameSpace
./twiddle.sh invoke jboss:service=JNDIView list true

Query the server for a list of MBeans matching service=invoker*
./twiddle.sh -s your-server-name query 'jboss:service=invoker,*'

Grab the state (started, stopped) of the httpInvoker
./twiddle.sh get jboss:service=invoker,type=http StateString

Thanks,
Ryan Ruebusch

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3876825#3876825

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3876825


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to