[ 
https://issues.apache.org/jira/browse/WICKET-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Krakora updated WICKET-6106:
--------------------------------
    Description: 
When something goes wrong with a WebSocket connection, Wicket just logs that at 
{{org.apache.wicket.protocol.ws.javax.WicketEndpoint.onError()}}. 
I would suggest to let developers using this API to handle the error and 
propagate onError the same way as onClose.


  was:
When something goes wrong with a WebSocket connection, Wicket just logs that at 
{{org.apache.wicket.protocol.ws.javax.WicketEndpoint.onError}}. 

Then {{org.apache.wicket.protocol.ws.javax.WicketEndpoint.onClose}} is called. 
This would normally inform any component on a page that is boud to the 
connection about closing the connection...but only if the connection is not in 
closed state. That state is set by the servlet container and it coud be set 
before calling {{org.apache.wicket.protocol.ws.javax.WicketEndpoint.onClose}}.

If a client of the wicket's WebSocket API need to know when a connection is 
closed, there is no chance in the scenario above.

I would suggest to propagate onError the same way as onClose and let the 
AbstractWebSocketProcessor broadcast those two type of message even if the 
connection is closed.



> Propagate JSR 356 WebSocket connection error to a page 
> -------------------------------------------------------
>
>                 Key: WICKET-6106
>                 URL: https://issues.apache.org/jira/browse/WICKET-6106
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-native-websocket
>    Affects Versions: 7.2.0
>            Reporter: Jan Krakora
>            Assignee: Martin Grigorov
>
> When something goes wrong with a WebSocket connection, Wicket just logs that 
> at {{org.apache.wicket.protocol.ws.javax.WicketEndpoint.onError()}}. 
> I would suggest to let developers using this API to handle the error and 
> propagate onError the same way as onClose.



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

Reply via email to