Spring provides the OpenEntityManagerInViewFilter to enable lazy loading of objects during the view phase, but what if I would like to use it in a message passing architecture like STOMP over websockets?
If I need to return an entity that has lazy properties in a @MessageMapping method the only way to do it that I know is to manually invoke property getters on the entity before returning it otherwise Jackson will raise an exception while serializing it to JSON.
Are there any more elegant solutions to that generic problem?