ConnectionProvider interface that
simply throws an exception when a connection is requested. This implementation
indicates that the user is expected to supply a JDBC connection.
ConnectionProvider
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements org. |
| public void | closeConnection(Connection
a JDBC connection conn)Implements org. |
| public void | configure(Properties
SessionFactory properties props)Implements org. |
| public Connection | getConnection()
Implements org. |
| public boolean | supportsAggressiveRelease()
Implements org. |
| UserSuppliedConnectionProvider | back to summary |
|---|---|
| public UserSuppliedConnectionProvider() | |
| close | back to summary |
|---|---|
| public void close() Implements org. Doc from org. Release all resources held by this provider. JavaDoc requires a second sentence. | |
| closeConnection | back to summary |
|---|---|
| public void closeConnection(Connection conn) Implements org. Doc from org. Dispose of a used connection.
| |
| configure | back to summary |
|---|---|
| public void configure(Properties props) throws HibernateException Implements org. Doc from org. Initialize the connection provider from given properties.
| |
| getConnection | back to summary |
|---|---|
| public Connection getConnection() Implements org. Doc from org. Grab a connection, with the autocommit mode specified by hibernate.connection.autocommit.
| |
| supportsAggressiveRelease | back to summary |
|---|---|
| public boolean supportsAggressiveRelease() Implements org. Doc from org. Does this connection provider support aggressive release of JDBC connections and re-acquistion of those connections (if need be) later?
This is used in conjunction with Typically, this is only true in managed environments where a container tracks connections by transaction or thread. Note that JTA semantic depends on the fact that the underlying connection provider does support aggressive release. | |