@Override public boolean hasChildren(String childType) { if (ENTITYCACHE.equals(childType)) { return getChildrenNames(ENTITYCACHE).size() > 0; } else if (ENTITY.equals(childType)) { return getChildrenNames(ENTITY).size() > 0; } else if (COLLECTION.equals(childType)) { return getChildrenNames(COLLECTION).size() > 0; } else if (QUERYCACHE.equals(childType)) { return getChildrenNames(QUERYCACHE).size() > 0; } else { return super.hasChildren(childType); } }
@Override public boolean hasChildren(String childType) { try { Statistics statistics = getStatistics(); if (statistics.getChildrenNames().contains(childType)) { Statistics childStatistics = statistics.getChild(childType); return childStatistics != null && childStatistics.getNames().size() > 0; } else { return super.hasChildren(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 false; } }
@Override public boolean hasChildren(String childType) { try { Statistics statistics = getStatistics(); if (statistics.getChildrenNames().contains(childType)) { Statistics childStatistics = statistics.getChild(childType); return childStatistics != null && childStatistics.getNames().size() > 0; } else { return super.hasChildren(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 false; } }