
Configure Module-Wide Settings
This section walks you through setting the data source and data-source mapping for the enterprise beans in
the Customer module. It also details how to configure the relationships between some of the enterprise beans.
1.
Under CustomerJAR (EJB), click Module Settings.
2.
In the CustomerJAR window, click the CMP - Default Settings tab.
3.
From the Datasource pop-up menu, choose MySQL 4.0.14 (java:/MySqlDS).
4.
From the Datasource Mapping pop-up menu, choose mySQL, and click Update.
5.
From the Entity Command Name pop-up menu, choose no-select-before-insert.
The advantage of configuring the database and the data-source mapping at the module level is that the
settings apply to all the enterprise beans in the module. Therefore, you don’t have to configure those
settings for each enterprise bean in the module, unless they differ from the ones set for the module.
6.
Click the CMP - PK Generation tab.
7.
In the Unknown Pk Class text field, enter java.lang.Long.
8.
In the Field Name text field, enter pk.
Configuring and Deploying Sun’s Pet Store
Configure the Pet Store Enterprise Application
2005-08-11 | Copyright © 2003, 2005 Apple Computer, Inc. All Rights Reserved.
21
Kommentare zu diesen Handbüchern