Class DbUtility

java.lang.Object
org.apache.jackrabbit.core.util.db.DbUtility

public final class DbUtility extends Object
This class contains some database utility methods.
  • Method Details

    • close

      public static void close(ResultSet rs)
      This is a utility method which closes the given resources without throwing exceptions. Any exceptions encountered are logged instead.
      Parameters:
      rs - the ResultSet to close, may be null
    • close

      public static void close(Connection con, Statement stmt, ResultSet rs)
      This is a utility method which closes the given resources without throwing exceptions. Any exceptions encountered are logged instead.
      Parameters:
      con - the Connection to close, may be null
      stmt - the Statement to close, may be null
      rs - the ResultSet to close, may be null
    • logException

      public static void logException(String message, SQLException e)
      Logs an SQL exception on error level, and debug level (more detail).
      Parameters:
      message - the message
      e - the exception