JPA: Java Persistence API
JPA is an API, it can be used to perform the database operations in the enterprise applications with ORM implementation tools.
JPA is a specification provided by SUN microsystems and it is implemented by third party vendors like JBOSS, Eclipse Foundations, Apache, Web logic,….
JPA is following ORM rules and regulations to implement Persistence in the enterprise applications and it is implemented by the following tools.
- Hibernate
- Eclipse Link
- Open JPA
- IBaties
——
—–
Note: If we want to use JPA in the applications then we have to use either of the above implementation tools.
If we want to prepare JPA applications then we have to use the following steps.
- Create a Java Project with JPA Libraries including Hibernate jars.
- Prepare Entity class that is Bean class.
- Create a Mapping File or use Annotations in Entity class.
- Create JPA configuration file [persistence.xml]
- Create Test Application