Filling in the Blanks

Well, I’ve spent quite a while discussing how to handle Forethought offices in this chapter. Of course, there is a lot more than just an office to be dealt with in the application; there are also data entities for users, funds, accounts, and the other data structures created in the database. Trying to detail beans for the numerous tables in even this sample application would take another fifty pages or so. Of course, doing so would cloud the point of this chapter, which is EJB design and related patterns.

Appendix E is full of supplemental code that was used in this book but didn’t fit into a chapter, and it’s where the entity bean code for the rest of the Forethought entities lies. You can also download the code for the entire book from http://www.newInstance.com. You should take the time now to enter in all this code, or download it, compile it, and add it to the forethoughtEntities.jar archive. Deploy this into your EJB container to ensure it is ready for use, and then continue. The rest of the book assumes that you have available not only the Office bean, but all of the Forethought entity beans detailed in Appendix E, and you will have problems if they are not. You can also see some of the additional concepts discussed in this and the previous chapter in action in these supplemental code listings. For example, handling dependent objects, like the user’s type in the User bean, is a perfect example, and you’ll see how that works.

Get Building Java Enterprise Applications 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.