@Override public Resource getChild(PathElement element) { if (ENTITYCACHE.equals(element.getKey())) { return hasCacheRegion(element) ? PlaceholderResource.INSTANCE : null; } else if (ENTITY.equals(element.getKey())) { return hasEntity(element) ? PlaceholderResource.INSTANCE : null; } else if (COLLECTION.equals(element.getKey())) { return hasCollection(element) ? PlaceholderResource.INSTANCE : null; } else if (QUERYCACHE.equals(element.getKey())) { return hasQuery(element) ? PlaceholderResource.INSTANCE : null; } else { return super.getChild(element); } }
@Override public Resource getChild(PathElement element) { try { Statistics statistics = getStatistics(); if (statistics.getChildrenNames().contains(element.getKey())) { Statistics childStatistics = statistics.getChild(element.getKey()); return childStatistics != null && childStatistics.getDynamicChildrenNames(entityManagerFactoryLookup, PathWrapper.path(puName)).contains(element.getValue()) ? PlaceholderResource.INSTANCE : null; } else { return super.getChild(element); } } catch (RuntimeException e) { // WFLY-2436 ignore unexpected exceptions (e.g. JIPI-27 may throw an IllegalStateException) // WFLY-10413 : also make sure to catch HibernateExceptions ROOT_LOGGER.unexpectedStatisticsProblem(e); return super.getChild(element); } }
@Override public Resource getChild(PathElement element) { try { Statistics statistics = getStatistics(); if (statistics.getChildrenNames().contains(element.getKey())) { Statistics childStatistics = statistics.getChild(element.getKey()); return childStatistics != null && childStatistics.getDynamicChildrenNames(entityManagerFactoryLookup, PathWrapper.path(puName)).contains(element.getValue()) ? PlaceholderResource.INSTANCE : null; } else { return super.getChild(element); } } catch (RuntimeException e) { // WFLY-2436 ignore unexpected exceptions (e.g. JIPI-27 may throw an IllegalStateException) // WFLY-10413 : also make sure to catch HibernateExceptions ROOT_LOGGER.unexpectedStatisticsProblem(e); return super.getChild(element); } }