All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.ant.package.html Maven / Gradle / Ivy

There is a newer version: 6.1.0.Final
Show newest version


  
    
    
  

  
    

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

Package Status

  • STABLE

Todo

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy