embeddedJmxTrans = configurationParser.newEmbeddedJmxTrans(configurationUrls);
String on = "org.jmxtrans.embedded:type=EmbeddedJmxTrans,name=jmxtrans,path=" + sce.getServletContext().getContextPath();
try {
objectName = mbeanServer.registerMBean(embeddedJmxTrans, new ObjectName(on)).getObjectName();
} catch (Exception e) {
throw new EmbeddedJmxTransException("Exception registering '" + objectName + "'", e);
}
try {
embeddedJmxTrans.start();
} catch (Exception e) {
String message = "Exception starting jmxtrans for application '" + sce.getServletContext().getContextPath() + "'";
sce.getServletContext().log(message, e);
throw new EmbeddedJmxTransException(message, e);
}
}