public class CloseJDBCResources extends Object
logger. You can configure the location and other
properties for the logger through the logging.properties
file.
© Copyright 2007 Sans Pareil Technologies, Inc.
| Constructor and Description |
|---|
CloseJDBCResources() |
| Modifier and Type | Method and Description |
|---|---|
static void |
close(Connection connection)
Utility method to close the specified
Connection in
a fail-safe manner. |
static void |
close(Connection connection,
boolean autoCommit)
Utility method to close the specified
Connection in
a fail-safe manner. |
static void |
close(ResultSet resultSet)
Utility method to close the specified
ResultSet in
a fail-safe manner. |
static void |
close(Statement statement)
Utility method to close the specified
Statement in
a fail-safe manner. |
static void |
closeAll(ResultSet resultSet)
Utility method to close the specified
ResultSet in
a fail-safe manner. |
static void |
closeAll(Statement statement)
Utility method to close the specified
Statement in
a fail-safe manner. |
public static void close(ResultSet resultSet)
ResultSet in
a fail-safe manner. Any errors encountered while closing the
result set will be logged to logger as a warning.resultSet - The result set that is to be closed.public static void closeAll(ResultSet resultSet)
ResultSet in
a fail-safe manner. The Statement and Connection associated with the specified result set are also
closed.resultSet - The result set that is to be closed.close( ResultSet ),
close( Statement ),
close( Connection )public static void close(Statement statement)
Statement in
a fail-safe manner. Any errors encountered while closing the
statement will be logged to logger as a warning.statement - The statement that is to be closed.public static void closeAll(Statement statement)
Statement in
a fail-safe manner. The Connection associated with the
specified statement is also closed.statement - The statement that is to be closed.close( Statement ),
close( Connection )public static void close(Connection connection)
Connection in
a fail-safe manner. Any errors encountered while closing the
connection will be logged to logger as a warning.connection - The connection that is to be closed.public static void close(Connection connection, boolean autoCommit)
Connection in
a fail-safe manner. Set the autoCommit property of
the connection to the specified value. Any errors encountered
while closing the connection will be logged to logger as
a warning.connection - The connection that is to be closed.autoCommit - The value to set for the autoCommit property.close( Connection )