Hi All,

I'm having problems with OJB in an application we are developing. From time to time an exception is thrown by the finalizer thread of the VM:

[org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl] DEBUG:
No operations allowed after connection closed.

at com.mysql.jdbc.Connection.checkClosed(Connection.java:2474)
at com.mysql.jdbc.Connection.createStatement(Connection.java:1179)
at com.mysql.jdbc.Connection.createStatement(Connection.java:1198)
at org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl$ConPoolFactory.validateConnection(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl$ConPoolFactory.validateObject(Unknown Source)
at org.apache.commons.pool.impl.GenericObjectPool.returnObject(GenericObjectPool.java:900)
at org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl.returnConnectionToPool(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.releaseConnection(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.releaseConnection(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.close(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.finalize(Unknown Source)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Unknown Source)
at java.lang.ref.Finalizer.access$100(Unknown Source)
at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)


The PersistenceBroker is released and everything seems to be working ok and the exception is not hurting the application, but I guess it's not right either.

My connection pool is configured as follows,

<connection-pool
  maxActive="21"
  maxIdle="-1"
  maxWait="1000"
  testOnBorrow="true"
  testOnReturn="true"
  validationQuery="SELECT 1"
  whenExhaustedAction="2"
/>

The section about validationQuery="SELECT 1" was added since the pool was returning closed connections.

What am I doing wrong? Thanks in advance,

        Sean C. McCarthy

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



Reply via email to