PreparedStatement prepStmt = null;
Connection con = null;
ResultSet rs = null;
try {
con = ds.getConnection();
prepStmt = new UniversalPrepStmt
(ds, con, "SELECT XPDLREF "
+ "FROM PROCESSDEFINITION WHERE XPDLREF = ?");
prepStmt.setLong(1, id);
prepStmt.setMaxRows(1);
rs = prepStmt.executeQuery();
if (rs.next()) {
return;
}
rs.close();
rs = null;
prepStmt.close();
prepStmt = null;
prepStmt = new UniversalPrepStmt
(ds, con, "SELECT XPDLREF "
+ "FROM PROCESS WHERE XPDLREF = ?");
prepStmt.setLong(1, id);
prepStmt.setMaxRows(1);
rs = prepStmt.executeQuery();
if (rs.next()) {
return;
}
rs.close();
rs = null;
prepStmt.close();
prepStmt = null;
prepStmt = new UniversalPrepStmt
(ds, con, "DELETE FROM XPDLARCHIVE WHERE DBID = ?");
prepStmt.setLong(1, id);
prepStmt.executeUpdate();
archivedProcessDefinitionCache.remove (new Long(id));
} finally {