public interface ConnectionProvider
Responsible for providing JDBC
Connection
instances. Usually this means a new connection,
but in some cases, for example when wrapping existing connections, an existing connection may be returned.
Note that when used in conjunction with a ConnectionPoolWrapper
a new connection must be returned.-
Method Summary
Modifier and TypeMethodDescriptiondefault Connection
connection
(User user, String url) Returns a JDBCConnection
instance based on the given database and user.
-
Method Details
-
connection
Returns a JDBCConnection
instance based on the given database and user.- Parameters:
user
- the userurl
- the jdbc url- Returns:
- a JDBC
Connection
instance - Throws:
SQLException
- in case of an exceptionNullPointerException
- in case user or url is null
-