You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2004/02/13 10:29:44 UTC

DO NOT REPLY [Bug 26907] New: - Connectionpool's connections always returns same hashcode

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26907>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26907

Connectionpool's connections always returns same hashcode

           Summary: Connectionpool's connections always returns same
                    hashcode
           Product: Tomcat 4
           Version: 4.1.27
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina:Modules
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: niklas@ticnet.se


When we tried to implement a PreparedStatement cache we discovered that the 
hashCode method on a connection always returns the same id. It did so even if 
we got a new connection from the pool.
The prepared statements are cached for each connection and therefore we need a 
unique id for the connection. Usually the method hashCode generates one for us.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org