Hibernate and the Java Persistence API (JPA) are two leading technologies for managing the persistence and object relational mapping (ORM) of Java EE and Java SE applications.
Hibernate's open source, lightweight and transparent framework simplified ORM by mapping database tables to persistent classes in XML files and generating the SQL script at runtime.
JPA then made XML-based ORM much simpler by replacing the traditional XML mapping files with metadata annotation, enabling developers to persist the state of their Java applications to relational databases through metadata.
Java Persistence API
Submitted by david on Mon, 07/26/2010 - 21:37
There are of course many ways to access a database resource, and plenty of places are still using JDBC. In fact, I'm sure that there are some good arguments for why certain things are easier to do in JDBC. But it can be said that the industry as a whole is moving towards Object Relational Mapping (ORM) Tools.
If you work in the Java world there is even a sense of consolidation in the ORM space these days with JPA (the Java Persistence API).
Sure if you are working strictly with JPA it is a bit more limiting then working directly with Hibernate, iBatis, or TopLink - but you no longer worry that you have made a critical misstep in your architecture by tying yourself do a particular ORM implementation.
There are of course many ways to access a database resource, and plenty of places are still using JDBC. In fact, I'm sure that there are some good arguments for why certain things are easier to do in JDBC. But it can be said that the industry as a whole is moving towards Object Relational Mapping (ORM) Tools.
If you work in the Java world there is even a sense of consolidation in the ORM space these days with JPA (the Java Persistence API).
Sure if you are working strictly with JPA it is a bit more limiting then working directly with Hibernate, iBatis, or TopLink - but you no longer worry that you have made a critical misstep in your architecture by tying yourself do a particular ORM implementation.
-
hibernateJPA
-
An article showing you how to create a: * Spring 3.0.3.RELEASE application * that is a desktop application (no application server/servlet container required) but might be deployed to a server too * and that connects to a database (HSQLDB) * using JPA 2.0 * without using provider specific code (such as Hibernate) in Java files * and that allows for declarative transaction management (next article).JPAmavenspring
-
The Current State Due to Spring’s early success and adoption, Java EE 5 and Java EE 6 were pushed to greatly simplify the Java EE programming model, increase developer productivity and become much simpler to use than previous versions. The current Java EE 6 solutions are thus just now achieving the ability to compete against Spring's programming model. Developers now are ready to ask the question "Why you would prefer Spring?" Here is my take:cdijavaJPAspringweld
-
I do have some issues with Cameron's statements that frameworks are mistakes of the J2EE past and that Java EE 6 represents the future. Open source frameworks made J2EE successful. Struts and Hibernate came out in the early days of J2EE and still exist today. Spring came out shortly after and has turned into the do-everything J2EE implementation it was trying to fix. Java EE 6 might be a better foundation to build upon, but it's certainly not going to replace frameworks.cdijavaJPAJSFweld
