Questions tagged [spring-websocket]

A Spring Framework module that support WebSocket-style messaging in web applications (native websocket and with SockJS support), including use of STOMP as an application level WebSocket sub-protocol.

This implementation supports the websocket protocol (RFC6455) and the Java websocket API (JSR-356), with fallback options using SockJS.

See:

1417 questions
0
votes
1 answer

No such method issue with websockets and spring 4 and tomcat 7

Hi im getting the following issue with websockets and spring 4 and tomcat 7. I deployed the application on tomcat and when i try to get the websocket to work i get the following error. Anyone got any ideas as to where my conflict is, i know its a…
user1555190
  • 2,803
  • 8
  • 47
  • 80
0
votes
1 answer

Return raw strings from @SubscribeMapping with STOMP/WebSockets/Spring

I've got a Spring-MVC controller using STOMP over websockets. Everything works fine apart from the String received in my STOMP JavaScript client upon subscription has been escaped, presumably by Spring. All the examples I can find on the web and in…
Adam
  • 35,919
  • 9
  • 100
  • 137
0
votes
1 answer

Remove dependency on Jackson

In Spring-MVC you have the ability to remove the Jackson library as a dependency and replace it with your own using this method: protected void configureMessageConverters(List> converters) I am trying to do the same thing…
Cheetah
  • 13,785
  • 31
  • 106
  • 190
0
votes
1 answer

How to send a STOMP message with Spring4 when controller is mapped

I have the following code... @Controller @RequestMapping("/stomp/**") public class StompController { @MessageMapping("/hello") @SendTo("/topic/greet") public Greeting greet(HelloMessage message) throws Exception{ …
Jackie
  • 21,969
  • 32
  • 147
  • 289
0
votes
1 answer

Providing a web app with real-time updates for domain entities from a Spring backend

On the server side, I use Spring 4. On the browser side, I use Ember.js. My application has entity classes such as Person and Product. These entities are in use both on the server and browser, and are modeled identically. For example: //this is on…
0
votes
1 answer

Junit and spring websockets - after each test I get a weird exception

I am getting the following exception when my jUnit test is ending: 7 May 2014 18:06:29 INFO GenericApplicationContext - Closing org.springframework.context.support.GenericApplicationContext@7b0133c2: startup date [Tue May 27 18:06:09 IDT…
Urbanleg
  • 6,252
  • 16
  • 76
  • 139
0
votes
1 answer

Spring 4 WebSockets subscribe to a topic

Is it possible to map a method in a spring managed bean to a topic subscription using spring messaging? I've looked at the examples here: http://assets.spring.io/wp/WebSocketBlogPost.html including the example stock application but it looks like…
Michael Nelson
  • 525
  • 1
  • 4
  • 9
0
votes
1 answer

Spring WebSockets exception when using Spring 4.0.3.RELEASE

I have the following web socket configuration @Configuration @EnableWebSocketMessageBroker public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer { private static final long heartbeatTime = 60000L; // 1 minute …
Saurabh Kumar
  • 16,353
  • 49
  • 133
  • 212
0
votes
1 answer

Spring 4 websocket not closing on application shutdown

So this is a strange one. I have a basic Spring 4 websockets application running on Glassfish 4 using RabbitMQ for the message broker, nothing fancy. I was testing the durability of the websocket clients (one in java and one in javascript using…
agaddie
  • 51
  • 3
0
votes
2 answers

Setting message size for spring sockjs websocket server

I have used spring sockjs server implementation for websockets. It supports messages upto 2kb but above that the websocket connection breaks -gives an 1006 error. If I reduce the message size, then it runs ok. I went through the docs as well as…
cpandey05
  • 1,241
  • 2
  • 17
  • 30
-1
votes
0 answers

Spring WebSocket - multitenancy

I have multitenant Spring Boot application with REST endpoints. Currently I have implemented AbstractDataSource interface for mutlitenant configuration based on tenant-id from request header. public class TenantAwareRoutingDataSource extends…
-1
votes
1 answer

Inconsistent order of database insertions in Spring boot application using JPA

I'm experiencing an issue with the order of database insertions in my Spring application. I have a service method annotated with @Transactional to ensure atomicity and consistency. However, sometimes the order of insertions is inconsistent, and…
ilyasDev
  • 47
  • 3
-1
votes
1 answer

CORS bloks request from another port even though setAllowedOrigins is set: STOMP over WebSocket

I struggle with connecting my client (or through Postman) to websocket server: if got 404 response when I try to connect and following prompts in console: Access to XMLHttpRequest at 'http://localhost:8080/ws-endpoint/info?t=1670410538045' from…
BJagger
  • 181
  • 10
-1
votes
1 answer

Spring webflux websocket - Multiple rooms chat

I am currently building a chat application with spring reactive. Each user can be part of multiple chat rooms. I am trying to only send each chat message to clients connected to the corresponding rooms. For example, if a user sends a message in the…
Jots
  • 19
  • 4
-1
votes
1 answer

Spring websocket jwt authentication

I need to add jwt authentication. I have jwt generate and validate class. I don't know how to add it in websocket. I think spring must check jwt token at the begining of the connection Serverendpoint class @Component @ServerEndpoint(value = "/user",…
1 2 3
94
95