The JPA provider included in the Liberty profile is based
on Apache OpenJPA. OpenJPA uses Java™ bytecode
enhancement of JPA persistent types (Entity, Embeddable, MappedSuperclass)
to add state tracking, and other necessary information to enable persistence
and other optimized features within JPA classes. In an application
server environment, enhancement of your JPA entities occurs automatically
when the application is loaded by the Liberty profile server.
Pre-enhancement of JPA classes (or build time enhancement)
is necessary when a persistence JAR is used in both application server,
and non-application server environments. The most common ways to perform
build time enhancement are the OpenJPA enhancer Ant task, and PCEnhancer.
These build time enhancement options require the OpenJPA library and
dependent libraries to be on the classpath. The JPA
thin client JAR com.ibm.ws.jpa.thinclient_8.5.0.jar,
an installable option for the Liberty profile, includes the OpenJPA
library and dependent libraries.
If you installed the product using Installation Manager,
the .jar file is in the runtimes directory.
If you performed an archive installation , the .jar file
is in the directory of your choice. To perform build time enhancement,
include the JPA thin client .jar file on your classpath.
Use the JPA thin client .jar file to ensure full
compatibility with the application server.