On Wed, 2003-09-10 at 13:05, Scott M Stark wrote:
> We need a custom comparator to intelligently compare the pool key. The default
> Subject equals is comparing all its sets when all we really need is the
> associated JCA identity/credential I'm guessing. This is in the
> JBossManagedConnectionPool.getConnection(Subject subject, ConnectionRequestInfo
> cri)?
>
Doesn't this depend upon how security is configured?
Perhaps there is someway to make the pooling strategy implementation
more pluggable?
> Can we move these non-private discussions to the dev list?
>
Done
> Adrian Brock wrote:
> > Hi,
> >
> > Using my DataSource.getConnection().close() test
> > I've identified a few points of contention inside
> > the connection manager
> > (not including the semaphore wait on the pool)
> >
> > The biggest point is in the subpool selection code when using
> > a Subject.
> > In pseudo code
> > synchronized(pools)
> > {
> > pool = selectPool(key);
> > if (pool == null)
> > pool = createPool(key);
> > }
> >
> > When "key" contains a Subject my test takes 75 seconds.
> > If I remove the ConfiguredIdentity login it takes 53 seconds.
> >
> > The problem is that Subject.equals()/hashCode() is slow.
> > This is made worse because it is calculated in
> > a synchronized block.
> >
> > Subject is part of the JRE and it is a final class
> > so overriding the implementation is not an option.
> > Something like ConcurrentHashMap doesn't solve the problem
> > because in this case the pools map only contains one
> > entry.
> >
> > Any ideas? Is there a way to optimize Subject.equals()?
> > I'm going to try a Read/Write lock to see how much
> > is the use of the Subject and how much is contention.
> >
> > Regards,
> > Adrian
> >
>
> _______________________________________________
> jboss-group mailing list
> [EMAIL PROTECTED]
> http://mail.jboss.org/mailman/listinfo/jboss-group
--
xxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development