5.6. EJB design

There are many ways in which the structure of Figure 5.2 could be rendered as a collection of EJBs. The decisions to be taken do not differ in principle from the decisions taken in any other component-oriented design exercise. As always, one will consider the issues of coupling, cohesion, code-reuse, ease of maintenance, and ease of testing, among other things. As in any object-oriented design, one must decide how rigorously EJBs are to correspond to real-world entities in the application domain. There are, however, some issues to consider that are specific to the use of EJBs.

  • When should functionality be encapsulated into an EJB, and when is the class the more appropriate unit of organization? EJBs lend themselves to reuse, ...

Get Applied Enterprise JavaBeans™ Technology now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.