public synchronized void removeSession(Session session){
  if (session != null) {
    if (exclusiveSession == session) {
      exclusiveSession=null;
    }
    userSessions.remove(session);
    if (session != systemSession && session != lobSession) {
      trace.info("disconnecting session #{0}",session.getId());
    }
  }
  if (userSessions.size() == 0 && session != systemSession && session != lobSession) {
    if (closeDelay == 0) {
      close(false);
    }
 else     if (closeDelay < 0) {
      return;
    }
 else {
      delayedCloser=new DatabaseCloser(this,closeDelay * 1000,false);
      delayedCloser.setName("H2 Close Delay " + getShortName());
      delayedCloser.setDaemon(true);
      delayedCloser.start();
    }
  }
  if (session != systemSession && session != lobSession && session != null) {
    trace.info("disconnected session #{0}",session.getId());
  }
}

public synchronized void removeSession ( Session session ) { if ( session != null ) { if ( exclusiveSession == session ) { exclusiveSession = null ; } userSessions . remove ( session ) ; if ( session != systemSession && session != lobSession ) { trace . info ( "disconnecting session #{0}" , session . getId ( ) ) ; } } if ( userSessions . size ( ) == 0 && session != systemSession && session != lobSession ) { if ( closeDelay == 0 ) { close ( false ) ; } else if ( closeDelay < 0 ) { return ; } else { delayedCloser = new DatabaseCloser ( this , closeDelay * 1000 , false ) ; delayedCloser . setName ( "H2 Close Delay " + getShortName ( ) ) ; delayedCloser . setDaemon ( true ) ; delayedCloser . start ( ) ; } } if ( session != systemSession && session != lobSession && session != null ) { trace . info ( "disconnected session #{0}" , session . getId ( ) ) ; } }
remove a session . this method is called after the user has disconnected .
