mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-27 14:30:16 +00:00
HHH-8302 init c3p0 initialPoolSize with minPoolSize
Adding C3P0_STYLE_INITIAL_POOL_SIZE directly to c3props doesn't work because of prefix "c3p0." Using setOverwriteProperty checks for the nullability of the value and removes this prefix Conflicts: hibernate-c3p0/src/main/java/org/hibernate/c3p0/internal/C3P0ConnectionProvider.java
This commit is contained in:
parent
08a32f745f
commit
df69a3b0a3
@ -188,7 +188,7 @@ public void configure(Map props) {
|
|||||||
// unless otherwise specified with a c3p0.*-style parameter.
|
// unless otherwise specified with a c3p0.*-style parameter.
|
||||||
Integer initialPoolSize = ConfigurationHelper.getInteger( C3P0_STYLE_INITIAL_POOL_SIZE, props );
|
Integer initialPoolSize = ConfigurationHelper.getInteger( C3P0_STYLE_INITIAL_POOL_SIZE, props );
|
||||||
if ( initialPoolSize == null && minPoolSize != null ) {
|
if ( initialPoolSize == null && minPoolSize != null ) {
|
||||||
c3props.put( C3P0_STYLE_INITIAL_POOL_SIZE, String.valueOf( minPoolSize ).trim() );
|
setOverwriteProperty( "", C3P0_STYLE_INITIAL_POOL_SIZE, props, c3props, minPoolSize );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*DataSource unpooled = DataSources.unpooledDataSource(
|
/*DataSource unpooled = DataSources.unpooledDataSource(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user