From jbosstools-commits at lists.jboss.org Tue Jul 24 22:14:56 2007 Content-Type: multipart/mixed; boundary="===============0841176034048954989==" MIME-Version: 1.0 From: jbosstools-commits at lists.jboss.org To: jbosstools-commits at lists.jboss.org Subject: [jbosstools-commits] JBoss Tools SVN: r2642 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui: InlineDocs and 1 other directories. Date: Tue, 24 Jul 2007 22:14:55 -0400 Message-ID: --===============0841176034048954989== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: rob.stryker(a)jboss.com Date: 2007-07-24 22:14:55 -0400 (Tue, 24 Jul 2007) New Revision: 2642 Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/Twiddle.= html trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/twiddleC= ontext.xml Log: Twiddle docs inline Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/Twid= dle.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/Twiddle= .html (rev 0) +++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/Twiddle= .html 2007-07-25 02:14:55 UTC (rev 2642) @@ -0,0 +1,217 @@ + + + Using Twiddle + + An excerpt from JBoss JMX Documentation online.
+
<= h3 class=3D"title">Command Line Access to JMX<= /div>

JBoss provides a simple command line tool th= at allows for + interaction with a remote JMX server instance. This tool is + called twiddle (for twiddling bits via JMX) and is located= in + the bin directory of the distri= bution. + Twiddle is a command execution tool, not a general command + shell. It is run using either the tw= iddle.sh + + or twiddle.bat scripts, and pas= sing in a + -h(--help= ) argument + provides the basic syntax, and + --help-commands shows what you = can do with + the tool:

[bin]$ ./twiddl=
e.sh -h
+A JMX client to 'twiddle' with a remote JBoss server.
+
+usage: twiddle.sh [options] <command> [command_arguments]
+
+options:
+    -h, --help                Show this help message
+        --help-commands       Show a list of commands
+    -H=3D<command>              Show command specific help
+    -c=3Dcommand.properties     Specify the command.properties file to use
+    -D<name>[=3D<value>]        Set a system property
+    --                        Stop processing options
+    -s, --server=3D<url>        The JNDI URL of the remote server
+    -a, --adapter=3D<name>      The JNDI name of the RMI adapter to =
use
+    -q, --quiet               Be somewhat more quiet
+
+

2.3.3.1. Connecting twid= dle to a Remote Server

By default the t= widdle command will connect to the + localhost at port 1099 to lookup the default + jmx/rmi/RMIAdaptor binding = of the + RMIAdaptor service as the c= onnector for + communicating with the JMX server. To connect to a dif= ferent + server/port combination you can use the + -s (-= -server) option:

[bin]$ ./twiddle.sh =
-s toki serverinfo -d jboss
+[bin]$ ./twiddle.sh -s toki:1099 serverinfo -d jboss
+

To connect using a different RMIAdaptor binding use the + -a (--adapter) option:

[bin]$ ./twiddle.sh=
 -s toki -a jmx/rmi/RMIAdaptor serverinfo -d jboss

2.3.3.2. Sample twiddle Command Usage

To access basic information about a server, u= se the + serverinfo command. This cu= rrently supports:

[bin]$ ./twiddle.sh -H s=
erverinfo
+Get information about the MBean server
+
+usage: serverinfo [options]
+
+options:
+    -d, --domain    Get the default domain
+    -c, --count     Get the MBean count
+    -l, --list      List the MBeans
+    --              Stop processing options
+[bin]$ ./twiddle.sh --server=3Dtoki serverinfo --count
+460
+[bin]$ ./twiddle.sh --server=3Dtoki serverinfo --domain
+jboss
+
+

To query the server for the name of MBeans matching a + pattern, use the query comm= and. This + currently supports:

[=
bin]$ ./twiddle.sh -H query
+Query the server for a list of matching MBeans
+ 
+usage: query [options] <query>
+options:
+    -c, --count    Display the matching MBean count
+    --             Stop processing options
+Examples:
+ query all mbeans: query '*:*'
+ query all mbeans in the jboss.j2ee domain: query 'jboss.j2ee:*'
+[bin]$ ./twiddle.sh -s toki query 'jboss:service=3Dinvoker,*'
+jboss:readonly=3Dtrue,service=3Dinvoker,target=3DNaming,type=3Dhttp
+jboss:service=3Dinvoker,type=3Djrmp
+jboss:service=3Dinvoker,type=3Dlocal
+jboss:service=3Dinvoker,type=3Dpooled
+jboss:service=3Dinvoker,type=3Dhttp
+jboss:service=3Dinvoker,target=3DNaming,type=3Dhttp

To get the att= ributes of an MBean, use the get command:

=
[bin]$ ./twiddle.sh -H get
+Get the values of one or more MBean attributes
+ 
+usage: get [options] <name> [<attr>+]
+  If no attribute names are given all readable attributes are retrieved
+options:
+    --noprefix    Do not display attribute name prefixes
+    --            Stop processing options
+[bin]$ ./twiddle.sh get jboss:service=3Dinvoker,type=3Djrmp RMIObjectPort =
StateString
+RMIObjectPort=3D4444
+StateString=3DStarted
+[bin]$ ./twiddle.sh get jboss:service=3Dinvoker,type=3Djrmp
+ServerAddress=3D0.0.0.0
+RMIClientSocketFactoryBean=3Dnull
+StateString=3DStarted
+State=3D3
+RMIServerSocketFactoryBean=3Dorg.jboss.net.sockets.DefaultSocketFactory(a)=
ad093076
+EnableClassCaching=3Dfalse
+SecurityDomain=3Dnull
+RMIServerSocketFactory=3Dnull
+Backlog=3D200
+RMIObjectPort=3D4444
+Name=3DJRMPInvoker
+RMIClientSocketFactory=3Dnull

