Special Edition Using Enterprise JavaBeans 2.0
With a subject as complex as EJB, it's not always easy to illustrate the concepts using a short example that can be covered within a single chapter. With this in mind, we decided to introduce a central example early on and build on it throughout the book. Other examples will still be used where they're helpful (for variety if nothing else), but having a core example to fall back on minimizes the background explanation needed whenever a new example is introduced. This approach should help you stay more focused on the details of EJB and make it easier to cover them without distraction. Of course, the background for any example must go somewhere, so the thought here is to get it out of the way early so that the remaining chapters can focus on the technical details that are being introduced. There are, of course, tradeoffs tied to any decision. The downside to building a large example in a book like this is that it's impossible to pick an application that's relevant to everyone. However, the intent has been to choose a problem domain that's addressed fairly often in both B2C and B2B Web applications and, even more important, easy to understand. With these goals in mind, the majority of the code developed throughout the book will be that needed to support an online auction site. Such a site can be fairly simple or quite complex depending on the requirements it must satisfy . To make the example worthwhile without risking being spread too thin, we'll emphasize depth of implementation and not necessarily breadth. In other words, you won't see every aspect of an auction addressed, but the characteristics that are included in the example will hopefully be somewhat realistic. Of course, the areas of the application where J2EE and especially EJB offer unique advantages will be looked at in the most detail. In the sections that follow, you'll get a quick introduction to the various types of auctions that an online site might support and the business rules that go along with them. The goal is to scope the requirements for the example well enough to produce a set of class diagrams that will serve as the foundation for the code developed in later chapters. Reading this chapter before diving into the technical details of EJB that follow is optional. You might want to skip this material at first and then refer to it when the requirements for the auction site start to matter. The idea is that whenever you do need to be familiar with the requirements of the auction site as part of understanding an example, it's better to have them all in one place ”and that place is here. |