private UserRegistry getUserRegistryFromConfiguration ( ) throws RegistryException { String [ ] refIds = this . refId ; if ( refIds == null || refIds . length == 0 ) { // Can look for config.source = file // If thats set, and we're missing this, we can error. // If its not set, we don't have configuration from the // file and we should try to resolve if we have one instance defined? Tr . error ( tc , "USER_REGISTRY_SERVICE_CONFIG_ERROR_NO_REFID" ) ; throw new RegistryException ( TraceNLS . getFormattedMessage ( this . getClass ( ) , TraceConstants . MESSAGE_BUNDLE , "USER_REGISTRY_SERVICE_CONFIG_ERROR_NO_REFID" , null , "CWWKS3000E: A configuration error has occurred. There is no configured refId parameter for the userRegistry configuration." ) ) ; } else if ( refIds . length == 1 ) { return getUserRegistry ( refIds [ 0 ] ) ; } else { // Multiple refIds, we'll use the UserRegistryProxy. List < UserRegistry > delegates = new ArrayList < UserRegistry > ( ) ; for ( String refId : refIds ) { delegates . add ( getUserRegistry ( refId ) ) ; } return new UserRegistryProxy ( realm , delegates ) ; } }
When a configuration element is defined use it to resolve the effective UserRegistry configuration .