Entity beans don't usually contain business logic, so they're good candidates for auto-generation. This is just as well, as entity beans tend to contain a lot of code - for example in getter and setter methods. The deployment descriptors for EJB 2.0 CMP entities are also far too complex to hand-author reliably. Good tool support is vital to productivity if using entity beans. Several types of tools are available, from third parties and app server vendors. For example:
Object modeling tools such as Rational Rose and Together. These use the object-driven modeling approach we discussed in , enabling us to design entities graphically using UML and generate RDBMS tables. This is convenient, but object-driven modeling can create problems.
Important |
There is a strong case that entity beans should never be hand authored. One argument in favor of using entity beans is the relatively good level of tool support for entity bean authoring. |