It looks very weird question but please share your thoughts.
What are the advantages and disadvantages of using JPA over Entity Bean?
My points are:
Advantages:
1.JPA uses POJO classes, that makes it lighter. 2.POJO classes can implement Serializable interface, so no need for DTO. 3.No need for EJB container (or Application Server).
Disadvantage: 1.Being a new technology, time required for developers to understand and code.
JPA allows you to have a really OO models using inheritance and polymorphism.
JPA allows you to choice the implementation you will use (this one provided by the AS, Hibernate, Toplink,...)
JPA can be used directly in the web tier... Its is possible to use JPA without EJB...
Mladen Grabowsky
Greenhorn
Joined: Sep 19, 2007
Posts: 29
posted
0
POJOs can be tested easily, since they do not require a special environment like an EJB Container.
Julio Viegas
Greenhorn
Joined: Jul 01, 2007
Posts: 11
posted
0
Easy configuration via metadata support
Noel Anonas
Greenhorn
Joined: Nov 10, 2005
Posts: 7
posted
0
JPA is usable not only for JavaEE but also for JavaSE.
Noel Q. Anonas, SCJA, SCJP, SCEA5 (part 1)
chris zielinski
Ranch Hand
Joined: Sep 22, 2007
Posts: 41
posted
0
JPA is used for persistence to relational databases, whereas Entity Beans (BMP) can persist on to any datasource (legacy systems, OODB, non-relational datasources etc).
JDO specification also allows for storage to RDBMS, OODBMS, files, XML etc. [ October 14, 2007: Message edited by: chris zielinski ]
Michael Work
Ranch Hand
Joined: Oct 11, 2007
Posts: 32
posted
0
I think JPA allows us to model coarse-grained objects - by using OO design relationships - such as inheritance, etc. Entity bean, due to their nature probably, in my opinion, suited towards fine-grained objects.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.