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

Romain Manni-Bucau commented on BVAL-184:
-----------------------------------------

[~gpetracek] same with weld, it can't work until something else initializes the 
bean (which can be the case in some rare cases cause weld bypasses the proxies 
but in general it is not and "by spec"). Once again I see it working in some 
cases but it is not a generic CDI integration so not good enough yet IMHO. The 
overhead is not just some instance check when proxies already go through 
validation (ignored today), it is way more and depends the SPI impl, in tomee, 
depending the context (ie not standalone) it can become costly. Interceptors 
always work, even for nested case, you just code it differently which is one of 
the point of my remark: your use case is doable as of today with the spec (bval 
+ cdi apps). That said I agree to add it while there is no implicit loading of 
the resolver, ie programmatic (no SPI since it is NOT needed), a toggle in the 
apache factory (i like it less but works) or, fine too, a new 
"bval-extension-proxy" module which implements another provider and let the 
user pick the provider he wants explicitly when he needs it. Just ensure to not 
add any SPI OOTB please, a boolean.parse is ok, a setX is ok but I would avoid 
everything else.

Can help in a week or so to either code the new provider in the new module or 
toggle (setter is already in your branch and fine for me if we drop the SPI 
auto loading *by default*).

> Support for proxied instances
> -----------------------------
>
>                 Key: BVAL-184
>                 URL: https://issues.apache.org/jira/browse/BVAL-184
>             Project: BVal
>          Issue Type: New Feature
>            Reporter: Gerhard Petracek
>            Assignee: Gerhard Petracek
>            Priority: Major
>
> currently org.apache.bval.jsr.util.Proxies just detects the real class, but 
> that means only getters can get annotated.
> with a spi like
> {code}
> public interface InstanceResolver extends Comparable<InstanceResolver> {
>     <T> T resolveInstance(T instance);
>     //...
> }
> {code}
> it would be possible to create resolvers for external libs (like owb, weld, 
> ...)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to