Containers in the application server can provide many of the necessary functions for the Java Persistence API (JPA) in a Java Enterprise Edition (Java EE) environment. The application server also provides JPA command tools to assist you with developing applications in a Java EE environment.
Prepare persistence applications to test outside of the application server container in a Java SE environment.
Data validation is a common task that occurs in all layers of an application, including persistence. The Feature Pack for OSGi Applications and JPA 2.0 does not include the Bean Validation API, therefore you need to enable Bean Validation functions in the Java Persistence API (JPA) application.
The extension properties of Java Persistence API (JPA) for WebSphere® Application Server can be specified with the openjpa or wsjpa prefix. This topic features the wsjpa properties.
The Criteria API is an API for building queries with Java objects, as an alternative to building strings for Java Persistence Query Language (JPQL) queries.
The Java Persistence API (JPA) specification allows an entity's primary key to be made up of more than one column. In this case, the primary key is referred to as a "composite" or "compound" primary key. You need to provide an ID class, which is specified by the @IdClass annotation, in order to manage a composite primary key. Use the identity tool for JPA to generate an ID class for entities that use composite primary keys.
The entity enhancer tool for Java Persistence API (JPA) applications in the application server inserts bytecode into an entity class file that allows the JPA provider to manage the state of an entity.
The wsmapping tool is used to provide top-down mapping of the entity object model to the database relational model. You can use the wsmapping tool to create database tables.
The wsreversemapping tool generates persistent class definitions and metadata from a database schema.
The schema tool can be used to view the database schema in XML form or match an XML schema to an existing database.
The command allows users to utilize the pureQuery feature in Java Persistence API (JPA) applications.
The ANT task WsJpaDBGenTask provides an alternative to the wsdbgen command.
SQL statement batching can improve the performance of your application server. Java Persistence API (JPA) for WebSphere Application Server uses the Java Database Connectivity (JDBC) addBatch and executeBatch APIs to batch statements.
Java Persistence API (JPA) for WebSphere Application Server has extended OpenJPA to work with database generated version IDs. These generated version fields (timestamp or token) can be used to efficiently detect changes to a given row.
If your database supports Extensible Markup Language (XML) column types, you can use mapping tools to manage XML objects. The Java Persistence API (JPA) specification does not contain support for mapping XML columns to Java objects. You have the choice of mapping XML columns to a Java string or a Java byte array field. These mapping techniques make using the XML objects as strings or byte arrays difficult. JPA for the application server allows you to simplify the management of XML objects by using a third-party solution for mapping management.
References in product information to app_server_root, profile_root, and other directories imply specific default directory locations. This topic describes the conventions in use for WebSphere Application Server.