You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Glenn Olander <gl...@greenoak.com> on 2003/01/01 02:17:41 UTC

Re: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session ManagerBase.java

fyi, this still isn't correct.  If you can simply copy/paste the code
from these messages I'm sending, that should ensure the correct code 
gets checked in. Here is
what it should look like:


        String sessionId = generateSessionId();
        String jvmRoute = getJvmRoute();
        // @todo Move appending of jvmRoute generateSessionId()???
        if (jvmRoute != null) {
            sessionId += '.' + jvmRoute;
        }  
        synchronized (sessions) {
            while (sessions.get(sessionId) != null){        // Guarantee 
uniqueness
                log("Found duplicate session id, getting a new one.");
                sessionId = generateSessionId();
                if (jvmRoute != null) {
                    sessionId += '.' + jvmRoute;
                }
            }
            session.setId(sessionId);
        }
        return (session);



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>