JBoss 7.1.1Final上J2EE应用程序的性能问题

时间:2012-10-11 20:23:08

标签: jsf-2 jboss7.x jboss-weld

最近我们在JBoss 7.1.1Final上部署了J2EE应用程序。此应用程序使用CDI(Weld实现),JSF 2.1(Mojarra),Seam 3和Hibernate 4.当我们遇到更高的负载时,应用程序变得缓慢。即使在负载下降一点之后,响应性仍然较差。 8核心机器的CPU利用率约为300%。所以看起来CPU不是瓶颈。我也检查数据库或IO可能是一个瓶颈而事实并非如此。内存也足够了,JVM使用的3GB最多可以使用2GB内存。我真的不知道在哪里看。当服务器具有较高的CPU利用率时,我会转储使用CPU最多的线程,而且看起来Weld或JSF存在一些问题,这些是响应性较低时经常出现的一些线程转储:

 java.lang.Thread.State: RUNNABLE
    at java.lang.ThreadLocal.get(ThreadLocal.java:143)
    at org.jboss.weld.context.cache.RequestScopedBeanCache.isActive(RequestScopedBeanCache.java:37)
    at org.jboss.seam.faces.environment.SeamExternalContext$Proxy$_$$_WeldClientProxy.getInitParameter(SeamExternalContext$Proxy$_$$_WeldClientProxy.java)
    at javax.faces.component.UIComponent.popComponentFromEL(UIComponent.java:1944)
    at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2218)
    at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
    at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
    at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
    at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
    at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
    at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
    at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
    at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
    at javax.faces.component.UIComponentBase.doPostAddProcessing(UIComponentBase.java:1883)
    at javax.faces.component.UIComponentBase.setParent(UIComponentBase.java:400)
    at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2635)
    at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2607)
    at com.sun.faces.facelets.tag.jsf.ComponentSupport.addComponent(ComponentSupport.java:574)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.addComponentToView(ComponentTagHandlerDelegateImpl.java:311)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:211)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
    at com.sun.faces.facelets.tag.ui.DecorateHandler.apply(DecorateHandler.java:145)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
    at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:53)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)


 java.lang.Thread.State: RUNNABLE
    at java.lang.Thread.currentThread(Native Method)
    at java.lang.ThreadLocal.get(ThreadLocal.java:143)
    at org.jboss.weld.bean.proxy.InterceptionDecorationContext.pop(InterceptionDecorationContext.java:43)
    at org.jboss.weld.bean.proxy.InterceptionDecorationContext.endInterceptorContext(InterceptionDecorationContext.java:93)
    at org.jboss.seam.faces.environment.SeamExternalContext$Proxy$_$$_WeldClientProxy.getInitParameter(SeamExternalContext$Proxy$_$$_WeldClientProxy.java)
    at javax.faces.component.UIComponent.pushComponentToEL(UIComponent.java:1860)
    at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2200)
    at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
    at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
    at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
    at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
    at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
    at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
    at javax.faces.component.UIComponentBase.doPostAddProcessing(UIComponentBase.java:1883)
    at javax.faces.component.UIComponentBase.setParent(UIComponentBase.java:400)
    at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2635)
    at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2607)
    at com.sun.faces.facelets.tag.jsf.ComponentSupport.addComponent(ComponentSupport.java:574)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.addComponentToView(ComponentTagHandlerDelegateImpl.java:311)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:211)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
    at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:53)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:107)
    at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:178)
    at com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:395)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:366)
    at com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:112)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
    at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:53)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:182)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)

   java.lang.Thread.State: RUNNABLE
at java.lang.ThreadLocal$ThreadLocalMap$Entry.<init>(ThreadLocal.java:276)
at java.lang.ThreadLocal$ThreadLocalMap.set(ThreadLocal.java:443)
at java.lang.ThreadLocal$ThreadLocalMap.access$100(ThreadLocal.java:261)
at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:164)
at java.lang.ThreadLocal.get(ThreadLocal.java:150)
at org.jboss.weld.bean.proxy.InterceptionDecorationContext.push(InterceptionDecorationContext.java:58)
at org.jboss.weld.bean.proxy.InterceptionDecorationContext.startInterceptorContext(InterceptionDecorationContext.java:97)
at org.jboss.seam.faces.environment.SeamExternalContext$Proxy$_$$_WeldClientProxy.getInitParameter(SeamExternalContext$Proxy$_$$_WeldClientProxy.java)
at javax.faces.component.UIComponent.pushComponentToEL(UIComponent.java:1860)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2200)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.doPostAddProcessing(UIComponentBase.java:1883)
at javax.faces.component.UIComponentBase.setParent(UIComponentBase.java:400)
at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2635)
at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2607)
at com.sun.faces.facelets.tag.jsf.ComponentSupport.addComponent(ComponentSupport.java:574)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.addComponentToView(ComponentTagHandlerDelegateImpl.java:311)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:211)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at com.sun.faces.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:182)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)

任何想法可能有什么问题?

由于

0 个答案:

没有答案