Question

I found out, that spring does not create a transaction for websocket requests that are going to a action annotated with @MessageMapping. Even if i annotate the action as @Transactional nothing happens.

I also tried the way with an action that is @RequestMapping annotated. This works as usual.

Has someone an idea how i can make this work? How to make an websocket request transactional?

Was it helpful?

Solution 2

I fixed this issue by my self: I just had to rename my entity manager factory to entityManagerFactory... Thats it.

OTHER TIPS

You shoould show your code, because it really works, unless you have some async internal logic, which doesn fit for single-threaded transactional boundries.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top