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 JDBCException
convertSqlException
(String message, SQLException e) Create aConnection
Exposed for testing purposes only.getUrl()
Obtain the URL to which this creator connects.protected abstract Connection
makeConnection
(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:ConnectionCreator
Obtain the URL to which this creator connects. Intended just for informational (logging) purposes.- Specified by:
getUrl
in interfaceConnectionCreator
- Returns:
- The connection URL.
-
createConnection
Description copied from interface:ConnectionCreator
Create aConnection
- Specified by:
createConnection
in interfaceConnectionCreator
- Returns:
- The newly-created
Connection
-
convertSqlException
-
makeConnection
-
getConnectionProperties
Exposed for testing purposes only.
-