public interface JDBCConnectionService
Interface used to obtain a database connection from a JDBC data source.
JDBC data sources are identified by name, not JNDI path.
| Modifier and Type | Method | Description |
|---|---|---|
java.sql.Connection |
getConnection(java.lang.String sqlConnectionName) |
Gets a
Connection instance from the named JDBC data source. |
void |
releaseConnection(java.sql.Connection connection) |
Releases the
Connection instance. |
java.sql.Connection getConnection(java.lang.String sqlConnectionName)
throws java.sql.SQLException,
JDBCConnectionServiceException
Gets a Connection instance from the named JDBC data source.
When finished with the connection, the security provider must invoke the
releaseConnection method to release that connection.
sqlConnectionName - java.sql.SQLException - - if the database connection is unavailableJDBCConnectionServiceException - - if the named JDBC data source is unavailablevoid releaseConnection(java.sql.Connection connection)
throws java.sql.SQLException
Releases the Connection instance.
connection - java.sql.SQLException - - if the database connection is unavailable