Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] readerPoolCapacity/writerPoolCapacity = 0 ok?
[CDO] readerPoolCapacity/writerPoolCapacity = 0 ok? [message #1794634] Tue, 04 September 2018 09:14 Go to next message
Linuxhippy Mising name is currently offline Linuxhippy Mising nameFriend
Messages: 52
Registered: July 2009

We use CDO with a JDBC store as part of a larger application, which also performs "traditional" JDBC database access.
Currently an application-wide connection pool is used and CDOs internal pooling is actually considered harmful in this scenario by our admins.

I wonder - are there any downsides / issues to expect when setting reader- and writerPoolCapacity to 0 when the DataSource is backed by a connection pool anyway?

The reason I ask is because when setting the internal pool capacities to 0, I see the following Exceptions in the application logs:

java.lang.InterruptedException: null
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly( ~[na:1.8.0_121]
at java.util.concurrent.Semaphore.acquire( ~[na:1.8.0_121]
at org.eclipse.net4j.util.lifecycle.Lifecycle.lock( ~[na:na]
at org.eclipse.net4j.util.lifecycle.Lifecycle.internalDeactivate( ~[na:na]
at org.eclipse.net4j.util.lifecycle.Lifecycle.deactivate( ~[na:na]
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate( ~[na:na]
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate( ~[na:na]
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate( ~[na:na]
at org.eclipse.emf.cdo.spi.server.StoreAccessorPool.disposeStoreAccessor( ~[na:na]
at org.eclipse.emf.cdo.spi.server.StoreAccessorPool.addStoreAccessor( ~[na:na]
at org.eclipse.emf.cdo.spi.server.Store.releaseAccessor( ~[na:na]
at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.release( ~[na:na]
at org.eclipse.emf.cdo.server.StoreThreadLocal.release( ~[na:na]
at org.eclipse.emf.cdo.internal.server.QueryManager$ ~[na:na]
at java.util.concurrent.Executors$ ~[na:1.8.0_121]
at ~[na:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker( ~[na:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$ ~[na:1.8.0_121]
at ~[na:1.8.0_121]

followed by the connection pool, complaining connections have leaked:
WARNUNG: Connection leak detection triggered for oracle.jdbc.driver.T4CConnection@63e6ab40, stack trace follows
java.lang.Exception: Apparent connection leak detected
at org.eclipse.net4j.internal.db.DataSourceConnectionProvider.getConnection(
at org.eclipse.net4j.internal.db.DBDatabase.getConnection(
at org.eclipse.net4j.internal.db.DBDatabase.getConnection(
at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.doActivate(
at org.eclipse.net4j.util.lifecycle.Lifecycle.internalActivate(
at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(
at org.eclipse.emf.cdo.spi.server.Store.getReader(
at org.eclipse.emf.cdo.server.internal.db.DBStore.getReader(
at org.eclipse.emf.cdo.server.internal.db.DBStore.getReader(
at org.eclipse.emf.cdo.server.StoreThreadLocal.getAccessor(
at org.eclipse.emf.cdo.internal.server.Repository.getQueryHandler(
at org.eclipse.emf.cdo.internal.server.QueryManager$
at java.util.concurrent.Executors$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$

Thank you in advance, Clemens

Just to be curious - is there any technical reason behind using separate reader/writer connection pools?

[Updated on: Tue, 04 September 2018 10:01]

Report message to a moderator

Re: [CDO] readerPoolCapacity/writerPoolCapacity = 0 ok? [message #1796799 is a reply to message #1794634] Fri, 19 October 2018 05:29 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6498
Registered: July 2009
Senior Member
The CDO tests seem to run successfully with pool capacities set to zero, and even with pools set to null. You'd likely not profit from CDOs statement caches without CDOs pools. The test suite seems to be ~3% slower then. Just to be curious - what harm are your admins expecting when you use CDOs internal pooling?

I don't recall the reason for separate reader/writer connection pools anymore. They're likely a historical relict.

Previous Topic:CDO failover configuration
Next Topic:[CDO] Do EMF Transaction ResourceSetListeners also work with CDO?
Goto Forum:

Current Time: Thu Jun 04 20:57:23 GMT 2020

Powered by FUDForum. Page generated in 0.01967 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top