Contents

Primary Presentation

Element Catalog

Variability Guide

Other Information

Related Views

Primary Presentation

Diagram 1. High-level View


Diagram in MS Visio format

Diagram 2. Detailed View


Diagram in MS Visio format

Element Catalog

address::ejb::<EntityBean>>AddressEJB

Entity bean that tracks two lines of street address, state, zip code, and country. Uses Container-managed. Uses Container-managed persistence.

asyncsender::ejb::<<SessionBean>>AsyncSenderEJB

Contains a stateless session bean that converts shopping cart contents and customer data into an XML message representing an order, and sends the message to the Order Processing Center.

cart::ejb::<<SessionBean>>ShoppingCartLocalEJB

Contains a stateful session bean that maintains the contents of an individual user's virtual shopping cart.

cart::ejb::model::CartItem

Represents an individual line item of the shopping cart. Used by the cart::ejb::<SessionBean>ShoppingCartLocalEJB to find the subtotal in the cart and to create a list of items in the shopping cart.


under the namespace catalog

client::CatalogHelper

Makes calls to the local Catalog EJB or access the catalog directly over JDBC. See the Fast Lane Reader pattern for more details.

dao::<<interface>>CatalogDAO

Interface which will be implemented by database specific code. This class encapsulates all the SQL calls made by Catalog EJB.

dao::CatalogDAOFactory

Factory for objects that implement <interface>CatalogDAO. Uses the deployment descriptor to know what class to create

dao::GenericCatalogDAO

This class implements CatalogDAO for pointbase DB. This class encapsulates all the SQL calls made by Catalog EJB. This layer maps the relational data stored in the database to the objects needed by Catalog EJB.

dao::PointBaseCatalogDAO

This class implements CatalogDAO for pointbase DB. This class encapsulates all the SQL calls made by Catalog EJB. This layer maps the relational data stored in the database to the objects needed by Catalog EJB.

ejb::CatalogEJB

Session Bean implementation of <interface>CatalogDAO

model::Category

This class represents different categories of pets in the Java Pet Store Demo. Each category can have one or more products under it and each product in turn can have one or more inventory items under it. For example, the Java Pet Store Demo currently has five categories: birds, cats, dogs, fish, and reptiles.

model::Item

This class represents a particular item in the Catalog Component. Each item belongs to particular type of product and has attributes like id, listprice, etc.

model::Page

Represents a page of results (for page-by-page iteration)

model::Product

This class represents different kinds of pets for a particular category. For example, in the Java Pet Store Demo, the category for 'BIRDS' could have two products: 'Amazon Parrot' and 'Finch'.


contactinfo::ejb::<EntityBean>>ContactInfoEJB

Entity bean that tracks family and given name, telephone, email, and address. Uses Container-managed persistence.

creditcard::ejb::<EntityBean>>CreditCardOrderEJB

Entity bean that tracks card number, card type, and expiration date. Uses Container-managed persistence. Uses Container-managed persistence.

customer::account::ejb::<<EntityBean>>AccountEJB

Entity bean that tracks account status, credit card, and contact info. Uses Container-managed persistence.

customer::ejb::<<EntityBean>>CustomerEJB

Entity bean that tracks customer ID (primary key), account, and profile. Uses Container-managed persistence.

customer::profile::ejb::<<EntityBean>>ProfileEJB

Entity bean that tracks preferred language, category, list preference, and banner preference. Uses Container-managed persistence.

customer::profile::ejb::ProfileInfo

Class contains the same profile information that <EntityBean>ProfileEJB. It is used by the actions and events classes.

encodingfilter

Ensures that every page the pet store serves to browsers has the appropriate encoding.

lineitem::ejb::<EntityBean>>LineItemEJB

Entity bean that tracks each line of products in a cart: category ID, product ID, item ID, quantity and unit price. Uses Container-managed persistence

mailer::ejb::<<MessageDrivenBean>>MailerMDB

Takes the messages that arrive in the mailer queue, transforms them to email objects and sends them.

mailer::ejb::Mail

Represents the message in an email (to, from, cc, bcc, subject, body)

mailer::ejb::MailHelper

A helper class to create and send mail. Creates an email message and sends it using the J2EE mail services.

processmanager::ejb

Handles the workflow process to fullfil an order. Further refinement is available.

purchaseorder::ejb::<<SessionBean>>PurchaseOrderEJB

Session bean that keeps the information related a purchase order: localization, order ID, user ID, email ID;, order date, shipping info, billing info, total price, credit card and the corresponding line items. By default the localization is set to american English.

servicelocator

Implements the Service Locator pattern. It is used to looukup resources such as EJBHomes, JMS Destinations, etc. Uses the singleton strategy and also the caching strategy. Has to implementations: one to be used by the EJB tier and another one intended to be used on the web tier.

signon::ejb

Package that contains a session bean, an entity bean, a servlet, a servlet filter and auxiliary classes that are responsible for authentication of web users (sign-on).

supplierpo::ejb::<EntityBean>>SupplierOrderEJB

Entity bean that tracks supplier order information: Order Id, order date, shipping info, and corresponding line items.

uidgen::ejb

Contains a stateless session bean that creates globally unique object identifiers.

xmldocuments

Group of classes and schemas to help transform and create XML messages. No comments are provided in the source code.

Variability Guide

There is a one-to-one mapping from tables in the petstoredb to entity beans in the components group. Furthermore the entity beans that do not map the petstoredb map to the (so far undocumented data views) opcdb and supplierdb.

Other Information

The lack of documentation is almost the rule in the source code. Most of the descriptions have been gathered from Sun's architectural documentation and educated assumptions from the authors of this architecture document. The information in customer::profile::ejb::<EntityBean>ProfileEJB is duplicated by customer::profile::ejb::ProfileInfo. There is no information in the source code on why this is done but it is infered that is chosen to simplify interaction with other classes, in particular with the customer related classes in the petstore::controller space (ejb::CustomerEJBAction, web::CustomerHTMLAction, events::CustomerEvent).

There is no rationale for some of the classes in the cart::model package, in particular, the ShoppingCartModel class is unused in the whole application.

Related Views

Back to the Pet Store SAD main page