You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by David Jencks <da...@yahoo.com> on 2010/05/08 09:15:25 UTC
bean validation
I'm going to look next at a bit of bean validation support. So far my plans are just to have a naming builder to stuff validator/factory references into jndi and an appropriate ref object. It looks like there are some requirements to stuff this into various contexts as well, hopefully that will be pretty easy...
thanks
david jencks
Re: bean validation
Posted by Donald Woods <dw...@apache.org>.
Cool. We've noticed some problems with using BV in JEE app servers, in
that OpenJPA needs to discover the entities to enhance before a BV
provider loads them, otherwise we don't have a change to do our Serp
byte code enhancing..... Don't remember the exact details right now, but
Albert on the OpenJPA team looked into it a few months back.
The Apache Bean Validation podling [1] is moving along and we're
knocking off TCK failures. Also, I've got OpenJPA trunk
(2.1.0-SNAPSHOT) updated to use the BVAL artifacts for our bean
validation tests, instead of the Hibernate implementation.
Ping me if you need help and feel free to post to the BVAL lists [2].
[1] https://cwiki.apache.org/BeanValidation/
[2] https://cwiki.apache.org/BeanValidation/mailing-lists.html
-Donald
On 5/8/10 3:15 AM, David Jencks wrote:
> I'm going to look next at a bit of bean validation support. So far my plans are just to have a naming builder to stuff validator/factory references into jndi and an appropriate ref object. It looks like there are some requirements to stuff this into various contexts as well, hopefully that will be pretty easy...
>
> thanks
> david jencks
>
>
Re: bean validation
Posted by Rick McGuire <ri...@gmail.com>.
On 5/8/2010 3:15 AM, David Jencks wrote:
> I'm going to look next at a bit of bean validation support. So far my plans are just to have a naming builder to stuff validator/factory references into jndi and an appropriate ref object. It looks like there are some requirements to stuff this into various contexts as well, hopefully that will be pretty easy...
>
> thanks
> david jencks
>
>
>
Once you have all of the appropriate jndi stuff set up to create a
factory appropriate for the given context, injecting those into the
different contexts was fairly simple. It's been a few weeks since I
looked at this, but I think for Jira 5226, it was a matter of setting a
property with the appropriate ValidationFactory instance when creating
the persistence manager. Using the version obtained from the jndi
context makes that a fairly simple matter. For 5227 (JSF), this is a
simple matter of setting an additional attribute in the servlet context,
again sourced from the same location.
Note that I have a suspicion that Jira 5228 might not be needed. The
validation spec APIs have support for creating a ValidationFactory
instance from a given validation xml descriptor. So it would appear
there is no need for the Geronimo code to understand or process the
contents of these descriptors directly.
Rick