Ravi Kiran V wrote:But in the examples of JPA , i , dont see Hibernate is not being used anywhere but directly EntityManager methods to perform CRUD operations .
Then please let me know where exactly actually Hibernate is being used in JPA (Because all the things are performed directly by EntityManager ) .
Ravi Kiran V wrote:Means what i think is as in case of JDBC .There is a Driver interface and the different vendors provided their own implementation class .
But EntityManager is a interface and Hibernate Session is also a interface know .
Hibernate is a persistence framework on its own, you can use Hibernate directly for your persistence needs. But JPA (introduced later) is the standardization for the persistence which Hibernate provide an implementation through "Hibernate Entity Manager".
Ravi Kiran V wrote:.. Can't i use the JPA directly ""?? for providing persistence
You should understand that JPA is a standardized specification for the persistence. Different vendors (Hibernate being one of them as pointed out earlier) provide implementations you can choose which to use. Of course you don't have to change your code as you are coding to a standardized specification (that is JPA).