Package org.apache.cocoon.webapps.session

Examples of org.apache.cocoon.webapps.session.ContextManager


        UserHandler handler = this.getUserHandler( handlerName );
        // we don't throw an exception if we are already logged out!
        if ( handler != null ) {
            List applicationContexts = handler.getApplicationContexts();
            if ( applicationContexts != null ) {
                ContextManager contextManager = null;

                try {
                    contextManager = (ContextManager)this.manager.lookup(ContextManager.ROLE);

                    Iterator i = applicationContexts.iterator();
                    while ( i.hasNext() ) {
                        final String current = (String)i.next();
                        contextManager.deleteContext( current );
                    }
                } catch (ServiceException ce) {
                    throw new ProcessingException("Unable to create session context.", ce);
                } finally {
                    this.manager.release( (Component)contextManager);
View Full Code Here


        UserHandler handler = state.getHandler();
       
        SessionContext context = null;

        if ( handler != null ) {
            ContextManager contextManager = null;
            try {
                contextManager = (ContextManager)this.manager.lookup(ContextManager.ROLE);
                // create new context
                context = contextManager.createContext(name, loadURI, saveURI);
                handler.addApplicationContext( name );

            } catch (ServiceException ce) {
                throw new ProcessingException("Unable to create session context.", ce);
            } catch (IOException ioe) {
View Full Code Here

    /**
     * Get the context
     */
    private SessionContext getContext(String name)
    throws ProcessingException {
        ContextManager contextManager = null;
        try {
            contextManager = (ContextManager) this.manager.lookup(ContextManager.ROLE);
            return contextManager.getContext( name );
        } catch (ComponentException ce ) {
            throw new ProcessingException("Unable to lookup context manager.", ce);
        } finally {
            this.manager.release( (Component) contextManager);
        }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.webapps.session.ContextManager

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.