org.apache.catalina.ant.jmx

Class JMXAccessorCreateTask

public class JMXAccessorCreateTask extends JMXAccessorTask

Create new MBean at JMX JSR 160 MBeans Server.

Examples:
create a new Mbean at jmx.server connection

   <jmx:create
           ref="jmx.server"
           name="Catalina:type=MBeanFactory"
           className="org.apache.catalina.mbeans.MBeanFactory"
           classLoader="Catalina:type=ServerClassLoader,name=server">
            <Arg value="org.apache.catalina.mbeans.MBeanFactory" />
   </jmxCreate/>
 

WARNINGNot all Tomcat MBeans can create remotely and autoregister by its parents! Please, use the MBeanFactory operation to generate valves and realms.

First call to a remote MBeanserver save the JMXConnection a reference jmx.server

These tasks require Ant 1.6 or later interface.

Since: 5.5.12

Version: $Revision: 467222 $

Author: Peter Rossbach

Method Summary
voidaddArg(Arg arg)
ListgetArgs()
StringgetClassLoader()
StringgetClassName()
StringgetInfo()
Return descriptive information about this implementation and the corresponding version number, in the format <description>/<version>.
protected StringjmxCreate(MBeanServerConnection jmxServerConnection, String name)
create new Mbean and when set from ClassLoader Objectname
StringjmxExecute(MBeanServerConnection jmxServerConnection)
Execute the specified command, based on the configured properties.
voidsetArgs(List args)
voidsetClassLoader(String classLoaderName)
voidsetClassName(String className)

Method Detail

addArg

public void addArg(Arg arg)

getArgs

public List getArgs()

Returns: Returns the args.

getClassLoader

public String getClassLoader()

Returns: Returns the classLoader.

getClassName

public String getClassName()

Returns: Returns the className.

getInfo

public String getInfo()
Return descriptive information about this implementation and the corresponding version number, in the format <description>/<version>.

Returns: Returns the class info.

jmxCreate

protected String jmxCreate(MBeanServerConnection jmxServerConnection, String name)
create new Mbean and when set from ClassLoader Objectname

Parameters: jmxServerConnection name

Returns: The value of the given named attribute

Throws: Exception

jmxExecute

public String jmxExecute(MBeanServerConnection jmxServerConnection)
Execute the specified command, based on the configured properties. The input stream will be closed upon completion of this task, whether it was executed successfully or not.

Throws: Exception if an error occurs

setArgs

public void setArgs(List args)

Parameters: args The args to set.

setClassLoader

public void setClassLoader(String classLoaderName)

Parameters: classLoader The classLoader to set.

setClassName

public void setClassName(String className)

Parameters: className The className to set.

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.