org.apache.catalina.ant.jmx
public class: JMXAccessorUnregisterTask [javadoc |
source]
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.catalina.ant.BaseRedirectorHelperTask
org.apache.catalina.ant.jmx.JMXAccessorTask
org.apache.catalina.ant.jmx.JMXAccessorUnregisterTask
All Implemented Interfaces:
Cloneable
unregister a MBean at
JMX JSR 160 MBeans Server.
Examples:
unregister an existing Mbean at jmx.server connection
<jmx:unregister
ref="jmx.server"
name="Catalina:type=MBeanFactory" />
WARNINGNot all Tomcat MBeans can successfully unregister remotely. The mbean
unregistration don't remove valves, realm, .. from parent class.
Please, use the MBeanFactory operation to remove 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.
- author:
Peter - Rossbach
- version:
$ - Revision: 500684 $
- since:
5.5.12 -
| Methods from org.apache.catalina.ant.jmx.JMXAccessorTask: |
|---|
|
accessJMXConnection, convertStringToType, createJMXConnection, createProperty, createProperty, echoResult, execute, getDelimiter, getHost, getIf, getInfo, getJMXConnection, getName, getPassword, getPort, getProperties, getProperty, getRef, getResultproperty, getUnless, getUrl, getUsername, isEcho, isSeparatearrayresults, isUseRef, jmxExecute, setDelimiter, setEcho, setHost, setIf, setName, setPassword, setPort, setProperty, setRef, setResultproperty, setSeparatearrayresults, setUnless, setUrl, setUsername, testIfCondition, testUnlessCondition |
| Methods from org.apache.catalina.ant.BaseRedirectorHelperTask: |
|---|
|
addConfiguredRedirector, closeRedirector, handleErrorFlush, handleErrorOutput, handleFlush, handleFlush, handleOutput, handleOutput, isFailOnError, openRedirector, setAlwaysLog, setAppend, setCreateEmptyFiles, setError, setErrorProperty, setFailonerror, setLogError, setOutput, setOutputproperty |
| Methods from org.apache.tools.ant.Task: |
|---|
|
bindToOwner, execute, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, init, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
| Method from org.apache.catalina.ant.jmx.JMXAccessorUnregisterTask Detail: |
public String getInfo() {
return (info);
}
Return descriptive information about this implementation and the
corresponding version number, in the format
<description>/<version>. |
public String jmxExecute(MBeanServerConnection jmxServerConnection) throws Exception {
if (getName() == null) {
throw new BuildException("Must specify a 'name'");
}
return jmxUuregister(jmxServerConnection, getName());
}
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. |
protected String jmxUuregister(MBeanServerConnection jmxServerConnection,
String name) throws Exception {
String error = null;
if(isEcho()) {
handleOutput("Unregister MBean " + name );
}
jmxServerConnection.unregisterMBean(
new ObjectName(name));
return error;
}
|