public class JMXAccessorCreateTask extends JMXAccessorTask
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.JMX_SERVICE_PREFIX, JMX_SERVICE_SUFFIX
alwaysLog, failOnError, redirectErrStream, redirector, redirectorConfigured, redirectorElement, redirectOutput, redirectOutStream
Constructor and Description |
---|
JMXAccessorCreateTask() |
Modifier and Type | Method and Description |
---|---|
void |
addArg(Arg arg) |
List<Arg> |
getArgs() |
String |
getClassLoader() |
String |
getClassName() |
protected String |
jmxCreate(MBeanServerConnection jmxServerConnection,
String name)
create new Mbean and when set from ClassLoader Objectname
|
String |
jmxExecute(MBeanServerConnection jmxServerConnection)
Execute the specified command, based on the configured properties.
|
void |
setArgs(List<Arg> args) |
void |
setClassLoader(String classLoaderName) |
void |
setClassName(String className) |
accessJMXConnection, convertStringToType, createJMXConnection, createProperty, createProperty, echoResult, execute, getDelimiter, getHost, getIf, getJMXConnection, getName, getPassword, getPort, getProperty, getRef, getResultproperty, getUnless, getUrl, getUsername, isEcho, isSeparatearrayresults, isUseRef, setDelimiter, setEcho, setHost, setIf, setName, setPassword, setPort, setProperty, setRef, setResultproperty, setSeparatearrayresults, setUnless, setUrl, setUsername, testIfCondition, testUnlessCondition
addConfiguredRedirector, closeRedirector, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, handleOutput, isFailOnError, openRedirector, setAlwaysLog, setAppend, setCreateEmptyFiles, setError, setErrorProperty, setFailonerror, setLogError, setOutput, setOutputproperty
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleInput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
public String getClassLoader()
public void setClassLoader(String classLoaderName)
classLoaderName
- The classLoader to set.public String getClassName()
public void setClassName(String className)
className
- The className to set.public void addArg(Arg arg)
public String jmxExecute(MBeanServerConnection jmxServerConnection) throws Exception
jmxExecute
in class JMXAccessorTask
Exception
- if an error occursprotected String jmxCreate(MBeanServerConnection jmxServerConnection, String name) throws Exception
jmxServerConnection
- name
- Exception
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.