Class BasicConnectionCreator
java.lang.Object
org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator
- All Implemented Interfaces:
ConnectionCreator
- Direct Known Subclasses:
DriverConnectionCreator,DriverManagerConnectionCreator
Template (as in template pattern) support for
ConnectionCreator implementors.-
Constructor Summary
ConstructorsConstructorDescriptionBasicConnectionCreator(ServiceRegistry serviceRegistry, String url, Properties connectionProps, boolean autocommit, Integer isolation, String initSql) -
Method Summary
Modifier and TypeMethodDescriptionprotected JDBCExceptionconvertSqlException(String message, SQLException e) Create aConnectionExposed for testing purposes only.getUrl()Obtain the URL to which this creator connects.protected abstract ConnectionmakeConnection(String url, Properties connectionProps)
-
Constructor Details
-
BasicConnectionCreator
public BasicConnectionCreator(ServiceRegistry serviceRegistry, String url, Properties connectionProps, boolean autocommit, Integer isolation, String initSql)
-
-
Method Details
-
getUrl
Description copied from interface:ConnectionCreatorObtain the URL to which this creator connects. Intended just for informational (logging) purposes.- Specified by:
getUrlin interfaceConnectionCreator- Returns:
- The connection URL.
-
createConnection
Description copied from interface:ConnectionCreatorCreate aConnection- Specified by:
createConnectionin interfaceConnectionCreator- Returns:
- The newly-created
Connection
-
convertSqlException
-
makeConnection
-
getConnectionProperties
Exposed for testing purposes only.
-