You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/11/15 20:43:58 UTC

[jira] [Commented] (WICKET-6277) Broadcasting ClosedMessage about the JSR 356 WebSocket connection after the container was turned off

    [ https://issues.apache.org/jira/browse/WICKET-6277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15668246#comment-15668246 ] 

ASF subversion and git services commented on WICKET-6277:
---------------------------------------------------------

Commit 21837bcccd78bb529c2f33fbcd947ff5b9732739 in wicket's branch refs/heads/master from [~mgrigorov]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=21837bc ]

WICKET-6277 Broadcasting ClosedMessage about the JSR 356 WebSocket connection after the container was turned off

Do not notify the websocket behaviors/resources when the application is already destroyed.
Add non-null checks for IPageStore in PageStoreManager.


> Broadcasting ClosedMessage about the JSR 356 WebSocket connection after the container was turned off
> ----------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-6277
>                 URL: https://issues.apache.org/jira/browse/WICKET-6277
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-native-websocket
>    Affects Versions: 7.4.0
>         Environment: Windows 10, Tomcat 8.0.33, JDK 1.8.0_91
>            Reporter: Jan Krakora
>            Assignee: Martin Grigorov
>            Priority: Minor
>
> Whenever is the servlet container (Tomcat in my case) turned off it closes all established ws connections. Wicket reacts to that by broadcasting a {{ClosedMessage}} to a {{Page}} bounded to that connection. And that is a problem since before that, {{org.apache.wicket.protocol.http.WicketFilter#destroy()}} is called and (among others) the {{IPageManager}} is destroyed.
> It leads to a NPE:
> {code}
> java.lang.NullPointerException: null
> 	at org.apache.wicket.page.PageStoreManager$SessionEntry.getPage(PageStoreManager.java:203)
> 	at org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.getPage(PageStoreManager.java:357)
> 	at org.apache.wicket.page.AbstractPageManager.getPage(AbstractPageManager.java:82)
> 	at org.apache.wicket.page.PageManagerDecorator.getPage(PageManagerDecorator.java:50)
> 	at org.apache.wicket.page.PageAccessSynchronizer$2.getPage(PageAccessSynchronizer.java:246)
> 	at org.apache.wicket.protocol.ws.api.AbstractWebSocketProcessor.getPage(AbstractWebSocketProcessor.java:315)
> 	at org.apache.wicket.protocol.ws.api.AbstractWebSocketProcessor.broadcastMessage(AbstractWebSocketProcessor.java:243)
> 	at org.apache.wicket.protocol.ws.api.AbstractWebSocketProcessor.onClose(AbstractWebSocketProcessor.java:182)
> 	at org.apache.wicket.protocol.ws.javax.WicketEndpoint.onClose(WicketEndpoint.java:71)
> 	at org.apache.tomcat.websocket.WsSession.fireEndpointOnClose(WsSession.java:541)
> 	at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:490)
> 	at org.apache.tomcat.websocket.WsSession.close(WsSession.java:454)
> 	at org.apache.tomcat.websocket.WsWebSocketContainer.destroy(WsWebSocketContainer.java:926)
> 	at org.apache.tomcat.websocket.server.WsServerContainer.destroy(WsServerContainer.java:285)
> 	at org.apache.tomcat.websocket.server.WsContextListener.contextDestroyed(WsContextListener.java:48)
> 	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4856)
> 	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5474)
> 	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
> 	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1424)
> 	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1413)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)
> {code}
> I think it would be good idea to NOT broadcast {{ClosedMessage}} when the Application is already destroyed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)