transDef.setReadOnly(true);
TransactionStatus transStatus = transMgr.getTransaction(transDef);
String type = request.getParameter("type");
GetAllPersonIdsWhoHaveGroupCoordinatorAccess groupCoordinatorMapper = //
(GetAllPersonIdsWhoHaveGroupCoordinatorAccess) getSpringContext().getBean(
"getAllPersonIdsWhoHaveGroupCoordinatorAccess");
DomainGroupMapper groupMapper = (DomainGroupMapper) getSpringContext().getBean("jpaGroupMapper");
String entityName = request.getParameter("entityName");
if (type.equals("DomainGroup"))
{
DomainGroup group = groupMapper.findByShortName(entityName);
if (group == null)
{
throw new ServletException("Group: " + entityName + " not found");
}
if (groupCoordinatorMapper.hasGroupCoordinatorAccessRecursively(inName, group.getId()))
{
transMgr.commit(transStatus);
return group;
}