Package org.apache.axis.session

Examples of org.apache.axis.session.Session


                            int i = sessionIndex++;
                            cooky = "" + i;
                        }

                        // is there a session already?
                        Session session = null;
                        if (sessions.containsKey(cooky)) {
                            session = (Session)sessions.get(cooky);
                        } else {
                            // no session for this cooky, bummer
                            session = new SimpleSession();
View Full Code Here


            // What do we do if serviceName is null at this point???
            if (serviceName == null)
                serviceName = msgContext.getService().toString();

            // look in incoming session
            Session session = msgContext.getSession();
            if (session != null) {
                // This part isn't thread safe...
                synchronized (session) {
                    // store service objects in session, indexed by class name
                    Object obj = session.get(serviceName);
                    if (obj == null) {
                        obj = getNewServiceObject(msgContext, clsName);
                        session.set(serviceName, obj);
                    }
                    return obj;
                }
            } else {
                // was no incoming session, sigh, treat as request scope
                scopeHolder.value = Scope.DEFAULT.getValue();
                return getNewServiceObject(msgContext, clsName);
            }
        } else if (scope == Scope.APPLICATION) {
            // MUST be AxisEngine here!
            AxisEngine engine = msgContext.getAxisEngine();
            Session appSession = engine.getApplicationSession();
            if (appSession != null) {
                // This part isn't thread safe
                synchronized (appSession) {
                    // store service objects in session, indexed by class name
                    Object obj = appSession.get(serviceName);
                    if (obj == null) {
                        obj = getNewServiceObject(msgContext, clsName);
                        appSession.set(serviceName, obj);
                    }
                    return obj;
                }
            } else {
                // was no application session, sigh, treat as request scope
View Full Code Here

        return doSessions;
    }

    protected Session createSession(String cooky) {
        // is there a session already?
        Session session = null;
        if (sessions.containsKey(cooky)) {
            session = (Session) sessions.get(cooky);
        } else {
            // no session for this cooky, bummer
            session = new SimpleSession();
View Full Code Here

        return doThreads ;
    }

    protected Session createSession(String cooky) {
        // is there a session already?
        Session session = null;
        if (sessions.containsKey(cooky)) {
            session = (Session) sessions.get(cooky);
        } else {
            // no session for this cooky, bummer
            session = new SimpleSession();
View Full Code Here

        return doSessions;
    }

    protected Session createSession(String cooky) {
        // is there a session already?
        Session session = null;
        if (sessions.containsKey(cooky)) {
            session = (Session) sessions.get(cooky);
        } else {
            // no session for this cooky, bummer
            session = new SimpleSession();
View Full Code Here

            // What do we do if serviceName is null at this point???
            if (serviceName == null)
                serviceName = msgContext.getService().toString();

            // look in incoming session
            Session session = msgContext.getSession();
            if (session != null) {
                // This part isn't thread safe...
                synchronized (session) {
                    // store service objects in session, indexed by class name
                    Object obj = session.get(serviceName);
                    if (obj == null) {
                        obj = getNewServiceObject(msgContext, clsName);
                        session.set(serviceName, obj);
                    }
                    return obj;
                }
            } else {
                // was no incoming session, sigh, treat as request scope
                scopeHolder.value = Scope.DEFAULT.getValue();
                return getNewServiceObject(msgContext, clsName);
            }
        } else if (scope == Scope.APPLICATION) {
            // MUST be AxisEngine here!
            AxisEngine engine = msgContext.getAxisEngine();
            Session appSession = engine.getApplicationSession();
            if (appSession != null) {
                // This part isn't thread safe
                synchronized (appSession) {
                    // store service objects in session, indexed by class name
                    Object obj = appSession.get(serviceName);
                    if (obj == null) {
                        obj = getNewServiceObject(msgContext, clsName);
                        appSession.set(serviceName, obj);
                    }
                    return obj;
                }
            } else {
                // was no application session, sigh, treat as request scope
View Full Code Here

     */
    protected Session createSession( String cooky )
    {

        // is there a session already?
        Session session = null;
        if ( m_sessions.containsKey( cooky ) )
        {
            session = (Session) m_sessions.get( cooky );
        }
        else
View Full Code Here

     */
    protected Session createSession( String cooky )
    {

        // is there a session already?
        Session session = null;
        if ( m_sessions.containsKey( cooky ) )
        {
            session = (Session) m_sessions.get( cooky );
        }
        else
View Full Code Here

     * This is our service method for testing session data.  Simply
     * increments a session-scoped counter.
     */
    public Integer counter() throws Exception
    {
        Session session = MessageContext.getCurrentContext().getSession();
        if (session == null)
            throw new Exception("No session in MessageContext!");
        Integer count = (Integer)session.get("counter");
        if (count == null) {
            count = new Integer(0);
        }
        count = new Integer(count.intValue() + 1);
        session.set("counter", count);
        return count;
    }
View Full Code Here

            // What do we do if serviceName is null at this point???
            if (serviceName == null)
                serviceName = msgContext.getService().toString();

            // look in incoming session
            Session session = msgContext.getSession();
            if (session != null) {
                return getSessionServiceObject(session, serviceName,
                                               msgContext, clsName);
            } else {
                // was no incoming session, sigh, treat as request scope
                scopeHolder.value = Scope.DEFAULT.getValue();
                return getNewServiceObject(msgContext, clsName);
            }
        } else if (scope == Scope.APPLICATION) {
            // MUST be AxisEngine here!
            AxisEngine engine = msgContext.getAxisEngine();
            Session appSession = engine.getApplicationSession();
            if (appSession != null) {
                return getSessionServiceObject(appSession, serviceName,
                                               msgContext, clsName);
            } else {
                // was no application session - log an error and
View Full Code Here

TOP

Related Classes of org.apache.axis.session.Session

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.