The Hibernate 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 220.127.116.11 and later.
Online installation (requires 18.104.22.168 or later):
installUtility install hibernateJPASample
Any missing features required by the server will be installed for you.
hibernateJPASample.jarusing the download button at the top of the page and place it in the root of your server installation.
java -jar hibernateJPASample.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 hibernateJPASample
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.