org.hibernate.vibur.internal.StrategyRegistrationProviderImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-vibur Show documentation
Show all versions of hibernate-vibur Show documentation
Integration for Vibur Connection pooling as a Hibernate ORM ConnectionProvider
/*
* 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.vibur.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 ViburDBCPConnectionProvider} to the
* {@link org.hibernate.boot.registry.selector.spi.StrategySelector} service.
*
* @author Simeon Malchev
*/
public final class StrategyRegistrationProviderImpl implements StrategyRegistrationProvider {
@Override
@SuppressWarnings("unchecked")
public Iterable getStrategyRegistrations() {
return Collections.singletonList(
new SimpleStrategyRegistrationImpl<>(
ConnectionProvider.class,
ViburDBCPConnectionProvider.class,
"vibur",
"viburdbcp",
ViburDBCPConnectionProvider.class.getSimpleName(),
// for backward compatibility with pre-existing Vibur project Hibernate integration artifacts
"org.vibur.dbcp.integration.ViburDBCPConnectionProvider",
// for consistency's sake
"org.hibernate.connection.ViburDBCPConnectionProvider"
) );
}
}