protected Session createExposedSession(Session session, SessionContext context) {
        return new DelegatingSession(this, new DefaultSessionKey(session.getId()));
    }
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