We're updating the issue view to help you get more done. 

Can't set ConnectionProvider instance, regression

Description

In AvailableSettings.java:

1 2 3 4 5 6 7 8 9 10 11 /** * Names the {@link org.hibernate.engine.jdbc.connections.spi.ConnectionProvider} to use for obtaining * JDBC connections. Can reference:<ul> * <li>an instance of ConnectionProvider</li> * <li>a {@code Class<? extends ConnectionProvider>} reference</li> * <li>a {@code Class<? extends ConnectionProvider>} FQN</li> * </ul> * <p/> * The term {@code "class"} appears in the setting name due to legacy reasons; however it can accept instances. */ String CONNECTION_PROVIDER ="hibernate.connection.provider_class";

The first two options are no longer supported with the "new" bootstrap code. It breaks because of this cast in ConnectionProviderInitiator.java:

1 String providerName = (String) configurationValues.get( AvailableSettings.CONNECTION_PROVIDER );

And obviously the logic to handle an existing instance of the right type or a class reference is missing.

Environment

None

Status

Assignee

Steve Ebersole

Reporter

Christian Bauer

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

5.0.7

Priority

Major