List lics = licDao.findLicenseInGroup(grpId.longValue());
for (Iterator iter = lics.iterator(); iter.hasNext();) {
License lic = (License) iter.next();
lic.setGroup(null);
}
grp = (Group) grpDao.find(grpId);
grpDao.remove(grp);
NotificationService.removeGroups(new Group[] {grp});
} catch (DaoException e) {
LOGGER.warn("failed to remove group for Id: " + grpId, e);
throw new ServiceException("Cannot remove group");