if (registration.isAllowsOverride()) {
ManagementResourceRegistration overrideRegistration = registration.getOverrideModel(managementName);
if (overrideRegistration == null || overrideRegistration.isAllowsOverride()) {
overrideRegistration = registration.registerOverrideModel(managementName, DataSourcesSubsystemProviders.OVERRIDE_DS_DESC);
}
<BUG>dataSourceServiceBuilder.addListener(new DataSourceStatisticsListener(overrideRegistration, resource, managementName, false));
} // else should probably throw an ISE or something</BUG>
final ServiceName driverServiceName = ServiceName.JBOSS.append("jdbc-driver", driverName.replaceAll("\\.", "_"));
if (driverServiceName != null) {
dataSourceServiceBuilder.addDependency(driverServiceName, Driver.class,

if (registration.isAllowsOverride()) {
ManagementResourceRegistration overrideRegistration = registration.getOverrideModel(managementName);
if (overrideRegistration == null || overrideRegistration.isAllowsOverride()) {
overrideRegistration = registration.registerOverrideModel(managementName, DataSourcesSubsystemProviders.OVERRIDE_DS_DESC);
}
dataSourceServiceBuilder.addListener(new DataSourceStatisticsListener(overrideRegistration, false));
DataSourceStatisticsListener.registerStatisticsResources(resource);
} // else should probably throw an ISE or something
final ServiceName driverServiceName = ServiceName.JBOSS.append("jdbc-driver", driverName.replaceAll("\\.", "_"));
if (driverServiceName != null) {
dataSourceServiceBuilder.addDependency(driverServiceName, Driver.class,
