ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashish Kulkarni <ashish.kulkarn...@gmail.com>
Subject Re: connection link failure issue
Date Fri, 24 Apr 2009 16:00:19 GMT
HiExactly, some thing which will check if the connection is alive, but how
to make ibatis do so?

On Fri, Apr 24, 2009 at 11:52 AM, Chris O'Connell <
oconnell@gorillachicago.com> wrote:

> There are certainly wiser minds here, but it sounds like the database is
> thinking that the connection has been abandoned (because it hasn't been used
> in so long) and so it kills the connection.  A new user comes along and
> grabs a connection out of the pool.  The pool doesn't know that the
> connection is dead so it passes it on to the code and you see that error.
>  At this point, the pool probably realizes that this connection is hosed, so
> it creates a new one and so the next call gets the 'good' connection and
> everything works.
> I would look and see if the pool you are using has some sort of 'ping' that
> you could configure.  It would do something like select the current system
> time or something.  This would just let the database know not to kill the
> connection in the first place.
>
> Good luck.
>
>
> On Fri, Apr 24, 2009 at 10:41 AM, Ashish Kulkarni <
> ashish.kulkarni13@gmail.com> wrote:
>
>> HiThere is no SQL error code in log file, and this is all in intranet so
>> there is no firewall in between.
>> i believe this happens for first transaction in  a day, when no one has
>> used the application for about 10 hours and starting to use it again
>>
>> On Fri, Apr 24, 2009 at 10:42 AM, Mario Ds Briggs <
>> mario.briggs@in.ibm.com> wrote:
>>
>>> What's  SQL ERROR CODE in the exception. You want to look it up the DB2
>>> on
>>> AS400 docs
>>>
>>>
>>>
>>>
>>>             Ashish Kulkarni
>>>             <ashish.kulkarni1
>>>             3@gmail.com>
>>> To
>>>                                       user-java@ibatis.apache.org
>>>             24/04/2009 19:39                                           cc
>>>
>>>                                                                   Subject
>>>             Please respond to         connection link failure issue
>>>             user-java@ibatis.
>>>                apache.org
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Hi
>>> I am having some issue with connection dropping, i am using
>>> ibatis ibatis-2.3.4.726.jar and creating connection to AS400 using JDBC,
>>> but i am seeing these errors in log file, for some reason connection is
>>> getting dropped, what may be the reason, the issue is this a high
>>> availability system and we cannot let any single transaction fell because
>>> of this issue, when we try second time the transaction works, so what
>>> should i do,
>>>
>>> java.sql.SQLException: Communication link failure. (Connection reset)
>>> at com.ibm.as400.access.JDError.throwSQLException(JDError.java:528)
>>> at
>>>
>>> com.ibm.as400.access.AS400JDBCConnection.sendAndReceive(AS400JDBCConnection.java:2668)
>>> at
>>>
>>> com.ibm.as400.access.AS400JDBCConnection.sendAndReceive(AS400JDBCConnection.java:2581)
>>> at
>>>
>>> com.ibm.as400.access.JDTransactionManager.rollback(JDTransactionManager.java:440)
>>> at
>>>
>>> com.ibm.as400.access.AS400JDBCConnection.rollback(AS400JDBCConnection.java:2252)
>>> at
>>>
>>> com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:629)
>>> at
>>>
>>> com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)
>>> at
>>>
>>> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
>>> at
>>>
>>> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
>>> at
>>>
>>> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
>>> at
>>>
>>> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
>>> at
>>>
>>> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
>>> at
>>>
>>> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
>>> at
>>>
>>> com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94)
>>>
>>>
>>
>
>
> --
> --
> Chris O'Connell
> Application Developer
> Gorilla
> 312.243.8777 x19
>
>

Mime
View raw message