[ https://issues.apache.org/jira/browse/AMQ-5272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15045711#comment-15045711 ]
Neb Bozovic commented on AMQ-5272: ---------------------------------- Hi, I don't think AMQ-5356 resolves this issue. AMQ-5356 appears to be about upgrading the Jetty container used to serve WebSocket endpoints. This issue is related to the fact that, when an ActiveMQ broker is already embedded in a JSR-356 capable container (such as Tomcat), using ActiveMQ's first party WebSocket support requires booting a further embedded instance of Jetty (to serve the WebSocket endpoints), necessarily on a different port than Tomcat (which is serving the rest of the application). This causes severe cross-origin problems on the client side, not to mention being completely unnecessary. It is possible, with only a small amount of glue code, to make ActiveMQ's WebSocket support use the JSR-356 WebSocket environment it is already embedded in, namely Tomcat's. The code to make this possible is attached, we have been using it successfully for the last year and a half. This issue can only be resolved by not requiring Jetty at all when already running within a JSR-356 capable container. Booting an embedded Jetty should only be required, and can only make sense, when ActiveMQ is running standalone. > Implement JSR 356 based WebSocket transport > ------------------------------------------- > > Key: AMQ-5272 > URL: https://issues.apache.org/jira/browse/AMQ-5272 > Project: ActiveMQ > Issue Type: New Feature > Reporter: Neb Bozovic > Priority: Minor > Attachments: StompEndpoint.java, StompTransportServer.java > > > The present WS transport boots up an embedded Jetty instance on its own port, > which does not make sense when embedding ActiveMQ in a container-hosted > application. > Although not that difficult to hack together manually, there should be a > supported first-party mechanism to configure a WS Stomp/MQTT endpoint when > embedded in a JSR 356 compatible container. -- This message was sent by Atlassian JIRA (v6.3.4#6332)