Search in sources :

Example 1 with C3P0ConnectionProvider

use of org.hibernate.c3p0.internal.C3P0ConnectionProvider in project hibernate-orm by hibernate.

the class C3P0ConnectionProviderTest method testIsolationPropertyCouldBeEmpty.

@Test
@TestForIssue(jiraKey = "HHH-9498")
public void testIsolationPropertyCouldBeEmpty() {
    C3P0ConnectionProvider provider = new C3P0ConnectionProvider();
    try {
        Properties configuration = new Properties();
        configuration.setProperty(Environment.ISOLATION, "");
        provider.configure(configuration);
    } finally {
        provider.stop();
    }
}
Also used : C3P0ConnectionProvider(org.hibernate.c3p0.internal.C3P0ConnectionProvider) Properties(java.util.Properties) Test(org.junit.Test) TestForIssue(org.hibernate.testing.TestForIssue)

Example 2 with C3P0ConnectionProvider

use of org.hibernate.c3p0.internal.C3P0ConnectionProvider in project hibernate-orm by hibernate.

the class C3p0TransactionIsolationConfigTest method getConnectionProviderUnderTest.

@Override
protected ConnectionProvider getConnectionProviderUnderTest() {
    C3P0ConnectionProvider provider = new C3P0ConnectionProvider();
    provider.injectServices((ServiceRegistryImplementor) ssr);
    return provider;
}
Also used : C3P0ConnectionProvider(org.hibernate.c3p0.internal.C3P0ConnectionProvider)

Example 3 with C3P0ConnectionProvider

use of org.hibernate.c3p0.internal.C3P0ConnectionProvider in project hibernate-orm by hibernate.

the class C3P0ConnectionProviderTest method testC3P0isDefaultWhenThereIsC3P0Properties.

@Test
public void testC3P0isDefaultWhenThereIsC3P0Properties() {
    JdbcServices jdbcServices = serviceRegistry().getService(JdbcServices.class);
    ConnectionProviderJdbcConnectionAccess connectionAccess = assertTyping(ConnectionProviderJdbcConnectionAccess.class, jdbcServices.getBootstrapJdbcConnectionAccess());
    assertTrue(connectionAccess.getConnectionProvider() instanceof C3P0ConnectionProvider);
}
Also used : C3P0ConnectionProvider(org.hibernate.c3p0.internal.C3P0ConnectionProvider) JdbcServices(org.hibernate.engine.jdbc.spi.JdbcServices) ConnectionProviderJdbcConnectionAccess(org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.ConnectionProviderJdbcConnectionAccess) Test(org.junit.Test)

Aggregations

C3P0ConnectionProvider (org.hibernate.c3p0.internal.C3P0ConnectionProvider)3 Test (org.junit.Test)2 Properties (java.util.Properties)1 ConnectionProviderJdbcConnectionAccess (org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.ConnectionProviderJdbcConnectionAccess)1 JdbcServices (org.hibernate.engine.jdbc.spi.JdbcServices)1 TestForIssue (org.hibernate.testing.TestForIssue)1