Examples of SimpleSession


Examples of org.apache.axis.session.SimpleSession

     * @return the new session's ID for later lookup.
     */
    private synchronized Long getNewSession()
    {
        Long id = SessionUtils.generateSession();
        SimpleSession session = new SimpleSession();
        session.setTimeout(defaultSessionTimeout);
        activeSessions.put(id, session);
        return id;
    }
View Full Code Here

Examples of org.apache.axis.session.SimpleSession

                        Session session = null;
                        if (sessions.containsKey(cooky)) {
                            session = (Session)sessions.get(cooky);
                        } else {
                            // no session for this cooky, bummer
                            session = new SimpleSession();
                           
                            // ADD CLEANUP LOGIC HERE if needed
                            sessions.put(cooky, session);
                        }
                       
View Full Code Here

Examples of org.apache.axis.session.SimpleSession

        Session session = null;
        if (sessions.containsKey(cooky)) {
            session = (Session) sessions.get(cooky);
        } else {
            // no session for this cooky, bummer
            session = new SimpleSession();

            // ADD CLEANUP LOGIC HERE if needed
            sessions.put(cooky, session);
        }
        return session;
View Full Code Here

Examples of org.apache.axis.session.SimpleSession

            Object key;
            Iterator i;
            for (i = entries.iterator(); i.hasNext();) {
                Map.Entry entry = (Map.Entry) i.next();
                key = entry.getKey();
                SimpleSession session = (SimpleSession) entry.getValue();
                if ((curTime - session.getLastAccessTime()) >
                     (session.getTimeout() * 1000)) {
                    log.debug(JavaUtils.getMessage("timeout00",
                                                        key.toString()));

                    // Don't modify the hashtable while we're iterating.
                    victims.add(key);
                }
            }

            // Now go remove all the victims we found during the iteration.
            for (i = victims.iterator(); i.hasNext();) {
                key = i.next();
                SimpleSession session = (SimpleSession)activeSessions.get(key);
                activeSessions.remove(key);

                // For each victim, swing through the data looking for
                // ServiceLifecycle objects, and calling destroy() on them.
                // FIXME : This cleanup should probably happen on another
                //         thread, as it might take a little while.
                Enumeration keys = session.getKeys();
                while (keys != null && keys.hasMoreElements()) {
                    String keystr = (String)keys.nextElement();
                    Object obj = session.get(keystr);
                    if (obj != null && obj instanceof ServiceLifecycle) {
                        ((ServiceLifecycle)obj).destroy();
                    }
                }
            }
View Full Code Here

Examples of org.apache.axis.session.SimpleSession

                }
            } else {
                id = getNewSession();
            }
           
            SimpleSession session = (SimpleSession)activeSessions.get(id);
            if (session == null) {
                // Must have timed out, get a new one.
                id = getNewSession();
                session = (SimpleSession)activeSessions.get(id);
            }

            // This session is still active...
            session.touch();
           
            // Store it away in the MessageContext.
            context.setSession(session);
            context.setProperty(SESSION_ID, id);
        }
View Full Code Here

Examples of org.apache.axis.session.SimpleSession

     * @return the new session's ID for later lookup.
     */
    private synchronized Long getNewSession()
    {
        Long id = new Long(curSessionID++);
        SimpleSession session = new SimpleSession();
        session.setTimeout(defaultSessionTimeout);
        activeSessions.put(id, session);
        return id;
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.authentication.standard.SimpleSession

        }
        return registeredUsers;
    }

    private SimpleSession createSimpleSession(final String userName, final List<String> roles) {
        return new SimpleSession(userName, roles.toArray(new String[roles.size()]));
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.authentication.standard.SimpleSession

                ignoring(mockContainer);
            }
        });

        sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockSpecificationLoader, mockTemplateImageLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, mockContainer, servicesList, oidMarshaller);
        authSession = new SimpleSession("tester", Collections.<String>emptyList());
       
        IsisContext.setConfiguration(configuration);
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.authentication.standard.SimpleSession

                ignoring(mockContainer);
            }
        });

        sessionFactory = new IsisSessionFactoryDefault(DeploymentType.UNIT_TESTING, configuration, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockPersistenceSessionFactory, servicesList, oidMarshaller);
        authSession = new SimpleSession("tester", Collections.<String>emptyList());
       
        IsisContext.setConfiguration(configuration);
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.authentication.standard.SimpleSession

        }
        return registeredUsers;
    }

    private SimpleSession createSimpleSession(final String userName, final List<String> roles) {
        return new SimpleSession(userName, roles.toArray(new String[roles.size()]));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.