Java Reference
In-Depth Information
ment environment with the code. That way, you can follow along with us and even tinker
with the code on your own, including running it inside a container.
The problem you'll solve in this chapter utilizes an essential element of this
book—ActionBazaar. ActionBazaar is an imaginary enterprise system around which we'll
weave most of the material in this topic. In a sense, this topic is a case study of developing
the ActionBazaar application using EJB 3. Let's take a quick stroll around the Ac-
tionBazaar application to see what it's all about.
2.1. Introducing the ActionBazaar application
ActionBazaar is a simple online auctioning system like eBay. Sellers dust off the treasures
hidden away in basement corners, take a few out-of-focus pictures, and post their item list-
ings on ActionBazaar. Eager buyers get in the competitive spirit and put exorbitant bids
against each other on the hidden treasures with the blurry pictures and misspelled descrip-
tions. Winning bidders pay for the items. Sellers ship sold items. Everyone is happy, or so
the story goes.
As much as we'd like to take credit for it, the idea of ActionBazaar was first introduced
in Hibernate in Action by Christian Bauer and Gavin King (Manning, 2004) as the
CaveatEmptor application. Hibernate in Action primary dealt with developing the persist-
ence layer using the Hibernate object-relational mapping (O/R mapping) framework. The
idea was later used by Patrick Lightbody and Jason Carreira in WebWork in Action (Man-
ning, 2005) to discuss the open source presentation-tier framework. We thought this was a
pretty good idea to adopt for EJB 3 in Action .
This section will introduce you to the ActionBazaar application. You'll start with a subset
of the architecture of ActionBazaar, and then you'll design a solution based on EJB 3. After
this section, the rest of the chapter explores some of the important features of these techno-
logies, using examples from the ActionBazaar application to introduce you to some of the
EJB bean types and show how they're used with CDI and JPA 2.
Let's begin by taking a look at the requirements and design of the example.
Search WWH ::




Custom Search