Hi;

1. DB2 / AS400
2. Broker

i made a search query that retrieve 5000 records from database DB2/AS400.

i use getIteratorQuery  , look this code please :

1. getting the broker

2. while (result.hasNext()) {  // 5000 records

      obj = result.next()

    }

3. close the broker

i got the error message after a lot of fetch of the cursor :

org.apache.ojb.broker.PersistenceBrokerSQLException: Calling ResultSet.next()
failed
    at org.apache.ojb.broker.accesslayer.RsIterator.hasNext(Unknown Source)
    at com.rmawatanya.convergence.utile.migration.DataValidator.validateData
(DataValidator.java:88)
    at com.rmawatanya.convergence.utile.migration.DataValidator.execute(
DataValidator.java:37)
    at com.rmawatanya.convergence.utile.migration.DataValidator.main(
DataValidator.java:144)
Caused by: java.sql.SQLException: The connection does not exist.
    at com.ibm.as400.access.JDError.throwSQLException(JDError.java:389)
    at com.ibm.as400.access.AS400JDBCConnection.checkOpen(
AS400JDBCConnection.java:394)
    at com.ibm.as400.access.AS400JDBCConnection.sendAndReceive(
AS400JDBCConnection.java:2596)
    at com.ibm.as400.access.JDServerRowCache.fetch(JDServerRowCache.java
:271)
    at com.ibm.as400.access.JDServerRowCache.fetch(JDServerRowCache.java
:203)
    at com.ibm.as400.access.JDServerRowCache.next(JDServerRowCache.java:625)
    at com.ibm.as400.access.AS400JDBCResultSet.next(AS400JDBCResultSet.java
:1751)
    at com.p6spy.engine.spy.P6ResultSet.next(P6ResultSet.java:156)
    at com.p6spy.engine.logging.P6LogResultSet.next(P6LogResultSet.java:124)
    ... 4 more


This situation reproduce each time i relaunch the application ....

My question :
1. this is due of connection timeout from OJB ???
2. we can configure the connection timeout in OJB  ???


Thx in advance

Reply via email to