- A building block to execute the business logic.
- Types
- Entity beans
- Enterprise beans
- Message driven Beans
- Entity beans
- Enterprise beans use the databases if required
- The most important benefit of the enmity bean is that it doesn't need any code for JDBC connection API EJB container itself handles the same.
- If we have a need to use session bean to use the database we need to implement the JDBC connection code.
The pattern is an organised way of solving some specific class of problems. These patterns come in to the picture at analysis and high-level-design phase. The first step of applying one pattern to the code base is first to understand the find the vector of change in the code base. Next step is to isolate the things that are subject to change form the things that are not. That is adding a layer of abstraction to the code. The goal of design patterns is isolating the changes in your code. Understand Inheritance and Composition as a solution to a specific class of problems. Inheritance : - It allows you to express differences in behavior (that's the thing that changes) in objects that all have the same interface (that's what stays the same). Composition : - Composition can also be considered a pattern, since it allows you to change—dynamically or statically—the objects that implement your class, and thus the way that class works. Some principles of designing the c...