WebSphere Commerce enterprise beans
The persistence layer within the WebSphere Commerce architecture is implemented according to the JPA component architecture. However, a small number of stateless session beans are used to handle intensive database operations, such as performing a sum of all the rows in a particular column.
Public enterprise beans are used by commerce applications, and can be both used and extended. These public enterprise beans are organized into the following EJB modules:
- Catalog-ProductManagementData
- ContentManagement-WorkspaceFlowData
- Enablement-BaseComponentsData
- Enablement-RelationshipManagementData
- Enablement-TicklerData
- GiftRegistry-BaseComponentsData
- GiftRegistry-OrderIntegrationData
- Marketing-CampaignsAndScenarioMarketingData
- Marketing-CustomerProfilingAndSegmentationData
- Marketing-ExperimentationManagementData
- Member-MemberManagementData
- Merchandising-PromotionsAndDiscountsData
- Order-OrderCaptureData
- Order-OrderManagementData
- WebSphereCommerceServerExtensionsData
- (Enterprise) Trading-AuctionsAndRFQsData
Some of the EJB modules in the preceding list contain session beans. In order to simplify migration in the future, you should not modify a session bean class. If required, we can create a new session bean in the WebSphereCommerceServerExtensionsData EJB module. For more information about creating new session beans, refer to Writing new session beans.
A program that uses enterprise beans must deal with the Java Naming and Directory Interface (JNDI) as well as the home and remote interfaces of enterprise beans. To simplify the programming model, an access bean for each enterprise bean is generated. When creating our own enterprise beans, use the tooling in WebSphere Commerce Developer to generate this access bean.
- Object life cycles
The enterprise beans in the object model include both independent and dependent objects. An independent object has its own life cycle, controlled directly by the create or remove requests of the business logic invoking the object. A dependent object has a life cycle that is attached to another object, known as the owner object (which may also in turn be a dependent object, but further up the association hierarchy, an independent object exists). When the owner object is deleted, all dependent objects are also deleted. The actual deletes are controlled by cascading delete specifications within the database.- Primary keys
A primary key is a unique key that is part of the definition of a table. It can be used to distinguish one record from others. All records must have a primary key. When creating a new record in a table, you may need to generate a unique primary key for the record.- Access beans
WebSphere Commerce commands interact with access beans rather than directly with entity beans. EJB access beans can greatly simplify client access to enterprise beans and alleviate the performance problems associated with remote calls for multiple enterprise bean attributes.- Extending the WebSphere Commerce object model
Application requirements may lead you to extend the existing WebSphere Commerce object model. The WebSphere Commerce object model can be extended in two ways.
Related concepts
Extending the WebSphere Commerce object model
Persistent object model
WebSphere Commerce framework overview
Related reference
Use of EJB 2.x entity beans