Taking TOTD #121 forward, this blog explains how to create a JPA Persistence Unit for a MySQL sample database and package it as a library. This JAR file can then be easily included in other web applications.
Lets get started!
- Configure GlassFish for using the MySQL sample database (sakila) as described in TOTD #121.
- Add the GlassFish instance in NetBeans IDE using "Services" panel.
- Create JPA entities using NetBeans IDE.
- Create a Java class library:
Our ultimate goal is …
- Create a Java class library: