On 14/07/2016 09:26, Jäkel, Guido wrote: > Hi Mark, > > OK - as a newbie I read this from the stack trace: ... > >> 20160713-161427.340 ERROR [catalina-exec-64] [] [[/]] >> StandardWrapper.Throwable >> [...] >> at >> org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) >> at javax.servlet.GenericServlet.init(Unknown Source) >> at org.apache.catalina.core.StandardWrapper.initServlet(Unknown >> Source) >> at org.apache.catalina.core.StandardWrapper.loadServlet(Unknown >> Source) >> at org.apache.catalina.core.StandardWrapper.allocate(Unknown Source) >> 2) at >> org.apache.catalina.core.StandardWrapper.isSingleThreadModel(Unknown Source) >> at sun.reflect.GeneratedMethodAccessor178.invoke(Unknown Source) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:497) >> 1) at org.apache.tomcat.util.modeler.BaseModelMBean.getAttribute(Unknown >> Source) >> at >> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:647) >> at >> com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678) >> at org.apache.catalina.mbeans.MBeanDumper.dumpBeans(Unknown Source) > [...] > > It seems to me that "all reading is passiv" don't hold because the call to > getAttibute() at 1) will invoke the MBean and this leads to the call of > isSingleThreadModel at 2) -- I don't see why at the moment.
Your analysis is spot on. I only reviewed the StandardContext attributes. I didn't look at StandardWrapper. <snip/> > So maybe there should be a special code path in case of an ongoing > initialization on the top like the 'if(unloading)' clause. The note states, > that one can't decide if a Servlet implements SingleThreadModel until > loading. So maybe on startup this must be answered in a "conservative way" > (if possible) or thrown back with an exception. If this will lead to an > overall exception for the MBean request, this might be "the right thing", > because at leaset one of the returned information can't be answered yet at > this moment (during initialization of the servlet). <snip/> Something along those lines, yes. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org