try {
final Session session = HibernateUtil.openSession();
groups = getGroups(session);
} catch (Exception e) {
LOG.log(Level.SEVERE, "Could not read the list of groups.", e);
throw new PersistenceManagerException("Could not read the list of groups.", e);
} finally {
HibernateUtil.closeSession();
}
return groups == null ? new ChannelGroupIF[0] : groups;