/**
* Execute the specified command. This logic only performs the common
* attribute validation required by all subclasses; it does not perform any
* functional logic directly.
*
* @exception BuildException
* if a validation error occurs
*/
@Override
public void execute() throws BuildException {
if (testIfCondition() && testUnlessCondition()) {
try {
String error = null;
MBeanServerConnection jmxServerConnection = getJMXConnection();
error = jmxExecute(jmxServerConnection);
if (error != null && isFailOnError()) {
// exception should be thrown only if failOnError == true
// or error line will be logged twice
throw new BuildException(error);
}
} catch (Exception e) {
if (isFailOnError()) {
throw new BuildException(e);
} else {
handleErrorOutput(e.getMessage());
}
} finally {
closeRedirector();
}
}
}
JMXAccessorTask.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:tomcat7
作者:
评论列表
文章目录