Entity Settings

In the Entity Settings dialog box, specify the type of management supported by your entity bean and its primary key class.

  1. Choose either or persistence management for your entity bean by selecting an appropriate radio button. You should select version 2.0 of container-managed persistence because it supports relationships between EJBs.(Version 1.1 is offered only to maintain forward compatibility with applications created with version 1.2 of the J2EE SDK.)
  2. If you selected bean-managed persistence, you should skip to the final three steps that have to do with the Primary Key Class field and the Reentrant checkbox.
  3. In the Fields To Be Persisted area, check the boxes next to instance fields that the container will save in the data store. These fields must be either primitive types, Serializable objects, or Remote reference types.
  4. In the Abstract Schema Name field enter the name of the entity bean's . This name may be referenced in an statement.
  5. To specify the bean's queries, click Finder/Select Methods. This takes us to the Finder/Select Methods dialog.
  6. To define the bean's relationships with other entity beans, select the bean's EJB Jar in the DeployTool file view (to the left in the primary window) and select the Relationships tab.
  7. To further specify the bean's persistence, click Deployment Settings. This takes us to the Deployment Settings dialog.
  8. In the Primary Key Class field, enter the class of the entity bean's . For example, if the data contained in your primary key field is of type String, enter java.lang.String.
  9. Select a variable name from the combo box labelled Primary Key Field Name.
  10. If you want your entity bean to be select the Reentrant checkbox. If your entity bean does not need callbacks, keep the default setting of .


Copyright 1999-2001 Sun Microsystems, Inc. All Rights Reserved.