The EclipseLink JPA sample is designed to show how you can easily replace the default JPA provider used in WebSphere Application Server Liberty Profile with an alternate JPA provider. It contains a server definition which includes the Servlet, JDBC and JPA features. It also contains a very simple JPA application, jpaSample.war, which contains a single servlet, JPAServlet. This servlet persists a JPA entity (named "Thing") to a derby database and then retrieves the entiry from the database.
This sample can be installed onto runtime versions 18.104.22.168 and later.
Online installation (requires 22.214.171.124 or later):
installUtility install eclipselinkJPASample
Any missing features required by the server will be installed for you.
eclipselinkJPASample.jarusing the download button at the top of the page and place it in the root of your server installation.
java -jar eclipselinkJPASample.jar
Any missing features required by the server will need to be installed separately.
To run the jpaApp application:
bindirectory in the Liberty profile installation:
server run eclipselinkJPASample
CWWKZ0001I: Application jpaApp started in XX.XX seconds.
Hello JPA Worldfollowed by information about the entity being persisted to and retrieved from the database.
jpaApp.war file contains the source and binaries for the application, and can be used to import it to Eclipse.