/**
* Creates a new instance of JTSMonitorMBean
*/
public JTSMonitorMBean() {
txnMgr = Switch.getSwitch().getTransactionManager();
ServerContext sCtx = ApplicationServer.getServerContext();
if (sCtx != null) {
try {
ConfigContext ctx = sCtx.getConfigContext();
Config cfg = ServerBeansFactory.getConfigBean(ctx);
String lvl = cfg.getMonitoringService().getModuleMonitoringLevels().getTransactionService();
MonitoringLevel l = MonitoringLevel.instance(lvl);
if (l != MonitoringLevel.OFF) {
startMonitoring();
}
MonitoringRegistry registry = sCtx.getMonitoringRegistry();
JTAStatsImpl.createInstance(this);
JTAStatsImpl statImpl = JTAStatsImpl.getInstance();
registry.registerJTAStats(statImpl, statImpl);
_logger.log(Level.FINE,"JTAStats monitoring registration completed");
TransactionService txnService = ServerBeansFactory.getTransactionServiceBean(ctx);