Reputation: 1506
I am new to the ORM and till now whatever i read on the internet , it implies that JPA as just a specification and internally we need to use either eclipselink or hibernate or any other implementation . But i got confuse when i saw Spring transaction management in one of my application. Is spring also a implementation of JPA
Can anybody explain what what is the actual difference between JPA , (EclipseLink.hibernate) , Spring.
Upvotes: 0
Views: 122
Reputation: 691775
JPA is an specification for object relational mapping, coming with a whole lot of interfaces and annotations that implementations must implement and support. One of the features provided by this specification is the ability to use local transactions with the JPA API.
Hibernate and EclipseLink are implementations of this specification.
Spring is a dependency injection framework that, among other things, allows you to handle transactions in a declarative way. But it doesn't come with any actual transaction manager. It just offers a common layer of abstraction over actual transaction management systems, one of them being JPA. But it can also use JDBC transactions, or JTA transactions. You just have to configure it to use the appropriate transaction management subsystem based on your requirements and technology choices.
Upvotes: 2