To query the MBeanInfo for an MBean,= use the info command:

[bin]$ ./twiddle.sh=
 -H info
+Get the metadata for an MBean
+
+ 
+usage: info <mbean-name>
+  Use '*' to query for all attributes
+[bin]$ Description: Management Bean.
++++ Attributes:
+ Name: ServerAddress
+ Type: java.lang.String
+ Access: rw
+ Name: RMIClientSocketFactoryBean
+ Type: java.rmi.server.RMIClientSocketFactory
+ Access: rw
+ Name: StateString
+ Type: java.lang.String
+ Access: r-
+ Name: State
+ Type: int
+ Access: r-
+ Name: RMIServerSocketFactoryBean
+ Type: java.rmi.server.RMIServerSocketFactory
+ Access: rw
+ Name: EnableClassCaching
+ Type: boolean
+ Access: rw
+ Name: SecurityDomain
+ Type: java.lang.String
+ Access: rw
+ Name: RMIServerSocketFactory
+ Type: java.lang.String
+ Access: rw
+ Name: Backlog
+ Type: int
+ Access: rw
+ Name: RMIObjectPort
+ Type: int
+ Access: rw
+ Name: Name
+ Type: java.lang.String
+ Access: r-
+ Name: RMIClientSocketFactory
+ Type: java.lang.String
+ Access: rw
++++ Operations:
+ void start()
+ void jbossInternalLifecycle(java.lang.String java.lang.String)
+ void create()
+ void stop()
+ void destroy()

To invoke an operation on an MBean, use the invoke= r command:

[bin]$ ./twiddle.sh -H invoke
+Invoke an operation on an MBean
+ 
+usage: invoke [options] <query> <operation> (<arg>)*
+
+options:
+    -q, --query-type[=3D<type>]    Treat object name as a query
+    --                           Stop processing options
+
+query type:
+    f[irst]    Only invoke on the first matching name [default]
+    a[ll]      Invoke on all matching names
+[bin]$ ./twiddle.sh invoke jboss:service=3DJNDIView list true
+
+<h1>java: Namespace</h1>
+<pre>
+  +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+  +- DefaultDS (class: javax.sql.DataSource)
+  +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyF=
actory)
+  +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
+  +- comp (class: javax.naming.Context)
+  +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
+  +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+  +- jaas (class: javax.naming.Context)
+  |   +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainConte=
xt)
+  |   +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
+  |   +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainCont=
ext)
+  +- timedCacheFactory (class: javax.naming.Context)
+Failed to lookup: timedCacheFactory, errmsg=3Dnull
+  +- TransactionPropagationContextExporter (class: org.jboss.tm.Transactio=
nPropagationContextFactory)
+  +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
+  +- Mail (class: javax.mail.Session)
+  +- TransactionPropagationContextImporter (class: org.jboss.tm.Transactio=
nPropagationContextImporter)
+  +- TransactionManager (class: org.jboss.tm.TxManager)
+</pre>
+<h1>Global JNDI Namespace</h1>
+<pre>
+  +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+  +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.nam=
ing.LinkRef)
+  +- UserTransactionSessionFactory (proxy: $Proxy11 implements interface o=
rg.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
+  +- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+  +- console (class: org.jnp.interfaces.NamingContext)
+  |   +- PluginManager (proxy: $Proxy36 implements interface org.jboss.con=
sole.manager.PluginManagerMBean)
+  +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax=
.naming.LinkRef)
+  +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uu=
id.UUIDKeyGeneratorFactory)
+  +- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+  +- topic (class: org.jnp.interfaces.NamingContext)
+  |   +- testDurableTopic (class: org.jboss.mq.SpyTopic)
+  |   +- testTopic (class: org.jboss.mq.SpyTopic)
+  |   +- securedTopic (class: org.jboss.mq.SpyTopic)
+  +- queue (class: org.jnp.interfaces.NamingContext)
+  |   +- A (class: org.jboss.mq.SpyQueue)
+  |   +- testQueue (class: org.jboss.mq.SpyQueue)
+  |   +- ex (class: org.jboss.mq.SpyQueue)
+  |   +- DLQ (class: org.jboss.mq.SpyQueue)
+  |   +- D (class: org.jboss.mq.SpyQueue)
+  |   +- C (class: org.jboss.mq.SpyQueue)
+  |   +- B (class: org.jboss.mq.SpyQueue)
+  +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+  +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransact=
ion)
+  +- jmx (class: org.jnp.interfaces.NamingContext)
+  |   +- invoker (class: org.jnp.interfaces.NamingContext)
+  |   |   +- RMIAdaptor (proxy: $Proxy35 implements interface org.jboss.jm=
x.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
+  |   +- rmi (class: org.jnp.interfaces.NamingContext)
+  |   |   +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.n=
aming.LinkRef)
+  +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hi=
lo.HiLoKeyGeneratorFactory)
+  +- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.=
naming.LinkRef)
+  +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.nami=
ng.LinkRef)
+
+</pre>
\ No newline at end of file Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/twid= dleContext.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/twiddle= Context.xml (rev 0) +++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/twiddle= Context.xml 2007-07-25 02:14:55 UTC (rev 2642) @@ -0,0 +1,6 @@ + + + Click below to access the Twiddle Tutorial + + + = \ No newline at end of file --===============0841176034048954989==--