org.axonframework.common.jdbc
Class JdbcUtils

java.lang.Object
  extended by org.axonframework.common.jdbc.JdbcUtils

public class JdbcUtils
extends Object

Utility class for silently closing JDBC resources

Since:
2.2
Author:
Kristian Rosenvold, Allard Buijze

Constructor Summary
JdbcUtils()
           
 
Method Summary
static void closeQuietly(Connection connection)
          Close the given connection, if possible.
static void closeQuietly(ResultSet resultSet)
          Close the given resultSet, if possible.
static void closeQuietly(Statement statement)
          Close the given statement, if possible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcUtils

public JdbcUtils()
Method Detail

closeQuietly

public static void closeQuietly(ResultSet resultSet)
Close the given resultSet, if possible. All exceptions are discarded.

Parameters:
resultSet - The resource to close. May be null.

closeQuietly

public static void closeQuietly(Statement statement)
Close the given statement, if possible. All exceptions are discarded.

Parameters:
statement - The resource to close. May be null.

closeQuietly

public static void closeQuietly(Connection connection)
Close the given connection, if possible. All exceptions are discarded.

Parameters:
connection - The resource to close. May be null.


Copyright © 2010-2016. All Rights Reserved.