Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

## Package org.jboss.ant

An Ant plugin to call jmx operations and set and get attributes on MBeans in JBoss.

See:
Description

Interface Summary
JMX.Operation | The interface `Operation` provides a common interface for the sub-tasks..

Class Summary
JMX | JMX.java.
JMX.Getter | The class `Getter` specifies getting an attribute value of an mbean.
JMX.Invoke | The class `Invoke` specifies the invocation of a managed operation.
JMX.Param | The class `Param` is used to represent a object by means of a string representation of its value and its type.
JMX.PropertyEditorHolder | The class `PropertyEditorHolder` allows you to add a PropertyEditor to the default set.
JMX.Setter | The class `Setter` specifies setting an attribute value on an mbean.

## Package org.jboss.ant Description

An Ant plugin to call jmx operations and set and get attributes on MBeans in JBoss.

## Package Specification

To use this plugin with Ant, place the jbossjmx-ant.jar together with the jboss jars jboss-j2ee.jar and jboss-common-client.jar, and the sun jnet.jar in the ant/lib directory you wish to use.

To define the task, include something like this in your ant script:

        <taskdef name="jmx"
                 classname="org.jboss.ant.JMX">
        </taskdef>

As an alternative, instead of copying required libraries in the ant/lib directory you can specify them in "taskdef" task. For example

        <taskdef name="jmx"
                 classname="org.jboss.ant.JMX">
           <classpath>
               <pathelement path="${jboss.home}/client/jbossjmx-ant.jar"/>
               <pathelement path="${jboss.home}/client/jbossall-client.jar"/>
           </classpath>
        </taskdef>

What you can do:

- Include property editors:

      <propertyEditor type="java.math.BigDecimal" editor="org.jboss.util.propertyeditor.BigDecimalEditor"/>

- Invoke jmx managed operations:

            <invoke target="jboss.system:service=MainDeployer"
                    operation="deploy">
              <parameter type="java.lang.String"
      	arg="file:${basedir}/jython.jar"/>
            </invoke>

- Invoke jmx managed operations and put the return value in an ant property:

            <invoke target="jboss.system:service=MainDeployer"
                    operation="doSomething"
                    property="some.property">
              <parameter type="java.lang.String"
      	arg="file:${basedir}/jython.jar"/>
            </invoke>

- Set a managed attribute:

            <setAttribute target="jboss.system:service=MainDeployer"
                    attribute="SomeAttribute"
                    value="SomeValue"/>

- Get a managed attribute and put the value in an ant property:

            <getAttribute target="jboss.system:service=MainDeployer"
                    attribute="SomeAttribute"
                    property="SomeProperty"/>

## Related Documentation

- Not Available

## Package Status

- STABLE

## Todo

- Provide a way to register for notifications and wait until they are received

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.