Right now TabDisplayCheckTag.getResourceFacets() does ResourceUIBean resourceUIBean = new ResourceUIBean(resource, subject); resourceFacets = resourceUIBean.getFacets(resource, subject); new ResourceUIBean(resource, subject) ends up doing Query query = entityManager.createNamedQuery(ResourceError.QUERY_FIND_BY_RESOURCE_ID_AND_ERROR_TYPE); which is an neccessary query which TabDisplayCheckTag shouldnt care about. So the alternative would be to put a static method on ResourceUIBean that returned just what TabDisplayCheckTag needed //ResourceUIBean resourceUIBean = new ResourceUIBean(resource, subject); resourceFacets = ResourceUIBean.getFacets(resource, subject); Then on ResourceUIBean you would have public static ResourceFacets getFacets(Resource resource, Subject subject) { ResourceTypeManagerLocal resourceTypeManager = LookupUtil.getResourceTypeManager(); ResourceFacets facets; try { facets = resourceTypeManager.getResourceFacets(subject, resource.getResourceType().getId()); } catch (ResourceTypeNotFoundException e) { throw new RuntimeException(e); } return facets; }
this is no longer an issue since we don't have any references to the old struts tabs anymore. all resource / group / autogroup / autocluster tabs are JSF today. thus, TabDisplayCheckTag will never be called.
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1671