You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Rodrigo G. Tavares de Souza" <rs...@computeasy.com.br> on 2004/10/19 19:15:45 UTC
How to monitoring connecton pool?
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: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: How to monitoring connecton pool?
Posted by Tino Schöllhorn <t....@plattform-gmbh.de>.
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: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org