commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] Created: (DBCP-318) PerUserPoolDataSource.getPooledConnectionAndInfo multi-threading bug
Date Tue, 05 Jan 2010 20:01:54 GMT
PerUserPoolDataSource.getPooledConnectionAndInfo multi-threading bug

                 Key: DBCP-318
             Project: Commons Dbcp
          Issue Type: Bug
            Reporter: Sebb

PerUserPoolDataSource.getPooledConnectionAndInfo(user,pass) has the code:
Object pool = pools.get(key); // (1) pools = instance variable
synchronized(this) {
    if (pool == null) {
        try {
            registerPool(username, password);
            pool = pools.get(key);

The first get() call can return null to multiple threads, so multiple threads can register
the pool.
This allows more than maxActive() connections to be returned.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message