private Session lookupSession(SessionKey key) throws SessionException {
        if (key == null) {
            throw new NullPointerException("SessionKey argument cannot be null.");
        }
        return doGetSession(key);
    }
Template method that allows subclasses to react to a new session being created.
<p/>
This method is invoked <em>before</em> any session listeners are notified.

@param session the session that was just {@link #createSession created}.
@param context the {@link SessionContext SessionContext} that was used to start the session.
core/src/main/java/org/apache/shiro/session/mgt/AbstractNativeSessionManager.java