code: private void cleanupConnection(Connection conn, ResultSet rs, PreparedStatement statement) {
  
  		logger.logp(Level.FINEST, CLASSNAME, "cleanupConnection", "Entering",  new Object[] {conn, rs==null ? "<null>" : rs, statement==null ? "<null>" : statement});
  
  		if (statement != null) {
  			try {
  				statement.close();
  			} catch (SQLException e) {
  				throw new PersistenceException(e);
  			}
  		}
  
  		if (rs != null) {
  			try {
  				rs.close();
  			} catch (SQLException e) {
  				throw new PersistenceException(e);
  			}
  		}
  
  		if (conn != null) {
  			try {
  				conn.close();
  			} catch (SQLException e) {
  				throw new PersistenceException(e);
  			} finally {
  				try {
  					conn.close();
  				} catch (SQLException e) {
  					throw new PersistenceException(e);
  				}
  			}
  		}
  		logger.logp(Level.FINEST, CLASSNAME, "cleanupConnection", "Exiting");
  	}
docs: closes connection, result set and statement
  
  @param conn - connection object to close
  @param rs - result set object to close
  @param statement - statement object to close