Hi Dennis,
Dennis Bekkering wrote:
Hello,
After and while running a stresstest with a tool i get the following error.
My code stops at PersistenceBrokerFactory.defaultPersistenceBroker(). I
know
it is imposible to see what is happening from the trace and that it happens
in apache - commons code but maybe somebody has seen this before and might
know what is going on.
org.apache.ojb.broker.PBFactoryException: Borrow broker from pool failed,
using PBKey org.apache.ojb.broker.PBKey: jcdAlias=oracle, user=myvision,
password=*****
at
org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker
Seems that the PB pool is exhausted. There can be two reasons for this:
1. The maximal number of active PB is reached. See OJB.properties file
entry 'maxActive'
2. Your stress test show a PB leak in your application
If you run stress tests on OJB please make sure that the maximal active
PB instances setting and the maximal active connections setting in
ConnectionFactory (see repository file connection-pool
http://db.apache.org/ojb/docu/guides/repository.html#connection-pool-N10251
) is higher then the concurrent used PB instances by the stress test.
regards,
Armin
(PersistenceBrokerFactoryDefaultImpl.java:120)
at
org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker
(PersistenceBrokerFactoryBaseImpl.java:161)
at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(
PersistenceBrokerFactory.java:75)
at com.myvision.persistance.orm.ojb.OjbDelegate.currentBroker(
OjbDelegate.java:356)
at com.myvision.persistance.orm.ojb.OjbDelegate.getFromCache(
OjbDelegate.java:62)
at com.myvision.business.GenericDelegate.getFromCache(
GenericDelegate.java:277)
at com.myvision.business.GenericDelegate.getSingleTon(
GenericDelegate.java:284)
at com.myvision.business.MyVisionSettingsDelegate.getMyVisionSettings(
MyVisionSettingsDelegate.java:35)
at com.myvision.util.ExceptionUTILS$1.run(ExceptionUTILS.java:30)
Caused by: java.util.NoSuchElementException
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(
GenericKeyedObjectPool.java:758)
at
org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker
(PersistenceBrokerFactoryDefaultImpl.java:101)
Cheers,
Dennis
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]