HHH-8869 fixes/simplifications for HikariCP 1.3.4
Conflicts: libraries.gradle
This commit is contained in:
parent
e8a52e2904
commit
80284b9556
|
@ -25,7 +25,6 @@ import java.util.Map;
|
|||
import java.util.Properties;
|
||||
|
||||
import org.hibernate.cfg.AvailableSettings;
|
||||
import org.hibernate.dialect.H2Dialect;
|
||||
|
||||
import com.zaxxer.hikari.HikariConfig;
|
||||
|
||||
|
@ -52,18 +51,10 @@ public class HikariConfigurationUtil {
|
|||
copyProperty( AvailableSettings.ISOLATION, props, "transactionIsolation", hikariProps );
|
||||
copyProperty( AvailableSettings.AUTOCOMMIT, props, "autoCommit", hikariProps );
|
||||
|
||||
if (props.containsKey( AvailableSettings.DIALECT )
|
||||
&& props.get( AvailableSettings.DIALECT ).equals( H2Dialect.class.getName() )) {
|
||||
// Terrible workaround for an issue with H2. The version of H2 we currently use does not include the
|
||||
// standard DataSource#setUrl, but instead uses setURL. HikariCP's PropertyBeanSetter uses reflection and
|
||||
// fails without this.
|
||||
copyProperty( AvailableSettings.URL, props, "dataSource.URL", hikariProps );
|
||||
}
|
||||
else {
|
||||
copyProperty( AvailableSettings.URL, props, "dataSource.url", hikariProps );
|
||||
}
|
||||
copyProperty( AvailableSettings.USER, props, "dataSource.user", hikariProps );
|
||||
copyProperty( AvailableSettings.PASS, props, "dataSource.password", hikariProps );
|
||||
copyProperty(AvailableSettings.DRIVER, props, "driverClassName", hikariProps);
|
||||
copyProperty(AvailableSettings.URL, props, "jdbcUrl", hikariProps);
|
||||
copyProperty( AvailableSettings.USER, props, "username", hikariProps );
|
||||
copyProperty( AvailableSettings.PASS, props, "password", hikariProps );
|
||||
|
||||
for ( Object keyo : props.keySet() ) {
|
||||
String key = (String) keyo;
|
||||
|
|
|
@ -29,7 +29,6 @@ hibernate.connection.username sa
|
|||
hibernate.jdbc.batch_size 10
|
||||
hibernate.connection.provider_class HikariCPConnectionProvider
|
||||
|
||||
hibernate.hikari.dataSourceClassName org.h2.jdbcx.JdbcDataSource
|
||||
hibernate.hikari.poolName testPool
|
||||
# Purposefully low and simplisitic.
|
||||
hibernate.hikari.minimumPoolSize 2
|
||||
|
|
|
@ -111,7 +111,7 @@ ext {
|
|||
c3p0: "com.mchange:c3p0:0.9.2.1",
|
||||
ehcache: "net.sf.ehcache:ehcache-core:2.4.3",
|
||||
proxool: "proxool:proxool:0.8.3"
|
||||
hikaricp: "com.zaxxer:HikariCP:1.3.0"
|
||||
hikaricp: "com.zaxxer:HikariCP:1.3.4"
|
||||
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue