1 package org.simantics.db.common;
3 import org.simantics.db.Session;
4 import org.simantics.db.service.LifecycleSupport;
7 public class SessionThreads {
9 public static boolean isClosed() {
10 Thread current = Thread.currentThread();
11 if(current instanceof SessionThread) {
12 Session session = ((SessionThread)current).getSession();
13 LifecycleSupport ls = session.peekService(LifecycleSupport.class);
14 if(ls != null) return ls.isClosed();