0

Lock in page refresh

asked 2012-09-27 14:01:50 +0800

aros54 gravatar image aros54
66

Hello.
I have a singular issue when refreshing the main page of a J2EE Hibernate/Spring/ZK application. These are the Products versions:

Java 1.5
Hibernate 3.3.2
Spring 3.0.6
Sring Security 3.0.7
ZK 3.6.4
Application server WAS 6.1 running on AS/400

When pressing F5 on the browser (tested IEx, Chrome and Firefox) the application hangs. Eventually, after several minutes, I get this stack trace on the server log:

[9/27/12 17:09:42:829 JST] 0000000e ThreadMonitor W WSVR0605W: Thread "WebContainer : 5" (0000002d) has been active for 683989 milliseconds and may be hung. There is/are 1 thread(s) in total in the server that may be hung.
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:231)
at org.zkoss.zk.ui.impl.UiEngineImpl.doActivate(UiEngineImpl.java:1533)
at org.zkoss.zk.ui.impl.UiEngineImpl.activate(UiEngineImpl.java:1495)
at org.zkoss.zk.ui.impl.UiEngineImpl.desktopDestroyed(UiEngineImpl.java:180)
at org.zkoss.zk.ui.impl.SimpleDesktopCache.desktopDestroyed(SimpleDesktopCache.java:118)
at org.zkoss.zk.ui.impl.SimpleDesktopCache.stop(SimpleDesktopCache.java:166)
at org.zkoss.zk.ui.impl.SessionDesktopCacheProvider.sessionDestroyed(SessionDesktopCacheProvider.java:59)
at org.zkoss.zk.ui.impl.AbstractWebApp.sessionDestroyed(AbstractWebApp.java:286)
at org.zkoss.zk.ui.http.WebManager.sessionDestroyed(WebManager.java:353)
at org.zkoss.zk.ui.http.HttpSessionListener.sessionDestroyed(HttpSessionListener.java:41)
at com.ibm.ws.webcontainer.httpsession.SessionContext.sessionDestroyedEvent(SessionContext.java:3775)
at com.ibm.ws.webcontainer.httpsession.SessionData.sessionUnbound(SessionData.java:1036)
at com.ibm.ws.webcontainer.httpsession.SessionContext.notifySessionInvalidated(SessionContext.java:1143)
at com.ibm.ws.webcontainer.httpsession.SessionData.invalidate(SessionData.java:628)
at com.ibm.ws.webcontainer.httpsession.SessionData.invalidate(SessionData.java:647)
at com.ibm.ws.webcontainer.httpsession.HttpSessionFacade.invalidate(HttpSessionFacade.java:181)
at org.zkoss.zk.ui.http.SimpleSession.invalidateNow(SimpleSession.java:305)
at org.zkoss.zk.ui.impl.UiEngineImpl.doDeactivate(UiEngineImpl.java:1596)
at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1113)
at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:500)
at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:385)
at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:394)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1213)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1154)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:369)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)...

followed by this one:

[9/27/12 17:09:42:900 JST] 0000000e ThreadMonitor W WSVR0605W: Thread "WebContainer : 2" (00000020) has been active for 683864 milliseconds and may be hung. There is/are 2 thread(s) in total in the server that may be hung.
at com.ibm.ws.webcontainer.httpsession.SessionData.getValue(SessionData.java:1262)
at com.ibm.ws.webcontainer.httpsession.SessionData.getAttribute(SessionData.java:1148)
at org.zkoss.zk.ui.http.SimpleSession.getAttribute(SimpleSession.java:215)
at com.andromeda.agportal.agency.security.AgencyFilteringUtils.getSelectedAgency(AgencyFilteringUtils.java:93)
at com.andromeda.agportal.agency.view.component.AgencyLabel.refreshLabel(AgencyLabel.java:24)
at com.andromeda.addons.zk.component.UserRefreshLabel.afterCompose(UserRefreshLabel.java:64)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:637)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:587)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:531)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:498)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:631)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:587)...

Now what I can say is that, looking at the application messages, the page has been fully rebuilt as I can see on log that the required data access has been performed. After that, however, new access is made that belongs to the code that is executed when a logout has been asked. All happend as something is going to ask the session to be closed.
To make things much complicated, this happens ONLY when running on User Acceptance server (WAS 6.1 on AS/400). When the same application (same EAR) is deployed on a WAS 6.1 running on the local PC of a developer or the WAR on a local Tomcat 6.0 the application makes the refresh perfectly.
At this point what I can guess is that a particular configuration option of the server makes the difference, but I have no idea of what/where it can be found.
Any hint would be greatly appreciated.

/Adriano

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2012-10-09 14:40:01 +0800

aros54 gravatar image aros54
66

I made further investigations on this issue. What I discovered is that when the refresh is asked from UAT WAS (the locking one) the DesktopCleanup listener is invoked.
The application contains a custom desktop cleanup listener that implements the org.zkoss.zk.ui.util.DeskopCleanup interface and is defined into zk.xml. This is used to perform some cleanup operations that should be made when the user makes logout. If the user closes the brwoser without hit the logout button, this listener fixes up the things. When running on local WAS or Tomcat the listener is not invoked when a refresh is asked. It seems that on the AS/400 WAS when a refresh is asked the desktop got destroyed and the listener invoked.
I don't know if my understanding of what is a Desktop in zk is correct, but in my opinion it shpuld not be destroyed when a refresh is asked (F5). Am I wrong? Does anybody know which server configuration parameter(s) or what else can affect this behaviour?
I realize I'm groping for clues, but indeed I have no idea on how to get rid of this issue.
Sadly...
/Adriano

link publish delete flag offensive edit

answered 2012-12-14 02:08:20 +0800

samchuang gravatar image samchuang
4084 4

ZK will destroy Desktop and create a new one when Refresh browser

Do you mean the DesktopCleanup listener cause the issue ? so the implementation of your DesktopCleanup will not finish ?

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-09-27 14:01:50 +0800

Seen: 141 times

Last updated: Dec 14 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More