int jdbcStatsSize = jdbcStats.getNames().size();
int poolStatsSize = poolStats.getNames().size();
if (jdbcStatsSize > 0 || poolStatsSize > 0) {
if (overrideRegistration != null) {
if (jdbcStatsSize > 0) {
ManagementResourceRegistration jdbcRegistration = overrideRegistration.registerSubModel(new StatisticsResourceDefinition(JDBC_STATISTICS,DataSourcesSubsystemProviders.RESOURCE_NAME, jdbcStats));
jdbcRegistration.setRuntimeOnly(true);
}
if (poolStatsSize > 0) {
ManagementResourceRegistration poolRegistration = overrideRegistration.registerSubModel(new StatisticsResourceDefinition(POOL_STATISTICS, DataSourcesSubsystemProviders.RESOURCE_NAME, poolStats));
poolRegistration.setRuntimeOnly(true);
}
}
}
break;