xPetstore EJB implementation
The Database

The database is composed of the following tables:

Name Description
T_ACCOUNT Login table for the customers
T_CUSTOMER Customer' information
T_CATEGORY The catalog categories (i.e. Fish, Dogs, Cats, etc.)
T_PRODUCT Catalog products. Each product may have one or more variants (Items). A typical variant is usually male or female
T_ITEM Individual product details
T_ORDER Customers' orders
T_ORDER_ITEM Items ordered by the Customers

 
The Domain

The domain contains all the business objects of the application. The business objects maintains and persists the state of the application into the database.

 
The Services

The services manages the logic of the application.

 
The Web

 
The Code Generation Patterns

EntityBean
Each EntityBean named xpetstore.*.ejb.nameEJB will have the following classed generated:

- xpetstore.*.interfaces.nameLocal The local business interface
- xpetstore.*.interfaces.nameLocalHome The local home interface
- xpetstore.*.util.nameValue The Value Object
- xpetstore.*.util.nameUtil Utility class for creating home objects
- xpetstore.*.ejb.nameCMP The business implementation class

Each EntityBean will be also described in META-INF/ejb-jar.xml.

SessionBean
Each SessionBean named xpetstore.*.ejb.nameEJB will have the following classed generated:

- xpetstore.*.interfaces.nameLocal The local business interface
- xpetstore.*.interfaces.nameLocalHome The local home interface
- xpetstore.*.interfaces.nameRemote The remote business interface
- xpetstore.*.interfaces.nameRemoteHome The remote home interface
- xpetstore.*.util.nameUtil Utility class for creating home objects
- xpetstore.*.ejb.nameSession The business implementation class

Each SessionBean will be also described in META-INF/ejb-jar.xml.

MessageDrivenBean
Each SessionBean will be described in META-INF/ejb-jar.xml.

Struts
All Struts classes named xpetstore.web.struts.action.* will be described in WEB-INF/struts-config.xml.

JSP Taglibs
All classes named xpetstore.web.taglib.* will be described in WEB-INF/xpetstore.tld.

Web Filters
All classes named xpetstore.web.filter.* will be described in WEB-INF/web.xml.

Application Server Deployment Desciptors
Application server specific deployment descriptors will also be generated:

  • JBoss: jboss.xml, jbosscmp-jdbc.xml, jboss-web.xml
  • WebLogic: weblogic-ejb-jar.xml, weblogic-cmp-rdbms-jar.xml, weblogic.xml