@Internal public interface JdbcConnectionProvider
Modifier and Type | Method and Description |
---|---|
void |
closeConnection()
Close possible existing connection.
|
Connection |
getConnection()
Get existing connection.
|
Connection |
getOrEstablishConnection()
Get existing connection or establish an new one if there is none.
|
boolean |
isConnectionValid()
Check whether possible existing connection is valid or not through
Connection.isValid(int) . |
Connection |
reestablishConnection()
Close possible existing connection and establish an new one.
|
@Nullable Connection getConnection()
boolean isConnectionValid() throws SQLException
Connection.isValid(int)
.SQLException
- sql exception throw from Connection.isValid(int)
Connection getOrEstablishConnection() throws SQLException, ClassNotFoundException
SQLException
- sql exceptionClassNotFoundException
- driver class not foundvoid closeConnection()
Connection reestablishConnection() throws SQLException, ClassNotFoundException
SQLException
- sql exceptionClassNotFoundException
- driver class not foundCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.