Migration of JPA applications and bean validation

The Java Persistence API (JPA) 2.0 provides support for the Bean Validation API so that data validation can be done at run time. This topic includes best practices when you want to deploy Version 7 Feature Pack for OSGi and JPA 2.0 applications on Version 8.

The Bean Validation API was not included with the Version 7 Feature Pack for OSGi and JPA 2.0. Therefore, it was required to provide and configure the Bean Validation API and implementation in a shared library or package with the application.

For transitioning users For transitioning users: The Bean Validation API and implementation are included in the Version 8.0 product. If you want to deploy the feature pack applications on Version 8, be aware of the following changes in configuration and runtime behaviors:
  • In Version 7.0, the system property, com.ibm.websphere.validation.api.jar.path, is used to direct the feature pack run time to locate the Bean Validation API JAR file. In Version 8.0, the Bean Validation API JAR file is built into the product installation, therefore, this system property is ignored. However, the bean validation provider can still be overridden in V7 and V8 when packaged in application or shared libraries. The third bullet describes this usage scenario.
  • The bean validation implementation in WebSphere® Application Server is automatically the effective default bean validation provider.
  • If standard bean validation features are used by the JPA application, the com.ibm.websphere.validation.api.jar.path system property, and user-supplied bean validation provider can be removed from application deployment.
  • If non-specification compliant or provider-specific features are used by an application, the bean validation provider that supports the required features must be packaged, configured, and deployed as a typical, third-party service provider in the user application, the application shared library, and the server associated shared library. Read more about shared library usage in applications for more information.
trns



Related information
Using installed optional packages
Configuring class loaders of a server
Creating shared libraries
Task overview: Storing and retrieving persistent data with the JPA API
Troubleshooting bean validation in RAR modules
Bean validation troubleshooting tips
Bean validation in RAR modules
Bean Validation
Bean validation built-in constraints
Concept topic Concept topic    

Terms of Use | Feedback

Last updatedLast updated: Sep 19, 2011 7:16:32 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-express-iseries&topic=cdat_beanvaljpamigration
File name: cdat_beanvaljpamigration.html