why the spec of JPA is included in the spec of EJB otherwise it is not necessary to have an application server installed to work with JPA?
to work with JPA, we need only a provider such as HIBERNATE?
JPA is used in EJB3.0 to replace Entity bean in EJB2.0..
the main differences between EJB2.0 and EJB3.0 is annotations, and the version of Java technology..
@Entity is used to mapping table into Java class... //this is new approach in JEE5..
@Entity and all annotation in the package of javax.persistence is included in the spec of EJB3.0...
Because in EJB3.0 there are many annotations could be used to access, and to "communicate" with entity class..
its depend on what application that you want to build..
if you want to build an Web or EJB or WebService application,
you should use an application server installed to work with JPA, and commonly application server could handle many low level processes that important for us, such as open/close connection, connection pooling, and etc...
if you just want to build desktop application, you won't need an application server to work with JPA...
Hibernate is an implementation of JPA standard..
you could use other, such as EclipseLink, OpenJPA, TopLink and etc..
Hope that helps..
please correct me if i'm wrong...
Thanks..