So, I'm testing exception reporting in Portlet Tapestry under eXo and it's working pretty well. The same information as Servlet Tapestry, but not as pretty (because of the lack of style sheet control).
I'm amused at how deep the stack traces are. You can see a lot of Tomcat, eXo and AspectJ-generated code long before it even gets to Tapestry:
- ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:123)
- ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1616)
- ognl.ASTProperty.getValueBody(ASTProperty.java:96)
- ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
- ognl.SimpleNode.getValue(SimpleNode.java:210)
- ognl.Ognl.getValue(Ognl.java:333)
- ognl.Ognl.getValue(Ognl.java:310)
- org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.readCompiled(ExpressionEvaluatorImpl.java:84)
- $ExpressionEvaluator_103cbf6e379.readCompiled($ExpressionEvaluator_103cbf6e379.java)
- org.apache.tapestry.binding.ExpressionBinding.resolveExpression(ExpressionBinding.java:110)
- org.apache.tapestry.binding.ExpressionBinding.getObject(ExpressionBinding.java:103)
- org.apache.tapestry.binding.AbstractBinding.getObject(AbstractBinding.java:87)
- $Insert_1.getValue($Insert_1.java)
- org.apache.tapestry.components.Insert.renderComponent(Insert.java:42)
- org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:612)
- org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
- org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:612)
- org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:273)
- org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:355)
- org.apache.tapestry.portlet.PortletRendererImpl.renderPage(PortletRendererImpl.java:70)
- $PortletRenderer_103cbf6e30f.renderPage($PortletRenderer_103cbf6e30f.java)
- org.apache.tapestry.portlet.RenderService.service(RenderService.java:45)
- org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:65)
- org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:240)
- org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
- org.apache.tapestry.portlet.RenderRequestServicerToWebRequestServicerBridge.service(RenderRequestServicerToWebRequestServicerBridge.java:49)
- org.apache.tapestry.portlet.ApplicationPortlet.render(ApplicationPortlet.java:161)
- org.exoplatform.services.portletcontainer.impl.PortletApplicationHandler.render_aroundBody8(PortletApplicationHandler.java:226)
- org.exoplatform.services.portletcontainer.impl.PortletApplicationHandler.render_aroundBody9$advice(PortletApplicationHandler.java:458)
- org.exoplatform.services.portletcontainer.impl.PortletApplicationHandler.render_aroundBody10(PortletApplicationHandler.java)
- org.exoplatform.services.portletcontainer.impl.PortletApplicationHandler.render_aroundBody11$advice(PortletApplicationHandler.java:340)
- org.exoplatform.services.portletcontainer.impl.PortletApplicationHandler.render_aroundBody12(PortletApplicationHandler.java)
- org.exoplatform.services.portletcontainer.impl.PortletApplicationHandler.render_aroundBody13$advice(PortletApplicationHandler.java:172)
- org.exoplatform.services.portletcontainer.impl.PortletApplicationHandler.render_aroundBody14(PortletApplicationHandler.java)
- org.exoplatform.services.portletcontainer.impl.PortletApplicationHandler.render_aroundBody15$advice(PortletApplicationHandler.java:738)
- org.exoplatform.services.portletcontainer.impl.PortletApplicationHandler.render_aroundBody16(PortletApplicationHandler.java)
- org.exoplatform.services.portletcontainer.impl.PortletApplicationHandler.render_aroundBody17$advice(PortletApplicationHandler.java:628)
- org.exoplatform.services.portletcontainer.impl.PortletApplicationHandler.process(PortletApplicationHandler.java:226)
- org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper.service(ServletWrapper.java:70)
- javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
- org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
- org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
- org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
- org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
- org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)
- org.exoplatform.services.portletcontainer.impl.PortletContainerDispatcher.dispatch(PortletContainerDispatcher.java:370)
- org.exoplatform.services.portletcontainer.impl.PortletContainerDispatcher.process(PortletContainerDispatcher.java:310)
- org.exoplatform.services.portletcontainer.impl.PortletContainerDispatcher.render(PortletContainerDispatcher.java:271)
- org.exoplatform.services.portletcontainer.impl.PortletContainerServiceImpl.render(PortletContainerServiceImpl.java:144)
- org.exoplatform.portal.faces.renderer.html.portlet.PortletRenderer.encodeChildren(PortletRenderer.java:100)
- javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
- org.exoplatform.portal.faces.renderer.html.container.ContainerRowRenderer.renderViewMode(ContainerRowRenderer.java:40)
- org.exoplatform.portal.faces.renderer.html.container.ContainerRenderer.encodeChildren(ContainerRenderer.java:34)
- javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
- org.exoplatform.portal.faces.renderer.html.container.ContainerRowRenderer.renderViewMode(ContainerRowRenderer.java:40)
- org.exoplatform.portal.faces.renderer.html.container.ContainerRenderer.encodeChildren(ContainerRenderer.java:34)
- javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
- org.exoplatform.portal.faces.renderer.html.container.ContainerColumnRenderer.renderViewMode(ContainerColumnRenderer.java:40)
- org.exoplatform.portal.faces.renderer.html.container.ContainerRenderer.encodeChildren(ContainerRenderer.java:34)
- javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
- org.exoplatform.portal.faces.renderer.html.container.ContainerRowRenderer.renderViewMode(ContainerRowRenderer.java:40)
- org.exoplatform.portal.faces.renderer.html.container.ContainerRenderer.encodeChildren(ContainerRenderer.java:34)
- javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
- org.exoplatform.faces.core.renderer.html.HtmlBasicRenderer.renderChildren(HtmlBasicRenderer.java:63)
- org.exoplatform.portal.faces.renderer.html.portal.PortalRenderer.encodeChildren(PortalRenderer.java:58)
- javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
- org.exoplatform.portal.faces.application.ExoPortalViewHandler.renderView(ExoPortalViewHandler.java:63)
- com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
- com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
- com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
- javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
- org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
- org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
- org.exoplatform.portal.filter.PrivateRequestFilter.doFilter(PrivateRequestFilter.java:82)
- org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
- org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
- org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
- org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
- org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
- org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
- org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
- org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
- org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
- org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
- org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
- org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
- org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
- org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
- org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
- org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
- org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
- org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
- org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
- org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
- org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
- org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
- org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
- org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
- org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
- java.lang.Thread.run(Thread.java:536)
Do stacks this deep affect performance? Who knows? It's just interesting to see. Back in the day, when I was a PL/1 coder for Stratus, there was operating system code and application code. The operating system code was very stable, and the Stratus file system was like a simple hierarchical database (not dissimilar to what you can do today with an embedded database like Berkeley DB).
There was no "application stack". No frameworks, no libraries, no toolkits, no open source -- except what we created ourselves (even back then, I tended to write libraries and test suites). The application was our single layer on top of the operation system. When things went wrong, you would rule out the operating system, and start picking apart your code.
It's so much more complex now. "Your code" is a single eye dropper-full in an olympic sized swimming pool, mixed in with open source and proprietary code up the wazoo. When things go wrong, it can be a major effort just to identify the culprit, never mind provide a fix or work around.
Just chalk it up as a sign of the times; the demands of having 24/7 coverage, supporting all kinds of clients, high reliability, remote monitoring and administration ... all of these things add up to more and more code around your application and, barring some blazing insight within the industry, it's not going to change any time soon. But it does make me cringe a bit a deployment time, makes me nervous -- will it work in production? And I've been there, reworking code under deadline to get transactions and remote JMS queues working together inside a WebLogic cluster.
There's a quote I half remember from one of the Apollo astronauts, sitting on the pad, during the countdown ... trying not to remember that their lives depended on hundreds of thousands of different parts, all provided by the lowest bidder. Deploying a major application sometimes feels like that ... even when some of the parts are quite expensive, and others are routinely free.
No comments:
Post a Comment
Please note that this is not a support forum for Tapestry. Requests for help will be deleted. Please subscribe to the Tapestry user mailing list if you are in need of support, or contact me directly for professional (for pay) support.
Spammers: Don't bother. I delete your comments and it's a waste of time for both of us. 垃圾邮件发送者:不要打扰。我删除您的评论和它的时间对我们双方的浪费