final HibernateTemplate template = new HibernateTemplate(sessionFactory);
final Session session = template.getSessionFactory().openSession();
final Set<String> alreadyReindexed = new HashSet<String>();
final List<Entry> entryList = map.get(obj.getClass());
reindexDependents(template, session, obj, entryList, alreadyReindexed);
session.disconnect();
final int size = alreadyReindexed.size();
if (size >= 10) {
log.info("Re-indexing of " + size + " objects done after updating " + obj.getClass().getName() + ":" + obj.getId());
}
}