If you are leaking brokers, that doesn't solve the problem - it just works around it. We had the same problem with our Spring/JTA/OJB application and I discovered the problem was due to using Spring DAOs directly instead of going through the Spring transaction layer.
On 11/8/06, Marwane <[EMAIL PROTECTED]> wrote:
hi; The problem is resolved using : <connection-pool maxActive="1000" whenExhaustedAction="2"/> so it s strange the message gived by ojb tel us about the broker pool problem but the solution was the growing the connection pool !!!!! thx for all. On 10/27/06, Armin Waibel <[EMAIL PROTECTED]> wrote: > > Marwane wrote: > > thx. > > > > if i don't defin the connection-pool clause in the repository.xml what > is > > the default behavor about the > > connection managment in ojb ? > > > > I think by default 30 connections (docs says 21) managed by the pool (if > you specify one of the "pooling" ConnectionFactory implementations in > OJB.properties file). The other properties please see docs > http://db.apache.org/ojb/docu/guides/repository.html#Attributes-N10284 > http://db.apache.org/ojb/docu/guides/connection.html > > regards, > Armin > > > > > > > On 10/27/06, Armin Waibel <[EMAIL PROTECTED]> wrote: > >> > >> Hi, > >> > >> Marwane wrote: > >> > thx for your reply. > >> > so we use only the maxActive declared in OJB.properties. in the > >> > repository.xml we dont use > >> > the connection-pool elements. > >> > > >> > >> Keep in mind that OJB use two different pools by default. An PB-pool > >> (settings in OJB.properties file) and a connection-pool (setting within > >> the connection-pool element in repository file). > >> > >> >> > we use maxActif in 1000 the problem persist. > >> It seems that the error is caused by the broker-pool and not by the > >> connection-pool. Normally the connection is associated with the PB when > >> PB-tx starts or a query is performed - thus always after the PB is > >> requested from the PB-pool. > >> If the suggestions from Eric and Dennis doesn't solve your problem I > >> suppose you have a PB leak in your code. > >> > >> regards, > >> Armin > >> > >> > regards. > >> > > >> > On 10/26/06, Dennis Bekkering <[EMAIL PROTECTED]> wrote: > >> >> > >> >> when i have a quick look it seems to be about the broker pool and > not > >> >> the connection pool. Check your OJB.properties and set maxActive to > >> >> the same value as maxActive of the connection pool settings in > >> >> repository_database.xml. I am not sure about it but your problem > >> >> happened to me once this way and it was solved by doing as i > suggest. > >> >> > >> >> regards, > >> >> Dennis > >> >> > >> >> 2006/10/26, Marwane <[EMAIL PROTECTED]>: > >> >> > hi > >> >> > we have a web application on production used about 500 users. > >> >> > we use default value of ojb parameters (maxActif: 100 ....). > >> >> > we are getting frequently the message indicating that we can't > >> borrow > >> >> > connection from pool. even if > >> >> > we use maxActif in 1000 the problem persist. > >> >> > we need your help and give us some leads. > >> >> > > >> >> > stack trace : > >> >> > > >> >> > org.apache.ojb.broker.PBFactoryException: Borrow broker from pool > >> >> failed, > >> >> > using PBKey org.apache.ojb.broker.PBKey: jcdAlias=default, > >> >> user=db2bmce, > >> >> > password=***** > >> >> > at java.lang.Throwable.<init>(Throwable.java:195) > >> >> > at java.lang.Exception.<init>(Exception.java:41) > >> >> > at java.lang.RuntimeException.<init>(RuntimeException.java:43) > >> >> > at org.apache.commons.lang.exception.NestableRuntimeException > >> >> .<init>( > >> >> > NestableRuntimeException.java:86) > >> >> > at org.apache.ojb.broker.OJBRuntimeException.<init>(Unknown > >> Source) > >> >> > at org.apache.ojb.broker.PBFactoryException.<init>(Unknown > >> Source) > >> >> > 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 > >> >> > > >> >> > >> > ma.co.omnidata.framework.services.dao.ojb.OJBPersistenceService.getBroker( > >> > >> >> > >> >> > OJBPersistenceService.java:156) > >> >> > at > >> >> > > >> >> > >> > ma.co.omnidata.framework.services.dao.ojb.OJBPersistenceService.newSession > >> > >> >> > >> >> ( > >> >> > OJBPersistenceService.java:250) > >> >> > at > >> >> > > >> >> > >> > ma.co.omnidata.framework.services.transaction.impl.TransactionManagerImpl.getTransaction > >> > >> >> > >> >> > (TransactionManagerImpl.java:39) > >> >> > at > >> >> > > >> >> > >> > ma.co.omnidata.framework.services.businessInterface.OMNIFacade.invokeService > >> > >> >> > >> >> > (OMNIFacade.java:55) > >> >> > at > >> >> > > >> >> > >> > ma.co.omnidata.framework.services.ihm.struts.core.OMNIBaseAction.invokeBusiness > >> > >> >> > >> >> > (OMNIBaseAction.java:120) > >> >> > at > >> >> > > >> >> > >> > com.rmawatanya.convergence.application.technique.habilitation.ihm.action.HabLogonAction.doExecute > >> > >> >> > >> >> > (HabLogonAction.java:47) > >> >> > at > >> >> > > >> >> > >> > com.rmawatanya.convergence.application.technique.habilitation.ihm.action.HabLogonAction.execute > >> > >> >> > >> >> > (HabLogonAction.java:35) > >> >> > at > >> org.apache.struts.action.RequestProcessor.processActionPerform > >> ( > >> >> > RequestProcessor.java:421) > >> >> > at org.apache.struts.action.RequestProcessor.process( > >> >> > RequestProcessor.java:226) > >> >> > at > >> >> org.apache.struts.action.ActionServlet.process(ActionServlet.java > >> >> > :1164) > >> >> > at org.apache.struts.action.ActionServlet.doPost( > >> ActionServlet.java > >> >> :415) > >> >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java > :763) > >> >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java > :851) > >> >> > at com.ibm.ws.webcontainer.servlet.ServletWrapper.service( > >> >> > ServletWrapper.java:1246) > >> >> > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest( > >> >> > ServletWrapper.java:380) > >> >> > at > >> >> com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest > >> >> ( > >> >> > CacheServletWrapper.java:80) > >> >> > at com.ibm.ws.webcontainer.WebContainer.handleRequest( > >> >> WebContainer.java > >> >> > :1724) > >> >> > at com.ibm.ws.webcontainer.channel.WCChannelLink.ready( > >> >> > WCChannelLink.java:79) > >> >> > at > >> >> > > >> >> > >> > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination( > >> > >> >> > >> >> > HttpInboundLink.java:422) > >> >> > at > >> >> > > >> >> > >> > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation( > >> > >> >> > >> >> > HttpInboundLink.java:319) > >> >> > at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready( > >> >> > HttpInboundLink.java:288) > >> >> > at > >> >> > > >> >> > >> > com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters > >> > >> >> > >> >> > (NewConnectionInitialReadCallback.java:207) > >> >> > at > >> >> > com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete > >> >> > (NewConnectionInitialReadCallback.java:109) > >> >> > at > com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete( > >> >> > WorkQueueManager.java:537) > >> >> > at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO( > >> >> > WorkQueueManager.java:593) > >> >> > at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun( > >> >> > WorkQueueManager.java:946) > >> >> > at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run( > >> >> > WorkQueueManager.java:1038) > >> >> > at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1446) > >> >> > Caused by: java.util.NoSuchElementException > >> >> > at java.lang.Throwable.<init>(Throwable.java:180) > >> >> > at java.lang.Exception.<init>(Exception.java:29) > >> >> > at java.lang.RuntimeException.<init>(RuntimeException.java:32) > >> >> > at java.util.NoSuchElementException.<init>( > >> >> NoSuchElementException.java > >> >> > :28) > >> >> > at > >> >> org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject( > >> >> > GenericKeyedObjectPool.java:760) > >> >> > ... 31 more > >> >> > [18/10/06 11:59:53:253 TUC] 00000379 SystemErr R > >> >> > org.apache.ojb.broker.PBFactoryException: Borrow broker from pool > >> >> failed, > >> >> > using PBKey org.apache.ojb.broker.PBKey: jcdAlias=default, > >> >> user=db2bmce, > >> >> > password=***** > >> >> > at java.lang.Throwable.<init>(Throwable.java:195) > >> >> > at java.lang.Exception.<init>(Exception.java:41) > >> >> > at java.lang.RuntimeException.<init>(RuntimeException.java:43) > >> >> > at org.apache.commons.lang.exception.NestableRuntimeException > >> >> .<init>( > >> >> > NestableRuntimeException.java:86) > >> >> > at org.apache.ojb.broker.OJBRuntimeException.<init>(Unknown > >> Source) > >> >> > at org.apache.ojb.broker.PBFactoryException.<init>(Unknown > >> Source) > >> >> > 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 > >> >> > > >> >> > >> > ma.co.omnidata.framework.services.dao.ojb.OJBPersistenceService.getBroker( > >> > >> >> > >> >> > OJBPersistenceService.java:156) > >> >> > at > >> >> > > >> >> > >> > ma.co.omnidata.framework.services.dao.ojb.OJBPersistenceService.newSession > >> > >> >> > >> >> ( > >> >> > OJBPersistenceService.java:250) > >> >> > at > >> >> > > >> >> > >> > ma.co.omnidata.framework.services.transaction.impl.TransactionManagerImpl.getTransaction > >> > >> >> > >> >> > (TransactionManagerImpl.java:39) > >> >> > at > >> >> > > >> >> > >> > ma.co.omnidata.framework.services.businessInterface.OMNIFacade.invokeService > >> > >> >> > >> >> > (OMNIFacade.java:55) > >> >> > at > >> >> > > >> >> > >> > ma.co.omnidata.framework.services.ihm.struts.core.OMNIBaseAction.invokeBusiness > >> > >> >> > >> >> > (OMNIBaseAction.java:120) > >> >> > at > >> >> > > >> >> > >> > com.rmawatanya.convergence.application.technique.habilitation.ihm.action.HabLogonAction.doExecute > >> > >> >> > >> >> > (HabLogonAction.java:47) > >> >> > at > >> >> > > >> >> > >> > com.rmawatanya.convergence.application.technique.habilitation.ihm.action.HabLogonAction.execute > >> > >> >> > >> >> > (HabLogonAction.java:35) > >> >> > at > >> org.apache.struts.action.RequestProcessor.processActionPerform > >> ( > >> >> > RequestProcessor.java:421) > >> >> > at org.apache.struts.action.RequestProcessor.process( > >> >> > RequestProcessor.java:226) > >> >> > at > >> >> org.apache.struts.action.ActionServlet.process(ActionServlet.java > >> >> > :1164) > >> >> > at org.apache.struts.action.ActionServlet.doPost( > >> ActionServlet.java > >> >> :415) > >> >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java > :763) > >> >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java > :851) > >> >> > at com.ibm.ws.webcontainer.servlet.ServletWrapper.service( > >> >> > ServletWrapper.java:1246) > >> >> > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest( > >> >> > ServletWrapper.java:380) > >> >> > at > >> >> com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest > >> >> ( > >> >> > CacheServletWrapper.java:80) > >> >> > at com.ibm.ws.webcontainer.WebContainer.handleRequest( > >> >> WebContainer.java > >> >> > :1724) > >> >> > at com.ibm.ws.webcontainer.channel.WCChannelLink.ready( > >> >> > WCChannelLink.java:79) > >> >> > at > >> >> > > >> >> > >> > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination( > >> > >> >> > >> >> > HttpInboundLink.java:422) > >> >> > at > >> >> > > >> >> > >> > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation( > >> > >> >> > >> >> > HttpInboundLink.java:319) > >> >> > at > >> >> com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete > >> >> ( > >> >> > HttpICLReadCallback.java:84) > >> >> > at > com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete( > >> >> > WorkQueueManager.java:537) > >> >> > at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO( > >> >> > WorkQueueManager.java:593) > >> >> > at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun( > >> >> > WorkQueueManager.java:946) > >> >> > at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run( > >> >> > WorkQueueManager.java:1038) > >> >> > at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1446) > >> >> > Caused by: java.util.NoSuchElementException > >> >> > at java.lang.Throwable.<init>(Throwable.java:180) > >> >> > at java.lang.Exception.<init>(Exception.java:29) > >> >> > at java.lang.RuntimeException.<init>(RuntimeException.java:32) > >> >> > at java.util.NoSuchElementException.<init>( > >> >> NoSuchElementException.java > >> >> > :28) > >> >> > at > >> >> org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject( > >> >> > GenericKeyedObjectPool.java:760) > >> >> > ... 29 more > >> >> > [18/10/06 12:00:00:846 TUC] 00000379 SystemErr R > >> >> > org.apache.ojb.broker.PBFactoryException: Borrow broker from pool > >> >> failed, > >> >> > using PBKey org.apache.ojb.broker.PBKey: jcdAlias=default, > >> >> user=db2bmce, > >> >> > password=***** > >> >> > at java.lang.Throwable.<init>(Throwable.java:195) > >> >> > at java.lang.Exception.<init>(Exception.java:41) > >> >> > at java.lang.RuntimeException.<init>(RuntimeException.java:43) > >> >> > at > >> >> > > >> >> > > >> >> > >> >> > >> >> -- > >> >> mvg, > >> >> Dennis > >> >> > >> >> > --------------------------------------------------------------------- > >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> >> For additional commands, e-mail: [EMAIL PROTECTED] > >> >> > >> >> > >> > > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]