I'm using JBoss Tools to reverse engineer a DB schema into POJO's. Specifically, I'm using the hbm2java option in the hibernatetool ANT task. Under the hbm2java option you can specify ejb3=true
to have EJB3 (JPA?) annotations generated in your POJO's. My questions is whether these annotations are JPA annotations? Or, more generally, what is the difference between JPA a开发者_如何转开发nnotations, Hibernate annotations and EJB3 annotations. Are they all essentially the same?
JPA (Java Persistence API) annotations declare how Java classes should be persisted to a database. Hibernate annotations are an implementation of JPA, plus some extra ones specific to the Hibernate framework. EJB (Enterprise Java Beans) annotations are separate from JPA, and are used to describe more general aspects of business logic within the EJB framework (transactions, concurrency, security, etc.)
精彩评论