Package org.apache.tomcat

Examples of org.apache.tomcat.Session


  // Save any currently active sessions
  unload();

  // Expire all active sessions
  Session sessions[] = findSessions();
  for (int i = 0; i < sessions.length; i++) {
      StandardSession session = (StandardSession) sessions[i];
      if (!session.isValid())
    continue;
      session.expire();
View Full Code Here


  synchronized (sessions) {
      try {
    Integer count = (Integer) ois.readObject();
    int n = count.intValue();
    for (int i = 0; i < n; i++) {
        Session session = (Session) ois.readObject();
        sessions.put(session.getId(), session);
    }
      } catch (ClassNotFoundException e) {
    if (ois != null) {
        try {
      ois.close();
View Full Code Here

     * Invalidate all sessions that have expired.
     */
    private void processExpires() {

  long timeNow = System.currentTimeMillis();
  Session sessions[] = findSessions();

  for (int i = 0; i < sessions.length; i++) {
      StandardSession session = (StandardSession) sessions[i];
      if (!session.isValid())
    continue;
View Full Code Here

  synchronized (sessions) {
      try {
    oos.writeObject(new Integer(sessions.size()));
    Enumeration elements = sessions.elements();
    while (elements.hasMoreElements()) {
        Session session = (Session) elements.nextElement();
        oos.writeObject(session);
    }
      } catch (IOException e) {
    if (oos != null) {
        try {
View Full Code Here

      Enumeration ids = sessions.keys();
      while (ids.hasMoreElements()) {
    String id = (String) ids.nextElement();
    keys.addElement(id);
      }
      Session results[] = new Session[keys.size()];
      for (int i = 0; i < results.length; i++) {
    String key = (String) keys.elementAt(i);
    results[i] = (Session) sessions.get(key);
      }
      return (results);
View Full Code Here

TOP

Related Classes of org.apache.tomcat.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.