synchronized Session createSession(User user){
  if (closing) {
    return null;
  }
  if (exclusiveSession != null) {
    throw DbException.get(ErrorCode.DATABASE_IS_IN_EXCLUSIVE_MODE);
  }
  Session session=new Session(this,user,++nextSessionId);
  userSessions.add(session);
  trace.info("connecting session #{0} to {1}",session.getId(),databaseName);
  if (delayedCloser != null) {
    delayedCloser.reset();
    delayedCloser=null;
  }
  return session;
}

synchronized Session createSession ( User user ) { if ( closing ) { return null ; } if ( exclusiveSession != null ) { throw DbException . get ( ErrorCode . DATABASE_IS_IN_EXCLUSIVE_MODE ) ; } Session session = new Session ( this , user , ++ nextSessionId ) ; userSessions . add ( session ) ; trace . info ( "connecting session #{0} to {1}" , session . getId ( ) , databaseName ) ; if ( delayedCloser != null ) { delayedCloser . reset ( ) ; delayedCloser = null ; } return session ; }
create a session for the given user .
