@Override public Set<String> getChildrenNames(String childType) { if (ENTITYCACHE.equals(childType)) { return getCacheRegionNames(); } else if (ENTITY.equals(childType)) { return getEntityNames(); } else if (COLLECTION.equals(childType)) { return getCollectionNames(); } else if (QUERYCACHE.equals(childType)) { return getQueryNames(); } else { return super.getChildrenNames(childType); } }
@Override public Set<String> getChildrenNames(String childType) { try { Statistics statistics = getStatistics(); if (statistics.getChildrenNames().contains(childType)) { Statistics childStatistics = statistics.getChild(childType); Set<String>result = new HashSet<String>(); for(String name:childStatistics.getDynamicChildrenNames(entityManagerFactoryLookup, PathWrapper.path(puName))) { result.add(name); } return result; } else { return super.getChildrenNames(childType); } } 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 Collections.emptySet(); } }
@Override public Set<String> getChildrenNames(String childType) { try { Statistics statistics = getStatistics(); if (statistics.getChildrenNames().contains(childType)) { Statistics childStatistics = statistics.getChild(childType); Set<String>result = new HashSet<String>(); for(String name:childStatistics.getDynamicChildrenNames(entityManagerFactoryLookup, PathWrapper.path(puName))) { result.add(name); } return result; } else { return super.getChildrenNames(childType); } } 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 Collections.emptySet(); } }