You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Brandon DuRette <br...@alum.mit.edu> on 2008/04/11 00:55:02 UTC

JNDIRealm connection pooling

While trying to track down an issue with logins taking a very long time, I
just discovered in the 5.5.26 source code/Javadoc for JNDIRealm (likewise in
the 6.0 documentation) that there's a big bold TODO to support connection
pooling in the JNDIRealm.  I think this may be part of the login problem I'm
seeing.

Looking over the current source code, I can see that it's going to require a
fairly extensive refactoring of the JNDIRealm code.  I'm willing to take a
shot at fixing it, but wanted to first check with the list on a couple of
things, mostly matters of process.

   1. I could not find a corresponding case in the bug database in either
   the 5.5 or 6.0 builds.  Since this is an issue in both, should I open it in
   both?  If not, does anyone care which one the issue is filed against?
   2. Likewise, is there a preferred version to contribute patches
   against?  Ideally for me, I would patch 5.5, since that's what we use at
   work, but I'm willing to do either provided the patch ultimately could be
   applied to both versions.
   3. Library dependencies.  The fix, as indicated in the comment,
   requires that the MessageFormat objects for user search and/or user pattern
   be pooled in some manner to make them thread-safe.  My initial thought was
   to use the Apache Commons Pool library for this purpose.   I see it listed
   in the Core Optional Libraries and JNDIRealm is a part of the
   catalina.optional library, but I don't see commons-pool*.jar show up
   anywhere in the package, so I must be missing something.  Any pointers on
   that would be greatly appreciated.  Also, if I'm way off base and should be
   using some other pooling mechanism please let me know.

Thanks in advance for any pointers.

Regards,
Brandon

Re: JNDIRealm connection pooling

Posted by Mark Thomas <ma...@apache.org>.
Brandon DuRette wrote:
>    1. I could not find a corresponding case in the bug database in either
>    the 5.5 or 6.0 builds.  Since this is an issue in both, should I open it in
>    both?  If not, does anyone care which one the issue is filed against?
No really, but if there is a choice 6.0

>    2. Likewise, is there a preferred version to contribute patches
>    against?  Ideally for me, I would patch 5.5, since that's what we use at
>    work, but I'm willing to do either provided the patch ultimately could be
>    applied to both versions.
http://svn.apache.org/repos/asf/tomcat/trunk

>    3. Library dependencies.  The fix, as indicated in the comment,
>    requires that the MessageFormat objects for user search and/or user pattern
>    be pooled in some manner to make them thread-safe.  My initial thought was
>    to use the Apache Commons Pool library for this purpose.   I see it listed
>    in the Core Optional Libraries and JNDIRealm is a part of the
>    catalina.optional library, but I don't see commons-pool*.jar show up
>    anywhere in the package, so I must be missing something.
Commons Pool is package renamed as part of the build process. The classes 
are in tomcat-dbcp.jar If they are going to be re-use elsewhere, we may 
want to reconsider the packaging.

>  Any pointers on
>    that would be greatly appreciated.  Also, if I'm way off base and should be
>    using some other pooling mechanism please let me know.
Seems reasonable to me.

Mark


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