开发者

JPA annotations = EJB3 annotations = Hibernate annotations?

开发者 https://www.devze.com 2023-04-13 01:57 出处:网络
I\'m using JBoss Tools to reverse engineer a DB schema into POJO\'s. Specifically, I\'m using thehbm2java option in the hibernatetool ANT task. Under the hbm2java option you can specify ejb3=true

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.)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号