cancel
Showing results for 
Search instead for 
Did you mean: 

Pass session to service task

jolo_
Champ on-the-rise
Champ on-the-rise
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?
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
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.