I think this is not a bug in the documentation but a bug in the code.
The pooling properties should indeed start with pool.*
Can you open an issue for this?
Christian
On 14.09.2016 16:01, Oliver Marienfeld wrote:
Hi folks,
the official documentation about "Pooling and XA support for
DataSourceFactory
<https://ops4j1.jira.com/wiki/display/PAXJDBC/Pooling+and+XA+support+for+DataSourceFactory>"
is a bit misleading! It says,
/In addition you can also set pooling properties that start
with "pool.". These will be forwarded to the pooling library./
In fact, the properties are not forwarded because the class
org.ops4j.pax.jdbc.config.impl.DataSourceRegistration will have
removed those:
|
publicclassDataSourceRegistrationimplementsCloseable{
staticfinalStringDATASOURCE_TYPE ="dataSourceType";
staticfinalStringJNDI_SERVICE_NAME ="osgi.jndi.service.name";
// By default all local keys (without a dot) are forwarded to the
DataSourceFactory.
// These config keys will explicitly not be forwarded to the
DataSourceFactory
// (even though they are "local" keys without a dot ".")
privatestaticfinalSet<String>NOT_FORWARDED_KEYS
=newHashSet<String>(Arrays.asList(newString[]{
DataSourceFactory.JDBC_DATASOURCE_NAME,
DATASOURCE_TYPE
}));
// additionally all keys prefixed with "jdbc." will be forwarded
(with the prefix stripped).
privatestaticfinalStringCONFIG_KEY_PREFIX ="jdbc.";
...
}
|
But as you can see in the code above, all properties prepended with
"jdbc." will be forwarded to the DataSourceFactory and the "jdbc."
part will be stripped.
So, the documentation should point out that all properties meant to be
forwarded to DBCP2 should have the prefix "jdbc.pool.", not "pool.".
That could save people a lot of time (I wasted 2 days) and make using
pax-jbdc fun again. :-)
Kind regards
Oliver Marienfeld
--
--
------------------
OPS4J - http://www.ops4j.org - [email protected]
---
You received this message because you are subscribed to the Google
Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com
--
--
------------------
OPS4J - http://www.ops4j.org - [email protected]
---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.