![]() If you do not know how to do that, you can follow this tutorial. I have created mine using the quick start archetype from the command line. Let us first create a simple maven project. For this article I have chosen to use Hibernate. There are many good implementations of JPA available freely (like EclipseLink, Hibernate etc.). ![]() Since JPA is only a specification, we will also need an implementation. In this example we will use Maven to set up our required dependencies. I hope that this article will be helpful for those who wish to do the same in the future. When I first started out with JPA, I had real difficulties to set it up because most of the articles on the web are written for Java EE environment only, whereas I was trying to use it in a Java SE environment. However, we should also keep in mind that this is not a single magic bullet which will solve our every problem. I will not go into the details of this because there are already many posts on the web which perfectly answer this question, like this one, or this one. There are many reasons to learn an ORM tool like JPA. We can think of it as something similar to ORM tools like Hibernate, except that it is an official part of the Java EE specification (and it’s also supported on Java SE). ![]() JPA stands for Java Persistence API, which basically is a specification that describes a way to persist data into a persistent storage, usually a database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |