Interface JdbcConnectionProvider
-
- All Known Subinterfaces:
XaFacade
- All Known Implementing Classes:
SimpleJdbcConnectionProvider
@Internal public interface JdbcConnectionProviderJDBC connection provider.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcloseConnection()Close possible existing connection.ConnectiongetConnection()Get existing connection.ConnectiongetOrEstablishConnection()Get existing connection or establish an new one if there is none.booleanisConnectionValid()Check whether possible existing connection is valid or not throughConnection.isValid(int).ConnectionreestablishConnection()Close possible existing connection and establish an new one.
-
-
-
Method Detail
-
getConnection
@Nullable Connection getConnection()
Get existing connection.- Returns:
- existing connection
-
isConnectionValid
boolean isConnectionValid() throws SQLExceptionCheck whether possible existing connection is valid or not throughConnection.isValid(int).- Returns:
- true if existing connection is valid
- Throws:
SQLException- sql exception throw fromConnection.isValid(int)
-
getOrEstablishConnection
Connection getOrEstablishConnection() throws SQLException, ClassNotFoundException
Get existing connection or establish an new one if there is none.- Returns:
- existing connection or newly established connection
- Throws:
SQLException- sql exceptionClassNotFoundException- driver class not found
-
closeConnection
void closeConnection()
Close possible existing connection.
-
reestablishConnection
Connection reestablishConnection() throws SQLException, ClassNotFoundException
Close possible existing connection and establish an new one.- Returns:
- newly established connection
- Throws:
SQLException- sql exceptionClassNotFoundException- driver class not found
-
-