Package org.apache.isis.viewer.wicket.viewer.integration.wicket

Examples of org.apache.isis.viewer.wicket.viewer.integration.wicket.AuthenticatedWebSessionForIsis


                // stub everything else out
                ignoring(stubRequest);
            }
        });

        new AuthenticatedWebSessionForIsis(stubRequest);
    }
View Full Code Here


        new AuthenticatedWebSessionForIsis(stubRequest);
    }

    @Test(expected = IllegalArgumentException.class)
    public void requestMustBeProvided() {
        new AuthenticatedWebSessionForIsis(null);
    }
View Full Code Here

            {
                one(mockAuthMgr).authenticate(with(any(AuthenticationRequest.class)));
            }
        });

        webSession = new AuthenticatedWebSessionForIsis(stubRequest) {
            private static final long serialVersionUID = 1L;

            @Override
            protected AuthenticationManager getAuthenticationManager() {
                return mockAuthMgr;
View Full Code Here

                // stub everything else out
                ignoring(stubRequest);
            }
        });

        webSession = new AuthenticatedWebSessionForIsis(stubRequest);
    }
View Full Code Here

            {
                one(mockAuthMgr).authenticate(with(any(AuthenticationRequest.class)));
            }
        });

        webSession = new AuthenticatedWebSessionForIsis(stubRequest) {
            private static final long serialVersionUID = 1L;

            @Override
            protected AuthenticationManager getAuthenticationManager() {
                return mockAuthMgr;
View Full Code Here

            {
                one(mockAuthMgr).authenticate(with(any(AuthenticationRequest.class)));
                will(returnValue(null));
            }
        });
        webSession = new AuthenticatedWebSessionForIsis(stubRequest) {
            private static final long serialVersionUID = 1L;

            @Override
            protected AuthenticationManager getAuthenticationManager() {
                return mockAuthMgr;
View Full Code Here

    private synchronized IsisSession openSessionOrRegisterUsageOnExisting(final AuthenticationSession authSession) {
        // we don't apply any session close policy 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
View Full Code Here

        // otherwise, regular processing
        closeSessionOrDeregisterUsageOnExisting();
    }

    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;
View Full Code Here

    private synchronized IsisSession openSessionOrRegisterUsageOnExisting(final AuthenticationSession authSession) {
        // we don't apply any session close policy 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
View Full Code Here

        // otherwise, regular processing
        closeSessionOrDeregisterUsageOnExisting();
    }

    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;
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.wicket.viewer.integration.wicket.AuthenticatedWebSessionForIsis

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.