org.hibernate.c3p0.internal.StrategyRegistrationProviderImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-c3p0 Show documentation
Show all versions of hibernate-c3p0 Show documentation
Integration for c3p0 Connection pooling into Hibernate ORM
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.c3p0.internal;
import java.util.Collections;
import org.hibernate.boot.registry.selector.SimpleStrategyRegistrationImpl;
import org.hibernate.boot.registry.selector.StrategyRegistration;
import org.hibernate.boot.registry.selector.StrategyRegistrationProvider;
import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider;
/**
* Provides the {@link C3P0ConnectionProvider} to the
* {@link org.hibernate.boot.registry.selector.spi.StrategySelector} service.
*
* @author Brett Meyer
*/
public final class StrategyRegistrationProviderImpl implements StrategyRegistrationProvider {
@Override
@SuppressWarnings("unchecked")
public Iterable getStrategyRegistrations() {
final SimpleStrategyRegistrationImpl c3p0 = new SimpleStrategyRegistrationImpl<>(
ConnectionProvider.class,
C3P0ConnectionProvider.class,
"c3p0",
C3P0ConnectionProvider.class.getSimpleName(),
// legacy
"org.hibernate.connection.C3P0ConnectionProvider",
// legacy
"org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider"
);
return Collections.singleton( c3p0 );
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy