org.castor.jdo.util

Class JDOUtils

public final class JDOUtils extends Object

Common static methods for Castor JDO

Since: 0.9.9.1

Version: $Revision: 1.2 $ $Date: 2005/11/10 10:41:04 $

Author: Ralf Joachim Stein M. Hugubakken

Method Summary
static voidcloseConnection(Connection conn)
Closes the Connection without throwing SQLException.
static voidcloseDatabase(Database db)
Closes the Database without throwing exceptions.
static voidcloseResultSet(ResultSet rs)
Closes the ResultSet without throwing SQLException.
static voidcloseStatement(Statement stmt)
Closes the Statement without throwing SQLException.

Method Detail

closeConnection

public static void closeConnection(Connection conn)
Closes the Connection without throwing SQLException. A warning is added to the log if SQLException is thrown.

Parameters: conn The Connection to close

closeDatabase

public static void closeDatabase(Database db)
Closes the Database without throwing exceptions. An active transaction will silently rolled back. Warnings are added to the log if any exception occures.

Parameters: db The database to close.

closeResultSet

public static void closeResultSet(ResultSet rs)
Closes the ResultSet without throwing SQLException. A warning is added to the log if SQLException is thrown.

Parameters: rs The ResultSet to close

closeStatement

public static void closeStatement(Statement stmt)
Closes the Statement without throwing SQLException. A warning is added to the log if SQLException is thrown.

Parameters: stmt The Statement to close

Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com