Datanucleus - DBCP2 integration warning - PoolableConnectionFactory not linked to pool
<p>I want to upgrade a GWT-JDO application to use DBCP2 instead of DBCP. The configuration part works pretty well, but I see a warning in the console</p>

<pre><code>WARN [org.apache.commons.dbcp2.PoolingDataSource] PoolableConnectionFactory not linked to pool. Calling setPool() to fix the configuration.
</code></pre>

<p>The PersistenceManagerFactory is build using JDOHelper, so I haven't access to the DBCP2 object in order to set the pool. We are using</p>

<pre><code>JDOHelper.getPersistenceManagerFactory(properties)
</code></pre>

<p>I performed some debugging in the JDO classes and I found that even if the warning is raised, the pool is actually set to the connection factory.
Please find bellow the code from org.apache.commons.dbcp2.PoolingDataSource</p>

<pre><code>// Verify that _pool's factory refers back to it.  If not, log a warning and try to fix.
        if (pcf.getPool() != _pool) {
            log.warn(Utils.getMessage("poolingDataSource.factoryConfig"));
            @SuppressWarnings("unchecked") // PCF must have a pool of PCs
            ObjectPool&lt;PoolableConnection&gt; p = (ObjectPool&lt;PoolableConnection&gt;) _pool;
            pcf.setPool(p);
        }
</code></pre>

<p>Do someone know a way to properly handle the JDO-Datanucleus-DBCP2 configuration using JDOHelper?</p>