Chintan,

While Bean Validation is one of the Java EE 6 specifications, each
provider will have its own Java SE version requirements.  For example,
Apache BVAL[1] can be used with Java SE 1.5.  Some/most Java EE 5
application servers will most likely allow you to use a "Java 1.5
compatible" Bean Validation provider using JSE-style APIs.  You'll
lack EE6 features like JNDI lookup of validation factories and
integration with other technologies such as JPA, JSF, and JCA.

An exception is that the WebSphere Version 7.0 Feature Pack for
OSGi/JPA 2.0 provides a mechanism to support bean validation
integration with JPA 2.0 in an EE 5 + JPA 2.0 environment.  If you are
interested, I wrote up a blog post several months ago that provides a
step-by-step procedure to do the enablement.[2]  It is a bit out of
date as far as versions go, though.  You'll want to use the new 0.3
version of BVAL instead 0.1.

-Jeremy

[1] http://incubator.apache.org/bval/cwiki/index.html
[2]http://webspherepersistence.blogspot.com/2010/07/using-bean-validation-with-osgijpa-20.html

On Wed, May 25, 2011 at 12:53 PM, chintan4181 <chintan4...@gmail.com> wrote:
> Hi,
>
> We are running on JEE 5 stack and using JPA 2.0 for persistence layer. In
> our application architecture, we have following layers Service, BC(Business
> Component) and DAC(Data Access component). As per secure coding guideliens,
> each layer should be responsible of doing validation. considering that
> approach, Our business rule validation will be done in BC layer. and Data
> type, constraint will be done in DAC layer.
>
> For data validation at DAC layer, i can think of Bean Validation API (JSR
> 303) however it's part of JEE 6. can i use in JEE 5 ?
>
> Thanks
> Chintan
>
> --
> View this message in context: 
> http://openjpa.208410.n2.nabble.com/JEE-5-Bean-Validation-API-and-JPA-2-0-tp6403780p6403780.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Reply via email to