Register now or log in to join your professional community.
According to my Experience in Hibernate and Spring
Hiberanet : It is a ORM(Object Relation Mapping) Tool. It has more Database Functionality. Hiberate uses @Annotation. In hibernate we create Object.
Spring: IT is an IOC container.Based on dependency Injection. Spring has a great feature like "ApplicationContext.xml" where object are created by itself and object are created only once.
If you don't have EJB App. Server and don't want to use EJB.
You can implement light weight persistence layer (CRUD operations to be simple) using JPA.
There are several JPA implemenations available you can use OpenJPA, Toplink, Hibernate, EclipseLink JPA.
Now how you decide what to choose there are various stats for each of these frameworks on the web.
In my opinion deciding factors are:
* Team Expertise if not then how much is the learning curve.
* Simplicity V/S Complexity
* Performance
* Documentation and Community Support. How much active is the community
* Commercial (Closed Source) V/S Open Source
* Integration with the tools team is using e.g. (IDE, App. Server, Server Side technology, Database)
EJB: Java specification for developing enterprise applications.
Hibernate : It is an Object relational mapping(ORM) tool. Tables in database represent objects in java.
JPA : Java specification for using an ORM tool like Hibernate,Toplink etc. By using JPA,developer does not have to worry about the underlying implementation. It will owrk on any App Server which adheres to java specifications.
EJB: it a large set of specifications (security, transactions, persistence management, Timer services , administrations)
JPA: it a part of EJB specification that refers to persistence. (i.e: some empty crud methods)
Hibernate and Spring JPA: it an implementation of JPA specification. (i.e: implemented crud methods)
Let us nake things more specific.
If I am in situation to chose between hibernate and EJB3 what are the pros and cons for each.
I am not asking in a theoretical question I am just about taking a real decision