oortcloud_domicile
oortcloud_domicile

Reputation: 850

Spring 3 Transaction support

Hi I am reading Spring in Action 3 book and I came across this paragraph where it talks about JPA transactions,

It's important to note that the JpaDialect implementation must support mixed JPA/JDBC access for this to work. All of Spring's vendor-specific implementations of JpaDialect
(EclipseLinkJpaDialect, HibernateJpaDialect, OpenJpaDialect, and TopLinkJpaDialect) provide support for mixing JPA with JDBC. DefaultJpaDialect, however, does not.

My question is why would Hibernate or iBATIS would create a jpaDialect when we could directly use Hibernate instead of JPA. I am new to this and trying to understand the links between all these technologies, any help is really appreciated.

Thanks, SS

Upvotes: 0

Views: 198

Answers (2)

Cygnusx1
Cygnusx1

Reputation: 5409

Hibernate is an ORM (Object-relational mapping) and JPA is the Java Persistence API.

Simple description:

-Hibernate role is to map your database table to java objects.

-JPA role is to deal or offer methods to manage Transaction/persistence into that given database.

Hibernate provides an open source object-relational mapping framework for Java. Versions 3.2 and later provide an implementation for the Java Persistence API.

So if you use Hibernate 3.2+, it already implements the JPA spec so you don't need a third party JPA provider.

Upvotes: 1

Dave Newton
Dave Newton

Reputation: 160170

Because JPA is a specification, not an implementation, and some people prefer to only code to a specification. It's like programming to an interface, not an implementation.

(I've never seen a project change JPA implementations, but I'm sure it happens.)

Upvotes: 1

Related Questions