Skip to content

Commit

Permalink
HHH-8302 init c3p0 initialPoolSize with minPoolSize
Browse files Browse the repository at this point in the history
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
  • Loading branch information
laurent-r authored and Brett Meyer committed Jul 11, 2013
1 parent 08a32f7 commit df69a3b
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -188,7 +188,7 @@ public void configure(Map props) {
// unless otherwise specified with a c3p0.*-style parameter.
Integer initialPoolSize = ConfigurationHelper.getInteger( C3P0_STYLE_INITIAL_POOL_SIZE, props );
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(
Expand Down

0 comments on commit df69a3b

Please sign in to comment.