The JPA sample contains a server definition which includes the Servlet, JDBC and JPA features. It also contains a very simple JPA application, jpaApp.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 8.5.0.0 and later.
To run the jpaApp application:
java -jar jpaSample.jar
bin
directory in the Liberty profile installation:
server run jpaSample
CWWKZ0001I: Application jpaApp started in XX.XX seconds.
Hello JPA Worldfollowed by information about the entity being persisted to and retrieved from the database.
The jpaApp.war
file contains the source and binaries for the application, and can be
used to import it to Eclipse.
The table below shows the dependencies that are required for: Derby pre-requisite libraries.
Target install path | Source URL |
---|---|
shared/resources/JpaSampleDerbyLibs/derby-10.10.1.1.jar | http://repo1.maven.org/maven2/org/apache/derby/derby/10.10.1.1/derby-10.10.1.1.jar |
For further information and resources for developers using IBM WebSphere Application Server, please visit wasdev.net.