final MBeanServer mbeanServer = this.mbeanServer.getOptionalValue();
if(mbeanServer != null) {
getRegistry().setMBeanServer(mbeanServer);
}
final Catalina catalina = new Catalina();
catalina.setCatalinaHome(pathInjector.getValue());
final StandardServer server = new StandardServer();
catalina.setServer(server);
final StandardService service = new StandardService();
service.setName(JBOSS_WEB);
service.setServer(server);
server.addService(service);
final Engine engine = new StandardEngine();
engine.setName(JBOSS_WEB);
engine.setService(service);
engine.setDefaultHost(defaultHost);
service.setContainer(engine);
// final AprLifecycleListener apr = new AprLifecycleListener();
//apr.setSSLEngine("on");
// server.addLifecycleListener(apr);
// server.addLifecycleListener(new JasperListener());
try {
catalina.create();
server.initialize();
catalina.start();
} catch (Exception e) {
throw new StartException(e);
}
this.catalina = catalina;
this.service = service;