spring-websocket

Zuul with web socket

橙三吉。 提交于 2019-12-18 17:00:20
问题 We currently have a direct Websocket connection that goes to a backend webservice from our UI Application. Now when we are trying to do the same through Zuul(ApiGateway) we are not able to connect to backend service We have gone through below issue that does not solve our problem https://github.com/spring-cloud/spring-cloud-netflix/issues/163 but it gives me an alternative in below link https://jmnarloch.wordpress.com/2015/11/11/spring-cloud-sock-js-stomp-zuul-no-websockets/ I am considering

Zuul with web socket

懵懂的女人 提交于 2019-12-18 17:00:03
问题 We currently have a direct Websocket connection that goes to a backend webservice from our UI Application. Now when we are trying to do the same through Zuul(ApiGateway) we are not able to connect to backend service We have gone through below issue that does not solve our problem https://github.com/spring-cloud/spring-cloud-netflix/issues/163 but it gives me an alternative in below link https://jmnarloch.wordpress.com/2015/11/11/spring-cloud-sock-js-stomp-zuul-no-websockets/ I am considering

javax.servlet.ServletException: Not running on Jetty, JSR-356 support unavailable

余生长醉 提交于 2019-12-18 06:48:31
问题 I am facing a problem while deploying a war on to tomcat instance, Tomcat version details, D:\Kiran\Kiran\Softwares DH\Webservers\apache-tomcat-7.0.63\bin>version.bat Using CATALINA_BASE: "D:\Kiran\Kiran\Softwares DH\Webservers\apache-tomcat-7.0.63" Using CATALINA_HOME: "D:\Kiran\Kiran\Softwares DH\Webservers\apache-tomcat-7.0.63" Using CATALINA_TMPDIR: "D:\Kiran\Kiran\Softwares DH\Webservers\apache-tomcat-7.0.63\temp" Using JRE_HOME: "C:\Program Files\Java\jdk1.7.0_07" Using CLASSPATH: "D:

javax.servlet.ServletException: Not running on Jetty, JSR-356 support unavailable

只愿长相守 提交于 2019-12-18 06:47:50
问题 I am facing a problem while deploying a war on to tomcat instance, Tomcat version details, D:\Kiran\Kiran\Softwares DH\Webservers\apache-tomcat-7.0.63\bin>version.bat Using CATALINA_BASE: "D:\Kiran\Kiran\Softwares DH\Webservers\apache-tomcat-7.0.63" Using CATALINA_HOME: "D:\Kiran\Kiran\Softwares DH\Webservers\apache-tomcat-7.0.63" Using CATALINA_TMPDIR: "D:\Kiran\Kiran\Softwares DH\Webservers\apache-tomcat-7.0.63\temp" Using JRE_HOME: "C:\Program Files\Java\jdk1.7.0_07" Using CLASSPATH: "D:

Stomp over socket using sockjs can't connect with Spring 4 WebSocket

大城市里の小女人 提交于 2019-12-17 19:44:49
问题 Trying to use Spring 4 WebSocket with STOMP over socket using sockjs. And i faced a problem. My configuration: websocket.xml - part of spring context <websocket:message-broker application-destination-prefix="/app"> <websocket:stomp-endpoint path="/ws"> <websocket:sockjs/> </websocket:stomp-endpoint> <websocket:simple-broker prefix="/topic"/> </websocket:message-broker> Controller code: @MessageMapping("/ws") @SendTo("/topic/ws") public AjaxResponse hello() throws Exception { AjaxResponse

WebSocketConfigurer and @Scheduled() are not work well in an application

泪湿孤枕 提交于 2019-12-14 00:31:22
问题 I can either use websocket that configure with WebSocketConfigurer or use @Scheduled() to schedule task without any problem. However, java does not compile when i use both of them. @Scheduled() annotation may crash with org.springframework.web.socket.config.annotation.WebSocketConfigurationSupport$NoOpScheduler.scheduleAtFixedRate() java.lang.IllegalStateException: Unexpected use of scheduler. at org.springframework.web.socket.config.annotation.WebSocketConfigurationSupport$NoOpScheduler

Spring WebSockets - User A with Role X can subscribe to User B with Role X's queue

。_饼干妹妹 提交于 2019-12-13 16:05:32
问题 This is a follow up to This comment about the same issue I've tried messages.simpSubscribeDestMatchers("/subscribe").access("@beanName.check(authent‌​ication,message)") But it gives me an exception Caused by: java.lang.IllegalStateException: Cannot handle (8204) '‌' 15:10:51 [RMI TCP Connection(2)-127.0.0.1] AnnotationConfigWebApplicationContext[WARN] - Exception encountered during context initialization - cancelling refresh attempt org.springframework.beans.factory

Spring Boot WebSocket with embedded ActiveMQ Broker

[亡魂溺海] 提交于 2019-12-13 12:23:09
问题 I tried to change an web application from simple broker to an embedded ActiveMq Broker with stomp using Spring boot 1.5.4 but always getting an error on start up Caused by: java.lang.IllegalArgumentException: No handlers at org.springframework.util.Assert.isTrue(Assert.java:92) ~[spring-core-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.web.socket.messaging.SubProtocolWebSocketHandler.start(SubProtocolWebSocketHandler.java:244) ~[spring-websocket-4.3.9.RELEASE.jar:4.3.9.RELEASE] at

Spring WebSocket is not send queue-suffix after connection

匆匆过客 提交于 2019-12-13 00:42:58
问题 My server side config is here: <websocket:message-broker application-destination-prefix="/chat"> <websocket:stomp-endpoint path="/connect"> <websocket:sockjs/> </websocket:stomp-endpoint> <websocket:simple-broker prefix="/broadcast/"/> </websocket:message-broker> Client side code: var stompClient = null; var socket = new SockJS('/connect'); stompClient = Stomp.over(socket); stompClient.connect('', '', function (frame) { console.log(frame); // Inside frame object queue-suffix not sended var

Can I add request parameter to SockJs constructor so that it can be send to server

对着背影说爱祢 提交于 2019-12-12 13:27:18
问题 I initialize my SockJs URL as var protocols = ['xhr-polling', 'xdr-polling', 'xdr-streaming', 'xhr-streaming']; var options = {protocols_whitelist: protocols, debug: true,server:tets}; _ws = new SockJS(url, null, options); I want to send out a request parameter , for example somesite/sockjs/info?someparam=tets" Is it possible? Documentation of SockJs refers that options is map which can have key value but i am not sure what key to use here. I verified URL at server which SockJs sends over and