Skip to content

Commit

Permalink
HHH-13035 Upgrade Agroal to 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Oct 16, 2018
1 parent 8c00814 commit 8a6d5e7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
6 changes: 3 additions & 3 deletions gradle/libraries.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ ext {
// EL required by Hibernate Validator at test runtime
expression_language: "org.glassfish:javax.el:${elVersion}",

c3p0: "com.mchange:c3p0:0.9.5.2",
c3p0: "com.mchange:c3p0:0.9.5.2",
ehcache: "net.sf.ehcache:ehcache:2.10.3",
ehcache3: "org.ehcache:ehcache:3.0.0",
jcache: "javax.cache:cache-api:1.0.0",
proxool: "proxool:proxool:0.8.3",
hikaricp: "com.zaxxer:HikariCP:2.5.1",
vibur: "org.vibur:vibur-dbcp:22.1",
agroal_api: "io.agroal:agroal-api:0.4",
agroal_pool: "io.agroal:agroal-pool:0.4",
agroal_api: "io.agroal:agroal-api:1.2",
agroal_pool: "io.agroal:agroal-pool:1.2",

atomikos: "com.atomikos:transactions:4.0.6",
atomikos_jta: "com.atomikos:transactions-jta:4.0.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void configure(Map props) throws HibernateException {
try {
AgroalPropertiesReader agroalProperties = new AgroalPropertiesReader( CONFIG_PREFIX ).readProperties( props );
agroalProperties.modify().connectionPoolConfiguration( cp -> cp.connectionFactoryConfiguration( cf -> {
copyProperty( props, AvailableSettings.DRIVER, cf::driverClassName, Function.identity() );
copyProperty( props, AvailableSettings.DRIVER, cf::connectionProviderClassName, Function.identity() );
copyProperty( props, AvailableSettings.URL, cf::jdbcUrl, Function.identity() );
copyProperty( props, AvailableSettings.USER, cf::principal, NamePrincipal::new );
copyProperty( props, AvailableSettings.PASS, cf::credential, SimplePassword::new );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ public void testAgroalConnectionProvider() throws Exception {
}
catch (Exception e) {
// expected
assertTrue( e.getMessage().contains( "closed" ) );
assertTrue( e.getMessage() + " does not contain 'closed' or 'shutting down'",
e.getMessage().contains( "closed" ) || e.getMessage().contains( "shutting down" ) );
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ protected void configure(Configuration configuration) {
configuration.getProperties().put( AvailableSettings.AUTOCOMMIT, Boolean.FALSE.toString() );
}

@Override
public void releaseSessionFactory() {
super.releaseSessionFactory();
connectionProvider.stop();
}

@Override
protected Class<?>[] getAnnotatedClasses() {
return new Class<?>[]{ City.class };
Expand Down

0 comments on commit 8a6d5e7

Please sign in to comment.