Package org.apache.isis.runtimes.dflt.runtime.system.session

Examples of org.apache.isis.runtimes.dflt.runtime.system.session.IsisSession


        if (bootstrapSession != null) {
            return bootstrapSession;
        }

        final Session session = Session.get();
        final IsisSession isisSession = sessionMap.get(session);
        return isisSession;
    }
View Full Code Here


        // there could be multiple threads using a session.

        final AuthenticatedWebSessionForIsis webSession = (AuthenticatedWebSessionForIsis) Session.get();
        webSession.registerUseByThread();

        IsisSession isisSession = sessionMap.get(webSession);
        if (isisSession == null) {
            isisSession = getSessionFactoryInstance().openSession(authSession);
            // put into map prior to opening, so that subsequent calls to
            // getSessionInstance() will find this new session.
            sessionMap.put(webSession, isisSession);
            isisSession.open();
        }

        return isisSession;
    }
View Full Code Here

    private synchronized void closeSessionOrDeregisterUsageOnExisting() {
        final AuthenticatedWebSessionForIsis webSession = (AuthenticatedWebSessionForIsis) Session.get();
        final boolean shouldClose = webSession.deregisterUseByThread();

        final IsisSession isisSession = sessionMap.get(webSession);
        if (isisSession == null) {
            // nothing to be done
            return;
        }

        if (shouldClose) {
            isisSession.close();
            // remove after closing, so that any calls to getSessionInstance()
            // made while closing will still find this session
            sessionMap.remove(webSession);
        }
View Full Code Here

        getTransactionManager().startTransaction();
    }

    @Override
    protected synchronized void onEndRequest() {
        final IsisSession session = getIsisContext().getSessionInstance();
        if (session != null) {
            // in session
            commitTransactionIfAny();
            getIsisContext().closeSessionInstance();
        }
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.runtime.system.session.IsisSession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.