I'm using OJB 1.0, under jboss with DB2.

When I stop and start my DB server while my app is running, the connection 
pool never seems to recover.

My connection is configured thus:

<jdbc-connection-descriptor
    jcd-alias="motov8"
    default-connection="true"
    platform="Db2"
    jdbc-level="2.0"
    driver="COM.ibm.db2.jdbc.app.DB2Driver"
    protocol="jdbc"
    subprotocol="db2"
    dbalias="MOTOV8"
    username="db2admin"
    password="db2admin"
    useAutoCommit="0"
    >
 
      <connection-pool
                testOnBorrow="true"
                testOnReturn="true"
                testWhileIdle="true"
                maxActive="10"
                maxIdle="10"
                maxWait="3000"
                whenExhaustedAction="1"
                validationQuery="select count(*) from gsf002user"
                timeBetweenEvictionRunsMillis="1000"
                numTestsPerEvictionRun="10"
          />
</jdbc-connection-descriptor>

And the exception I get trying to get a connection from the pool is:
08:55:10,217 INFO  [STDOUT] java.util.NoSuchElementException
        at 
org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:758)
        at 
org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker(Unknown
 
Source)
        at 
org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(Unknown
 
Source)
        at 
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown 
Source)
        at 
IDSGS01.businessobjects.GSGConnectionPoolOJB.ojbGetConnection(GSGConnectionPoolOJB.java:72)
        at 
IDSGS01.businessobjects.GSGConnectionPoolOJB.getConnection(GSGConnectionPoolOJB.java:40)
        at 
IDSGS01.businessprocesses.GSSJJobSchedule.execute(GSSJJobSchedule.java:74)
        at au.com.ids.base.scheduler.TaskItem.run(TaskItem.java:357)
        at java.util.TimerThread.mainLoop(Timer.java:432)
        at java.util.TimerThread.run(Timer.java:382)

Thanks for any ideas,

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to