pax-jdbc dbcp2 pooling

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

pax-jdbc dbcp2 pooling

dpravin
Hello,

We leverage pax-jdbc for managing the database connection pools. We are
still on 0.10.0 version of the pax-jdbc. My understanding was any updates to
the connection pooling properties will restart/refresh the connection pool
as well restart all the bundles that refer to the pax-jdbc osgi data source
service. However we observed that the bundle using the connection were not
getting restarted and kept on trying to use the stale data source reference
to get the connection. After manual restart of the bundle it worked fine.

Is this the expected behavior?

Thanks,
Pravin


...............Error for your refernce ......................

java.sql.SQLException: Unable to acquire a new connection from the pool
        at
org.apache.commons.dbcp2.managed.ManagedConnection.updateTransactionStatus(ManagedConnection.java:130)[657:org.apache.commons.dbcp2:2.1.0]
        at
org.apache.commons.dbcp2.managed.ManagedConnection.<init>(ManagedConnection.java:60)[657:org.apache.commons.dbcp2:2.1.0]
        at
org.apache.commons.dbcp2.managed.ManagedDataSource.getConnection(ManagedDataSource.java:82)[657:org.apache.commons.dbcp2:2.1.0]
        at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:344)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at
org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:60)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:171)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at
org.apache.camel.processor.Pipeline.process(Pipeline.java:121)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at
org.apache.camel.processor.Pipeline.process(Pipeline.java:83)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at
org.apache.camel.spring.spi.TransactionErrorHandler.processByErrorHandler(TransactionErrorHandler.java:220)[238:org.apache.camel.camel-spring:2.17.0.redhat-630187]
        at
org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:101)[238:org.apache.camel.camel-spring:2.17.0.redhat-630187]
        at
org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:114)[238:org.apache.camel.camel-spring:2.17.0.redhat-630187]
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at
org.apache.camel.spring.spi.TransactionErrorHandler.processByErrorHandler(TransactionErrorHandler.java:220)[238:org.apache.camel.camel-spring:2.17.0.redhat-630187]
        at
org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:183)[238:org.apache.camel.camel-spring:2.17.0.redhat-630187]
        at
org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)[237:org.apache.servicemix.bundles.spring-tx:3.2.16.RELEASE_1]
        at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)[237:org.apache.servicemix.bundles.spring-tx:3.2.16.RELEASE_1]
        at
org.apache.camel.spring.spi.TransactionErrorHandler.doInTransactionTemplate(TransactionErrorHandler.java:176)[238:org.apache.camel.camel-spring:2.17.0.redhat-630187]
        at
org.apache.camel.spring.spi.TransactionErrorHandler.processInTransaction(TransactionErrorHandler.java:136)[238:org.apache.camel.camel-spring:2.17.0.redhat-630187]
        at
org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:105)[238:org.apache.camel.camel-spring:2.17.0.redhat-630187]
        at
org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:114)[238:org.apache.camel.camel-spring:2.17.0.redhat-630187]
        at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at
org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:192)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at
org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:76)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
        at java.util.TimerThread.mainLoop(Timer.java:555)[:1.8.0_66]
        at java.util.TimerThread.run(Timer.java:505)[:1.8.0_66]
Caused by: java.lang.IllegalStateException: Pool not open
        at
org.apache.commons.pool2.impl.BaseGenericObjectPool.assertOpen(BaseGenericObjectPool.java:672)[656:org.apache.commons.pool2:2.4.1]
        at
org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:412)[656:org.apache.commons.pool2:2.4.1]
        at
org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363)[656:org.apache.commons.pool2:2.4.1]
        at
org.apache.commons.dbcp2.managed.ManagedConnection.updateTransactionStatus(ManagedConnection.java:127)[657:org.apache.commons.dbcp2:2.1.0]
        ... 33 more




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html