|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JdbcResourceRegistry
Defines a registry of JDBC resources related to a particular unit of work. The main function of a
JdbcResourceRegistry is to make sure resources get cleaned up. This is accomplished by registering all
JDBC-related resources via the register(java.sql.Statement)
and register(java.sql.ResultSet)
methods. When done with these resources, they should be released by the corollary
release(java.sql.Statement)
and release(java.sql.ResultSet)
methods. Any un-released resources
will be released automatically when this registry is closed via close()
. Additionally,
all registered resources can be released at any time using releaseResources()
.
registerLastQuery(java.sql.Statement)
method. Such statements can then be cancelled by calling cancelLastQuery()
Method Summary | |
---|---|
void |
cancelLastQuery()
Cancel the last query registered via registerLastQuery(java.sql.Statement) |
void |
close()
Close this registry. |
boolean |
hasRegisteredResources()
Does this registry currently have any registered resources? |
void |
register(ResultSet resultSet)
Register a JDBC result set. |
void |
register(Statement statement)
Register a JDBC statement. |
void |
registerLastQuery(Statement statement)
Register a query statement as being able to be cancelled. |
void |
release(ResultSet resultSet)
Release a previously registered result set. |
void |
release(Statement statement)
Release a previously registered statement. |
void |
releaseResources()
Release all registered resources. |
Method Detail |
---|
void register(Statement statement)
statement
- The statement to register.void release(Statement statement)
statement
- The statement to release.void register(ResultSet resultSet)
resultSet
- The result set to register.void release(ResultSet resultSet)
resultSet
- The result set to release.boolean hasRegisteredResources()
void releaseResources()
void close()
releases
any registered resources.
After execution, the registry is considered unusable.
void registerLastQuery(Statement statement)
statement
- The cancel-able query statement.void cancelLastQuery()
registerLastQuery(java.sql.Statement)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |