OperationStepHandler evictAllHandler = new AbstractMetricsHandler() {
@Override
void handle(final ModelNode response, final String name, ManagementLookup stats, OperationContext context) {
Cache secondLevelCache = stats.getEntityManagerFactory().getCache();
if (secondLevelCache != null) {
secondLevelCache.evictAll();
}
}
};
jpaHibernateRegistration.registerOperationHandler(OPERATION_EVICTALL, evictAllHandler, evictAll);