Hi Chintan,
Yes, Bean Validation can be used in a Java EE 5 environment, but it would be
used in an application-managed mode.  That is, Java EE 5 from an application
server or container perspective would have no knowledge of how to interact
with Bean Validation.  But, if your application is calling out to the Bean
Validator, that should work just fine.

As proof of this approach, WebSphere provides the OSGi/JPA 2.0 Feature Pack
that sits on top of WebSphere Application Server v7.  Although this Feature
Pack does not ship a Bean Validator provider, we do document how a customer
could get their own provider [1] and use it with our JPA 2.0 solution [2].

Hope this helps,
Kevin

[1]  http://incubator.apache.org/bval/cwiki/index.html
[2]
http://publib.boulder.ibm.com/infocenter/wasinfo/fep/topic/com.ibm.websphere.jpafep.multiplatform.doc/info/ae/ae/tejb_jpabeanval.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