I need to notify clients from my service tasks. So I need to pass org.eclipse.jetty.websocket.common.events.WebSocketSession to service task. But it is non-serializable. How can I pass it to service task?
Either use a static in your code that gives access to the session or a thread-local, which is set/cleared in your request-method. Another way is to use a bean (see userguide, processEngineConfiguration <beans>) that exposes this thread-local value.