public HttpSession getSession ( boolean create ) { if ( null != this . mySession ) { if ( this . mySession . isInvalid ( ) ) { this . mySession = null ; } else { return this . mySession ; } } this . mySession = mgr . getSession ( this , create ) ; return this . mySession ; }
Access the current session for this connection . This may return null if one was not found and the create flag was false . If a cached session is found but it reports as invalid then this will look for a new session if the create flag is true .