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

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

[~gpetracek] just few fixes on your summary to correct some points

1.
{noformat}
@"not guaranteed to work":
in case of proxies in general that's correct (i never said something 
different), however,
in case proxies support it (like owb- and weld-proxies), it's possible to 
support it.{noformat}
it is not guaranteed to work for CDI as I showed with your sample, it would 
only work if the bean was already touched and exists in current context which 
is not guaranteed at all (first JAX-RS request makes it wrong generally for app 
scoped beans for ex).

 

 

2. perf: indeed if you dont enable it you don't have much regression but if you 
do it is costing for nothing compared to today (even if usage is not always 
fully expected it happens you get proxies in the validator already).

3. one point you didn't mention is that with bval interceptor the programmatic 
validation is almost no more needed (even in JSF) and here you get the 
unwrapped instance generally so it already works as expected until it is nested

4. worse case I guess we can drop the SPI and enforce to set it 
programmatically to avoid to have it automatic, would be acceptable since then 
user really intended to use that whereas the SPI would magically break apps 
(either functionally due to 3 or for perf in some cases), wdyt?

> 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