if (config instanceof SecurityRoleServiceConfig){
boolean needsLockProtection =
GeoServerSecurityProvider.getProvider(GeoServerRoleService.class,
config.getClassName()).roleServiceNeedsLockProtection();
if (needsLockProtection) {
service = new LockingRoleService(service);
}
}
service.setName(name);