Hi,

I don't know how to get this information. But you could quite easily configure the connection-managers as such that they are automatically closing "forgotten" persistence-broker instances and their connections.

Please see: http://db.apache.org/ojb/docu/guides/connection.html


Rodrigo G. Tavares de Souza wrote:
Hi,

I had had problems with connection pool, cause there are someone broker in the application that I'm not closing, after some access the max number of connections exceed and I get an exception from Tomcat.
Now I'm looking how to monitoring the activity in the pool to find where I've forgotten to close the broker.
If are someone there who know how can I borrow this information from OJB, gonna be a greatest aid. :)


I'm trying to get these informations: getNumActive(), getNumIdle(), getMaxIdle(), getMaxActive(), getMaxWait().

Thanks.
Rodrigo

-----------------------------------------------------
Follow the exception returned by Tomcat
-----------------------------------------------------
java.util.NoSuchElementException
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:803)


at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker(PersistenceBrokerFactoryDefaultImpl.java:99)

at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(PersistenceBrokerFactoryBaseImpl.java:158)

at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(PersistenceBrokerFactory.java:65)

....
Caused by: java.util.NoSuchElementException
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:803)


at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker(PersistenceBrokerFactoryDefaultImpl.java:99)



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



Reply via email to