A more long term solution involves:
public classTomcatService extends ServiceMBeanSupport implements NotificationListener, TomcatServiceMBean
log.error("Could not read configured server.xml (will try default): " + tomcatDeployer.getConfigFile());
Registry.getRegistry(null, null).registerComponent(catalina, objectName, "org.apache.catalina.startup.Catalina");
// Use the server.xml metadata to create a Server instance and assign it to the Catalina instance(org.apache.catalina.Server) getInstance(serverMetaData, "org.apache.catalina.core.StandardServer");
new ObjectName(tomcatDeployer.getDomain() + ":type=Server"), "org.apache.catalina.startup.StandardServer");
(org.apache.catalina.Service) getInstance(serviceMetaData, "org.apache.catalina.core.StandardService");
(org.apache.catalina.Engine) getInstance(engineMetaData, "org.apache.catalina.core.StandardEngine");
PolicyContext.registerHandler(HttpServletRequestPolicyContextHandler.WEB_REQUEST_KEY, handler, true);
log.debug("Server '" + ServerImplMBean.OBJECT_NAME + "' already started, starting connectors now");
log.debug("Server '" + ServerImplMBean.OBJECT_NAME + "' not started, registering for start-up notification");
protected static ObjectgetInstance(AnyXmlMetaData metaData, String defaultClassName) throws Exception
protected static voidaddLifecycleListeners(Object instance, List<ListenerMetaData> list) throws Exception
lifecycle.addLifecycleListener((org.apache.catalina.LifecycleListener) getInstance(listenerMetaData, null));
log.debug("Server '" + ServerImplMBean.OBJECT_NAME + "' already started, stopping connectors now");
ObjectName service = new ObjectName(tomcatDeployer.getDomain() + ":type=Service,serviceName=jboss.web");
* TODO: // Notify listeners that connectors have started processing requests sendNotification(newObjectName service = new ObjectName(tomcatDeployer.getDomain() + ":type=Service,serviceName=jboss.web");
* @see org.jboss.web.tomcat.service.deployers.TomcatDeployerMBean#setHttpHeaderForSSOAuth(java.lang.String) * @see org.jboss.web.tomcat.service.deployers.TomcatDeployerMBean#setSessionCookieForSSOAuth(java.lang.String)KernelController
into JBossWebMicrocontainerBeanLocator.
public voidsetKernelControllerContext(KernelControllerContext controllerContext) throws Exception
KernelController kernelController = controllerContext == null ? null : controllerContext.getKernel().getController();
KernelController
from JBossWebMicrocontainerBeanLocator.
public voidunsetKernelControllerContext(KernelControllerContext controllerContext) throws Exception