| EJB 2.x life-cycle method |
What to do in EJB 3.0 |
| ejbCreate() |
Implement logic in init methods/constructors. |
| ejbPostCreate() |
Implement logic in a constructor, or create a business method and annotate it as @PostPersist. |
| ejbRemove() |
Create a business method, and annotate it with @PreRemove. |
setEntityContext()
unSetEntityContext() |
No longer applies. |
| ejbActivate() |
Create a business method, and annotate it as @PostLoad |
| ejbPassivate() |
No longer applies (it can be removed). |
| ejbStore() |
Create a business method, and annotate it with either @PrePersist or @PreUpdate. |