[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17486059#comment-17486059 ] ASF subversion and git services commented on WICKET-6950: - Commit 9828cf8e783f5fcd897826d297b53a5cafc52adc in wicket's branch refs/heads/master from reiern70 [ https://gitbox.apache.org/repos/asf?p=wicket.git;h=9828cf8 ] [WICKET-6950] allow configuring web-sockets sessions when connection is opened > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17485023#comment-17485023 ] ASF subversion and git services commented on WICKET-6950: - Commit 57ee0c2068b4a975a901ce46aa08eeea5e623cd2 in wicket's branch refs/heads/wicket-9.x from reiern70 [ https://gitbox.apache.org/repos/asf?p=wicket.git;h=57ee0c2 ] [WICKET-6950] allow configuring web-sockets sessions when connection is opened > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17485022#comment-17485022 ] ASF subversion and git services commented on WICKET-6950: - Commit 57ee0c2068b4a975a901ce46aa08eeea5e623cd2 in wicket's branch refs/heads/improvement/reiern70/WICKET-6950 from reiern70 [ https://gitbox.apache.org/repos/asf?p=wicket.git;h=57ee0c2 ] [WICKET-6950] allow configuring web-sockets sessions when connection is opened > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17485025#comment-17485025 ] ASF GitHub Bot commented on WICKET-6950: reiern70 commented on pull request #496: URL: https://github.com/apache/wicket/pull/496#issuecomment-1026409967 I will create PR for master. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17485024#comment-17485024 ] ASF GitHub Bot commented on WICKET-6950: reiern70 commented on pull request #496: URL: https://github.com/apache/wicket/pull/496#issuecomment-1026409813 @martin-g Many thanks for review and comments. This landed in wicket-9.x branch -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17485021#comment-17485021 ] ASF GitHub Bot commented on WICKET-6950: reiern70 merged pull request #496: URL: https://github.com/apache/wicket/pull/496 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17485020#comment-17485020 ] ASF subversion and git services commented on WICKET-6950: - Commit ba15ef7d62c923f3901e925a80adc02ccaa36f12 in wicket's branch refs/heads/improvement/reiern70/WICKET-6950 from reiern70 [ https://gitbox.apache.org/repos/asf?p=wicket.git;h=ba15ef7 ] [WICKET-6950] allow configuring web-sockets sessions when connection is opened > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17485018#comment-17485018 ] ASF GitHub Bot commented on WICKET-6950: reiern70 commented on a change in pull request #496: URL: https://github.com/apache/wicket/pull/496#discussion_r796215209 ## File path: wicket-examples/src/main/java/org/apache/wicket/examples/websocket/JSR356Application.java ## @@ -59,11 +66,22 @@ public void init() getSharedResources().add(ChartWebSocketResource.NAME, new ChartWebSocketResource()); + final WebSocketSettings webSocketSettings = WebSocketSettings.Holder.get(this); + + webSocketSettings.setSocketSessionConfigurer(new IWebSocketSessionConfigurer() { Review comment: I was not sure what was the accepted style in examples... we use extensively lambdas in our project. I will do. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17485017#comment-17485017 ] ASF GitHub Bot commented on WICKET-6950: reiern70 commented on a change in pull request #496: URL: https://github.com/apache/wicket/pull/496#discussion_r796214845 ## File path: wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/WicketEndpoint.java ## @@ -43,6 +46,118 @@ */ public class WicketEndpoint extends Endpoint { + private static class JavaxWebSocketSessionWrapper implements IWebSocketSession Review comment: done ## File path: wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/WebSocketSettings.java ## @@ -245,6 +246,16 @@ public Executor getSendPayloadExecutor() return sendPayloadExecutor; } + /** +* Allows to configure {@link org.apache.wicket.protocol.ws.api.IWebSocketSession} +* +* @param webSocketSession The {@link org.apache.wicket.protocol.ws.api.IWebSocketSession} +*/ + public void configureSession(IWebSocketSession webSocketSession) Review comment: Done! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17484890#comment-17484890 ] ASF GitHub Bot commented on WICKET-6950: martin-g commented on a change in pull request #496: URL: https://github.com/apache/wicket/pull/496#discussion_r795995115 ## File path: wicket-examples/src/main/java/org/apache/wicket/examples/websocket/JSR356Application.java ## @@ -59,11 +66,22 @@ public void init() getSharedResources().add(ChartWebSocketResource.NAME, new ChartWebSocketResource()); + final WebSocketSettings webSocketSettings = WebSocketSettings.Holder.get(this); + + webSocketSettings.setSocketSessionConfigurer(new IWebSocketSessionConfigurer() { Review comment: you can be cool and use lambda here :-) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17484888#comment-17484888 ] ASF GitHub Bot commented on WICKET-6950: martin-g commented on a change in pull request #496: URL: https://github.com/apache/wicket/pull/496#discussion_r795993193 ## File path: wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/IWebSocketSession.java ## @@ -0,0 +1,119 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.wicket.protocol.ws.api; + +import java.net.URI; +import java.security.Principal; +import java.util.List; +import java.util.Map; + +/** + * Wicket proxy interface to javax.websocket.Session. + */ +public interface IWebSocketSession +{ + +/** + * See javax.websocket.Session#getProtocolVersion() Review comment: Yep! I know! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17484887#comment-17484887 ] ASF GitHub Bot commented on WICKET-6950: martin-g commented on a change in pull request #496: URL: https://github.com/apache/wicket/pull/496#discussion_r795992677 ## File path: wicket-examples/src/main/java/org/apache/wicket/examples/websocket/JSR356Application.java ## @@ -59,11 +65,22 @@ public void init() getSharedResources().add(ChartWebSocketResource.NAME, new ChartWebSocketResource()); + final WebSocketSettings webSocketSettings = new WebSocketSettings() { + @Override + public void configureSession(IWebSocketSession webSocketSession) { + LOGGER.info("getMaxIdleTimeout = " + webSocketSession.getMaxIdleTimeout()); + // make sessions almost "immortal" + webSocketSession.setMaxIdleTimeout(Duration.ofHours(10).toMillis()); Review comment: 5 mins at most. This is just a demo, we don't guarantee 99.999% SLA :-) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17484856#comment-17484856 ] ASF subversion and git services commented on WICKET-6950: - Commit 409f94f1fb7d8f95613e30871869629373fb2961 in wicket's branch refs/heads/improvement/reiern70/WICKET-6950 from reiern70 [ https://gitbox.apache.org/repos/asf?p=wicket.git;h=409f94f ] [WICKET-6950] allow configuring web-sockets sessions when connection is opened > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17484849#comment-17484849 ] ASF subversion and git services commented on WICKET-6950: - Commit 2b68362c67d248dac6d980a62c8e7327952688cc in wicket's branch refs/heads/improvement/reiern70/WICKET-6950 from reiern70 [ https://gitbox.apache.org/repos/asf?p=wicket.git;h=2b68362 ] [WICKET-6950] change logging > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17484844#comment-17484844 ] ASF subversion and git services commented on WICKET-6950: - Commit 90732233dfdae7fade5bf84c4f936ec28cd6ef17 in wicket's branch refs/heads/improvement/reiern70/WICKET-6950 from reiern70 [ https://gitbox.apache.org/repos/asf?p=wicket.git;h=9073223 ] [WICKET-6950] change logging > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17484823#comment-17484823 ] ASF GitHub Bot commented on WICKET-6950: reiern70 commented on pull request #496: URL: https://github.com/apache/wicket/pull/496#issuecomment-1026049655 Setting it to -1 produces java.lang.IllegalArgumentException: IdleTimeout [-1] must be a greater than or equal to 0 at org.eclipse.jetty.websocket.api.WebSocketPolicy.assertGreaterThan(WebSocketPolicy.java:117) at org.eclipse.jetty.websocket.api.WebSocketPolicy.setIdleTimeout(WebSocketPolicy.java:300) at org.eclipse.jetty.websocket.jsr356.JsrSession.setMaxIdleTimeout(JsrSession.java:351) at org.apache.wicket.protocol.ws.javax.JavaxWebSocketSession.setMaxIdleTimeout(JavaxWebSocketSession.java:73) at org.apache.wicket.examples.websocket.JSR356Application$1.configureSession(JSR356Application.java:76) at org.apache.wicket.protocol.ws.api.IWebSocketProcessor.onOpen(IWebSocketProcessor.java:41) at org.apache.wicket.protocol.ws.javax.WicketEndpoint.onOpen(WicketEndpoint.java:74) at org.eclipse.jetty.websocket.jsr356.endpoints.JsrEndpointEventDriver.onConnect(JsrEndpointEventDriver.java:145) at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.openSession(AbstractEventDriver.java:217) at org.eclipse.jetty.websocket.jsr356.endpoints.AbstractJsrEventDriver.openSession(AbstractJsrEventDriver.java:107) at org.eclipse.jetty.websocket.common.WebSocketSession.open(WebSocketSession.java:493) at org.eclipse.jetty.websocket.common.WebSocketSession.onOpened(WebSocketSession.java:459) at org.eclipse.jetty.io.AbstractConnection.onOpened(AbstractConnection.java:213) at org.eclipse.jetty.io.AbstractConnection.onOpen(AbstractConnection.java:205) at org.eclipse.jetty.io.AbstractEndPoint.upgrade(AbstractEndPoint.java:444) at org.eclipse.jetty.server.HttpConnection.onCompleted(HttpConnection.java:412) at org.eclipse.jetty.server.HttpChannel.onCompleted(HttpChannel.java:832) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:137) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) at java.base/java.lang.Thread.run(Thread.java:829) Thus jetty implementation does not stick to "standard" -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17484820#comment-17484820 ] ASF GitHub Bot commented on WICKET-6950: reiern70 commented on pull request #496: URL: https://github.com/apache/wicket/pull/496#issuecomment-1026047297 org.eclipse.jetty.websocket.api.CloseException: java.util.concurrent.TimeoutException: Idle timeout expired: 6/6 ms at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onReadTimeout(AbstractWebSocketConnection.java:564) at org.eclipse.jetty.io.AbstractConnection.onFillInterestedFailed(AbstractConnection.java:172) at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillInterestedFailed(AbstractWebSocketConnection.java:539) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.failed(AbstractConnection.java:317) at org.eclipse.jetty.io.FillInterest.onFail(FillInterest.java:140) at org.eclipse.jetty.io.AbstractEndPoint.onIdleExpired(AbstractEndPoint.java:407) at org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:171) at org.eclipse.jetty.io.IdleTimeout.idleCheck(IdleTimeout.java:113) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.util.concurrent.TimeoutException: Idle timeout expired: 6/6 ms It seems this works as expected. Set it to one minute. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17484778#comment-17484778 ] ASF GitHub Bot commented on WICKET-6950: reiern70 commented on pull request #496: URL: https://github.com/apache/wicket/pull/496#issuecomment-1025975462 @martin-g I have included your suggestion + commnets. ![image](https://user-images.githubusercontent.com/462655/151834430-39be0b5f-02f0-4386-a6e0-1bd82edf033f.png) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17484775#comment-17484775 ] ASF subversion and git services commented on WICKET-6950: - Commit f193f220528fa8f0c48bd09c18a871c52411a3f6 in wicket's branch refs/heads/improvement/reiern70/WICKET-6950 from reiern70 [ https://gitbox.apache.org/repos/asf?p=wicket.git;h=f193f22 ] [WICKET-6950] allow configuring web-sockets sessions when connection is opened: include comments > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17484668#comment-17484668 ] ASF GitHub Bot commented on WICKET-6950: reiern70 commented on a change in pull request #496: URL: https://github.com/apache/wicket/pull/496#discussion_r795659246 ## File path: wicket-examples/src/main/java/org/apache/wicket/examples/websocket/JSR356Application.java ## @@ -59,11 +65,22 @@ public void init() getSharedResources().add(ChartWebSocketResource.NAME, new ChartWebSocketResource()); + final WebSocketSettings webSocketSettings = new WebSocketSettings() { + @Override + public void configureSession(IWebSocketSession webSocketSession) { + LOGGER.info("getMaxIdleTimeout = " + webSocketSession.getMaxIdleTimeout()); + // make sessions almost "immortal" + webSocketSession.setMaxIdleTimeout(Duration.ofHours(10).toMillis()); Review comment: @martin-g I saw locally disconnection happening after a few millisecond of inactivity. Mind connection will be closed once user navigates away from page. One interesting fact is that specification states that 0 or negative means for ever, but jetty does not accepts negative values (it throws an exception) and 0 seems to be really 0. I will double check. What value would you use here? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17484665#comment-17484665 ] ASF GitHub Bot commented on WICKET-6950: reiern70 commented on a change in pull request #496: URL: https://github.com/apache/wicket/pull/496#discussion_r795654808 ## File path: wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/IWebSocketSession.java ## @@ -0,0 +1,119 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.wicket.protocol.ws.api; + +import java.net.URI; +import java.security.Principal; +import java.util.List; +import java.util.Map; + +/** + * Wicket proxy interface to javax.websocket.Session. + */ +public interface IWebSocketSession +{ + +/** + * See javax.websocket.Session#getProtocolVersion() Review comment: @martin-g Mind I could not use `@link` javadoc thing because` javax.websocket.Session` is not part of the class path and then build fail. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17484660#comment-17484660 ] ASF GitHub Bot commented on WICKET-6950: reiern70 commented on a change in pull request #496: URL: https://github.com/apache/wicket/pull/496#discussion_r795653507 ## File path: wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/IWebSocketProcessor.java ## @@ -16,13 +16,20 @@ */ package org.apache.wicket.protocol.ws.api; +import org.apache.wicket.protocol.http.WebApplication; +import org.apache.wicket.protocol.ws.WebSocketSettings; + /** * Processes web socket messages. * * @since 6.0 */ public interface IWebSocketProcessor { + default void onOpen(IWebSocketSession webSocketSession, final WebApplication application) { Review comment: @martin-g I will. I just wanted to get your opinion on the whole thing and double check if there was another way to do this. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17484657#comment-17484657 ] ASF GitHub Bot commented on WICKET-6950: reiern70 commented on a change in pull request #496: URL: https://github.com/apache/wicket/pull/496#discussion_r795652283 ## File path: wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/WebSocketSettings.java ## @@ -245,6 +246,16 @@ public Executor getSendPayloadExecutor() return sendPayloadExecutor; } + /** +* Allows to configure {@link org.apache.wicket.protocol.ws.api.IWebSocketSession} +* +* @param webSocketSession The {@link org.apache.wicket.protocol.ws.api.IWebSocketSession} +*/ + public void configureSession(IWebSocketSession webSocketSession) Review comment: Yes...you are right. We are somehow "forcing" the settings class to acta as a listener. Thus we might need to introduce a Listener/Configurer that is set in Setting and laster on called. This might be more consistent. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17484478#comment-17484478 ] ASF GitHub Bot commented on WICKET-6950: martin-g commented on a change in pull request #496: URL: https://github.com/apache/wicket/pull/496#discussion_r795267460 ## File path: wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/WicketEndpoint.java ## @@ -43,6 +46,118 @@ */ public class WicketEndpoint extends Endpoint { + private static class JavaxWebSocketSessionWrapper implements IWebSocketSession Review comment: Let's move this class as a non-inner class with package-private visibility. Also its name could be `JavaxWebSocketSession` to be more consistent with the other classes in -javax module. ## File path: wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/IWebSocketProcessor.java ## @@ -16,13 +16,20 @@ */ package org.apache.wicket.protocol.ws.api; +import org.apache.wicket.protocol.http.WebApplication; +import org.apache.wicket.protocol.ws.WebSocketSettings; + /** * Processes web socket messages. * * @since 6.0 */ public interface IWebSocketProcessor { + default void onOpen(IWebSocketSession webSocketSession, final WebApplication application) { Review comment: Please add javadoc ## File path: wicket-examples/src/main/java/org/apache/wicket/examples/websocket/JSR356Application.java ## @@ -59,11 +65,22 @@ public void init() getSharedResources().add(ChartWebSocketResource.NAME, new ChartWebSocketResource()); + final WebSocketSettings webSocketSettings = new WebSocketSettings() { + @Override + public void configureSession(IWebSocketSession webSocketSession) { + LOGGER.info("getMaxIdleTimeout = " + webSocketSession.getMaxIdleTimeout()); + // make sessions almost "immortal" + webSocketSession.setMaxIdleTimeout(Duration.ofHours(10).toMillis()); Review comment: Is this a good idea ? We hosts the examples at https://examples9x.wicket.apache.org/websockets/ ## File path: wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/WebSocketSettings.java ## @@ -245,6 +246,16 @@ public Executor getSendPayloadExecutor() return sendPayloadExecutor; } + /** +* Allows to configure {@link org.apache.wicket.protocol.ws.api.IWebSocketSession} +* +* @param webSocketSession The {@link org.apache.wicket.protocol.ws.api.IWebSocketSession} +*/ + public void configureSession(IWebSocketSession webSocketSession) Review comment: I wonder whether we need more abstractions here. It feels weird a Settings class to `do` something. Usually the Settings classes have setters/getters for the do-ers. E.g. ```java public void setWebSocketSessionConfigurer(IWebSocketSessionConfigurer configurer) { this.webSocketSessionConfigurer = Args.nonNull(configurer, "configurer"); } ``` The default configurer would do nothing in its `#configure()` method. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483893#comment-17483893 ] ASF GitHub Bot commented on WICKET-6950: reiern70 opened a new pull request #496: URL: https://github.com/apache/wicket/pull/496 allow configuring web-sockets sessions when connection is opened -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (WICKET-6950) wicket web-sockets implementation does not allow to configure/access web socket session on onOpen
[ https://issues.apache.org/jira/browse/WICKET-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483887#comment-17483887 ] ASF subversion and git services commented on WICKET-6950: - Commit d0ba4a77fbb3a09f3476b08ede2da77a8dca026c in wicket's branch refs/heads/improvement/reiern70/WICKET-6950 from reiern70 [ https://gitbox.apache.org/repos/asf?p=wicket.git;h=d0ba4a7 ] [WICKET-6950] allow configuring web-sockets sessions when connection is opened > wicket web-sockets implementation does not allow to configure/access web > socket session on onOpen > - > > Key: WICKET-6950 > URL: https://issues.apache.org/jira/browse/WICKET-6950 > Project: Wicket > Issue Type: Improvement >Affects Versions: 10.0.0, 9.7.0 >Reporter: Ernesto Reinaldo Barreiro >Assignee: Ernesto Reinaldo Barreiro >Priority: Major > Fix For: 9.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)