remm        2002/12/10 05:33:22

  Modified:    catalina/src/share/org/apache/catalina/session
                        ManagerBase.java
  Log:
  - Part of the manager patch wasn't reverted (I don't know if it's a problem or not
    in the real world; just playing it safe).
  
  Revision  Changes    Path
  1.14      +13 -23    
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/ManagerBase.java
  
  Index: ManagerBase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/ManagerBase.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ManagerBase.java  30 Nov 2002 12:43:14 -0000      1.13
  +++ ManagerBase.java  10 Dec 2002 13:33:22 -0000      1.14
  @@ -560,7 +560,18 @@
       public Session createSession() {
   
           // Recycle or create a Session instance
  -        Session session = createEmptySession();
  +        Session session = null;
  +        synchronized (recycled) {
  +            int size = recycled.size();
  +            if (size > 0) {
  +                session = (Session) recycled.get(size - 1);
  +                recycled.remove(size - 1);
  +            }
  +        }
  +        if (session != null)
  +            session.setManager(this);
  +        else
  +            session = new StandardSession(this);
   
           // Initialize the properties of the new session and return it
           session.setNew(true);
  @@ -572,6 +583,7 @@
           // @todo Move appending of jvmRoute generateSessionId()???
           if (jvmRoute != null) {
               sessionId += '.' + jvmRoute;
  +            session.setId(sessionId);
           }
           /*
           synchronized (sessions) {
  @@ -583,28 +595,6 @@
   
           return (session);
   
  -    }
  -
  -
  -    /**
  -     * Get a session from the recycled ones or create a new empty one.
  -     * The PersistentManager manager does not need to create session data
  -     * because it reads it from the Store.
  -     */
  -    public Session createEmptySession() {
  -        Session session = null;
  -        synchronized (recycled) {
  -            int size = recycled.size();
  -            if (size > 0) {
  -                session = (Session) recycled.get(size - 1);
  -                recycled.remove(size - 1);
  -            }
  -        }
  -        if (session != null)
  -            session.setManager(this);
  -        else
  -            session = new StandardSession(this);
  -        return(session);
       }
   
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to