https://bz.apache.org/bugzilla/show_bug.cgi?id=58059
Bug ID: 58059 Summary: Value for @PathParam annotated variable in @OnOpen is not correct Product: Tomcat 8 Version: 8.0.23 Hardware: PC Status: NEW Severity: major Priority: P2 Component: WebSocket Assignee: dev@tomcat.apache.org Reporter: ktmnea...@gmail.com Created attachment 32837 --> https://bz.apache.org/bugzilla/attachment.cgi?id=32837&action=edit Test projects to show @PathParam issues When connecting to a websocket server endpoint in Tomcat 8.0.23, the mechanism for populating a @PathParam annotated variable in the @OnOpen method does not appear to be thread safe. I have set up 2 test projects; one that is a single class container web-application that handles websockets, and a client that connects to said websocket. When multiple requests come in with different path params, the value that is passed on to the @OnOpen annotated method into the @PathParam annotated variable does not match the value that is found in the Session.getPathParameters() collection for the same session. It appears that the @PathParam annotated variable is being overwritten with another connection request's path param. Here is some sample output from the attached "WebsocketPathParamIssueClient" project showing the path param that was sent, what was set in the @PathParam annotated variable, and what is in the Session.getPathParaters() collection: 2015-06-19 15:07:22.460 INFO [Grizzly(2)] [pathParam=DDDDD, sessionId=c880b807-8a9e-4180-9bdb-3bc65e358556] pathParamVariable=BBBBB | pathParamSession=DDDDD 2015-06-19 15:07:22.460 INFO [Grizzly(2)] [pathParam=CCCCC, sessionId=9fa55740-30b5-41ad-8871-dfb553d04dc5] pathParamVariable=CCCCC | pathParamSession=CCCCC 2015-06-19 15:07:22.460 INFO [Grizzly(2)] [pathParam=BBBBB, sessionId=a578cd97-94d7-4d69-9e26-3862d8447a53] pathParamVariable=BBBBB | pathParamSession=BBBBB 2015-06-19 15:07:22.460 INFO [Grizzly(2)] [pathParam=AAAAA, sessionId=2540e0ef-2c8a-456b-9d9e-ee0f1550840d] pathParamVariable=BBBBB | pathParamSession=AAAAA -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org