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?
I fixed this issue by my self: I just had to rename my entity manager factory to entityManagerFactory... Thats it.