The EJB architecture addresses the development, deployment, and runtime aspects of an enterprise application's life cycle. An Enterprise JavaBean encapsulates business logic in a component framework that manages the details of security, transaction, and state management. This allows the EJB developer to focus on the business problem to be solved. An Entity bean contains persistent data and a specific bean represents a database record containing information. A Session bean merely provides a service, and does not itself represent any persistent data.
Any persistent data is in objects passed as a parameter.
The bean is responsible for ensuring appropriate transactional guarantees on its methods. Once a transaction is over, the TellerBean can be reused to work on a different bank account, since the caller will not care which teller it is using. RMI does not require transactions and security, though it does not preclude a framework from supplying these features. EJB explicitly requires both features. Enterprise JavaBeans will be the standard component architecture for building distributed object-oriented business applications in Java.