如何在jsp中设置响应时间

时间:2015-03-24 14:20:34

标签: java jsp

我有一个关于如何设置服务器响应超时时间的问题。

目前,我遇到了服务器无法在2分钟内做出响应的问题,当服务器在后台更新数据时,页面将不会更新。

由于服务器端的性能现在无法提高,所以我希望将响应时间扩展到足够长的时间。

有一个我无法理解的问题。当响应超时时,请求将再次发送到服务器,我想知道谁对此负责。

目前我使用的是Primefaces和Jboss。 下面是我得到的callstack(这个例程将每2分钟左右重复一次,具有不同的线程ID):

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6) java.lang.Exception: Stack trace

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at java.lang.Thread.dumpStack(Unknown Source)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at com.bel.rptvwr.business.ReportListBean.getReportList(ReportListBean.java:510)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at com.bel.rptvwr.business.ReportListBean.loadReportList(ReportListBean.java:570)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at com.bel.rptvwr.business.ReportListBean.refreshReportList(ReportListBean.java:77)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at java.lang.reflect.Method.invoke(Unknown Source)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at org.apache.el.parser.AstValue.invoke(AstValue.java:262)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at com.sun.faces.facelets.tag.jsf.core.DeclarativeSystemEventListener.processEvent(EventHandler.java:131)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at javax.faces.component.UIComponent$ComponentSystemEventListenerAdapter.processEvent(UIComponent.java:2486)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2168)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at com.sun.faces.application.ApplicationImpl.invokeComponentListenersFor(ApplicationImpl.java:2116)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:288)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:246)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

22:13:11,208 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

22:13:11,223 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

22:13:11,223 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

22:13:11,223 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

22:13:11,223 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

22:13:11,223 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

22:13:11,223 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

22:13:11,223 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

22:13:11,223 ERROR [stderr] (http-localhost-127.0.0.1-8080-6)   at java.lang.Thread.run(Unknown Source)

没有服务器端重试机制设置。所以请帮忙搞清楚。

谢谢, 列维

0 个答案:

没有答案