From presentation to backend:
- @Model: (=@RequestScoped + @Named) directly exposes the backing bean into JSF 2 (or JSP)
- @Stateless: declares a POJO as Stateless Session Bean. You will need at least one boundary to manage transactions conveniently.
- @Inject: injects application "components" ("POJOs", Managed Beans, EJBs)
- @PersistenceContext: injects the EntityManager
- @Entity (and @Id to denote a PK): make a class persistent
The annotations above are sufficient to start with Java EE 6 and implement a CRUD webapplication with JSR 2, EJB 3.1, CDI, JPA 2.
airhacks.fm the podcast:
Stay in touch: airhacks.news.