FYI: The execution code looks like, not that according to the dump it A) ever 
gets here or B) are there any running threads in the pool which should be 
holding the synchronization object:
 
    private static interface SqlMapTemplate
    {
        public void execute(SqlMapClient client) throws SQLException;
    }
 
               executeSqlMapTemplate(new SqlMapTemplate()
                {
                    public void execute(SqlMapClient client) throws SQLException
                    {
                        Map parameters = new HashMap();
                        parameters.put("erightsUserId", new 
Integer(erightsUserId));
                        parameters.put("groupingName", groupName);
                        parameters.put("templateName", templateName);
                        _log.debug("called, uid:" + erightsUserId + ", grp:" + 
groupName + ", template:" + templateName);
                        client.queryWithRowHandler("questionFindByGroup",
                                parameters,
                                new RowHandler()
                                {
                                    public void handleRow(Object rowData)
                                    {
                                        QuestionRow row = (QuestionRow) rowData;
                                        try
                                        {
                                            _log.debug("Row found:" + row);
                                            doc.handleRow(row);
                                        }
                                        catch (IOException e)
                                        {
                                            String message =
                                                    "Unable to write: "
                                                    + e.getClass().getName()
                                                    + " : "
                                                    + e.getMessage();
                                            _log.error(message, e);
                                            throw new RuntimeException(message);
                                        }
                                    }
                                });
                    }
                });

________________________________

From: Adam Gugliciello [mailto:[EMAIL PROTECTED]
Sent: Mon 8/15/05 1:31 PM
To: "<user-java"@ibatis.apache.org
Subject: RE: ThrottledPool hanging


It doesn't actually take a minute to get the connection, it's just a safe and 
reasonable timeout.

________________________________

From: Clinton Begin [mailto:[EMAIL PROTECTED]
Sent: Mon 8/15/05 1:19 PM
To: [email protected]
Subject: Re: FW:



Why does it take a minute to get a connection?  With a connection pool, it 
should literally be milliseconds....

Clinton


On 8/15/05, Adam Gugliciello <[EMAIL PROTECTED]> wrote: 

        Under a heavy sustained load, the sqlmaps ThrottledPool seems to start 
to bind, the the vast majority of them binding up and blocking waiting to build 
a new session, and stay blocked long after the fact, even days after the 
request has been abandoned. Any help would be appreciated, and I am attaching a 
thread dump.
         
        My code looks like:
         
         private void executeSqlMapTemplate(SqlMapTemplate t) throws 
SQLException
            {
                final Connection c =
                        
this._dbPool.borrowConnection("QuestionnaireCustomerApi",
                                1 * 60 * 1000l); // Waits a minute for a 
connection
                if (c == null)
                {
                    throw new IllegalStateException("Unable to retrieve JDBC 
Connection from db pool.");
                }
                try
                {
                    SqlMapSession sess=this.sqlMapClient.openSession(c);
                    t.execute(this.sqlMapClient);
                    sess.close();
         
                }
                finally
                {
         
                    this._dbPool.returnConnection(c);
                }
            }
         



<<winmail.dat>>

Reply via email to