ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicholoz Koka Kiknadze <kikna...@gmail.com>
Subject Re: SimplePooledConnection Exception
Date Tue, 27 Jan 2009 10:16:37 GMT
Maybe it makes sense to switch to DBCP as it has testOnBorrow setting (needs
a validation query of course) and the DBCP docs saying:

testOnBorrow: The indication of whether objects will be validated before
being borrowed from the pool. If the object fails to validate, it will be
dropped from the pool, and we will attempt to borrow another.


On Tue, Jan 27, 2009 at 3:57 AM, Zsolt Koppany <zkoppanylist@intland.com>wrote:

> Nathan,
>
> we do that.
>
> Zsolt
>
> Nathan Maves schrieb:
>
>> Sounds like you need to use a validation query to ensure your connections
>> are not stale.
>> On Sun, Jan 25, 2009 at 10:06 AM, Zsolt Koppany <zkoppanylist@intland.com<mailto:
>> zkoppanylist@intland.com>> wrote:
>>
>>    Hi,
>>
>>    after getting the Exception below I get lot of database related
>>    Exceptions.
>>
>>    What happens if ibatis finds an invalid connection? Will that be
>>    removed from the pool?
>>
>>    What should the application do to prevent such problems?
>>
>>    We use ibatis 2.3.4.726 with mysql-5.0.67.
>>
>>    Zsolt
>>
>>    2009-01-25 15:32:43,436 ERROR servlet.build.BackgroundBuildTimerTask
>>     - java.lang.RuntimeException: Error accessing
>>    SimplePooledConnection. Connection is invalid.
>>    [DefaultQuartzScheduler_Worker-2]
>>    java.lang.RuntimeException: Error accessing SimplePooledConnection.
>>    Connection is invalid.
>>       at
>>
>>  com.ibatis.common.jdbc.SimpleDataSource$SimplePooledConnection.getValidConnection(SimpleDataSource.java:913)
>>       at
>>
>>  com.ibatis.common.jdbc.SimpleDataSource$SimplePooledConnection.invoke(SimpleDataSource.java:958)
>>       at $Proxy0.rollback(Unknown Source)
>>       at
>>
>>  com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.rollback(JdbcTransaction.java:72)
>>       at
>>
>>  com.ibatis.sqlmap.engine.transaction.TransactionManager.end(TransactionManager.java:87)
>>       at
>>
>>  com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.endTransaction(SqlMapExecutorDelegate.java:734)
>>       at
>>
>>  com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.endTransaction(SqlMapSessionImpl.java:176)
>>       at
>>
>>  com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.endTransaction(SqlMapClientImpl.java:153)
>>       at
>>
>>  com.intland.codebeamer.persistence.util.SqlMapClientWrapper.endTransaction(SqlMapClientWrapper.java:251)
>>
>>    Zsolt
>>
>>
>>

Mime
View raw message