Developing EJB 3.0 Applications
Java EE specification makes the creation of EJB 3.0 applications simpler than previous EJB specifications.
Java EE streamlines EJB development in the following ways:
- Fewer required classes and interfaces
- Home and object interfaces are no longer required – you need the business interface only
- No need to implement javax.ejb.SessionBean
- No need to declare checked exceptions
- Optional deployment descriptors
- Annotations provide component definition and dependency injection
- Simple lookups
- new EJBContext() interface method replaces JNDI calls
- Lightweight persistence for object-relational mapping
- Entities are POJOs that provide an object-oriented view of the data stored in relational database
- New Interceptors class (new in Java EE 5)
- Interceptors are objects that can intercept a call to a business method (to handle security for example)
- Similar in purpose and action to Servlet filter or Web services handler
- Provide limited form of aspect-oriented programming
Related concepts
Differences between EJB 3.0 and EJB 2.1
Securing enterprise applications
Deploying EJB 3.0 applications
Related tasks