[ 
https://issues.apache.org/jira/browse/SLING-6578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15890105#comment-15890105
 ] 

Felix Meschberger commented on SLING-6578:
------------------------------------------

Hmm, in a private conversation [~cziegeler] mentioned "overloading" of 
validators. Consider a validator x.y.z is configured and provided by bundle 
a.b.c. Now another bundle f.g.h wants to register a different validation 
behaviour for this configured validator x.y.z. So f.g.h registers another 
validator with that name/identity but a higher service ranking value.

In this case, using the service.pid which is defined to be a "unique 
identifier" (but not enforced), is somewhat dubious.

Is that a use case here for validators ?
Don't we make reasonating about which validators actually apply harder ?

> Use "service.pid" property instead of class name to reference validators
> ------------------------------------------------------------------------
>
>                 Key: SLING-6578
>                 URL: https://issues.apache.org/jira/browse/SLING-6578
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>
> Leveraging the component's "service.pid" property value instead of its 
> classname is more stable (even if implementation changes, the PID might stay 
> the same) and also allows for configuration factories to refer to a specific 
> validator configuration. The fallback should be the property "component.name" 
> as "service.pid" is not always necessarily set. Basically the validator 
> should be referable via each of those value, i.e. one of the "service.pid"s 
> or the "component.name".



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to