blob: 73ea33e3419b5b051b86f9c361992cc0fee28334 [file] [log] [blame]
package org.eclipse.virgo.util.jmx;
import javax.management.MXBean;
@MXBean
public class ExceptionCleanerMXBean implements JmxExceptionCleanerExtensionTestInterface {
private StackTraceElement[] steArray = null;
@Override
public void unCaughtMethod() {
RuntimeException rte = new RuntimeException("unCaughtMethod", new Exception("test exception"));
this.steArray = rte.getStackTrace();
throw rte;
}
@Override
public void caughtMethod() {
RuntimeException rte = new RuntimeException("caughtMethod", new Exception("test exception"));
this.steArray = rte.getStackTrace();
throw rte;
}
public StackTraceElement[] getStackTrace() {
return this.steArray;
}
@Override
public void anotherCaughtMethod() {
RuntimeException rte = new RuntimeException("anotherCaughtMethod", new Exception("test exception"));
this.steArray = rte.getStackTrace();
throw rte;
}
}