using dependency injection to inject EJBs gives the container a lot of flexibility to manage instance pools, reactivation of passivated instances, etc. -- professor duggan.
Enterprise JavaBeans (EJB) is a managed, server-side component architecture for modular construction of enterprise applications.
Example
The following shows a basic example of what an EJB looks like in code:
@Stateless public class CustomerService { @PersistenceContext private EntityManager entityManager; public void addCustomer(Customer customer) { entityManager.persist(customer); } }
No comments:
Post a Comment