try {
pstmt = conn.prepareStatement(selectCreatedTimeSQL);
pstmt.setString(1, name);
rs = pstmt.executeQuery();
if (rs.next()) {
throw new DupKeyException("Name "+name +" already exists in DB");
}
} catch (Exception e) {
try {
if ( (conn != null) && !conn.getAutoCommit() ) {
conn.rollback();