removeNoExceptions(templateAlertDefinition);
LookupUtil.getResourceGroupManager().deleteResourceGroup(LookupUtil.getSubjectManager().getOverlord(),
resourceGroup.getId());
executeInTransaction(false, new TransactionCallback() {
public void execute() throws Exception {
em.createQuery(
"delete from AlertNotification an where an.senderName like '" + TestAlertSender.NAME + "%'")
.executeUpdate();
em.createQuery("delete from AlertCondition ac where ac.name like '" + universalName + "%'")
.executeUpdate();
em.createQuery("delete from AlertDefinition ad where ad.name like '" + universalName + "%'")
.executeUpdate();
}
});
executeInTransaction(false, new TransactionCallback() {
public void execute() throws Exception {
em.clear();
for (Resource r : resources) {
r = em.find(Resource.class, r.getId());
try {