Mapping beans to database tables

The mappings between database tables and columns and container-managed entity bean fields and container-managed relations are maintained in the WebLogic-specific deployment descriptor, weblogic-cmp-rdbms-jar.xml. This file can be edited either by using the Mapping Editor or by directly editing the file.

The data source used by a container-managed entity bean can be edited using the WebLogic extensions page of the EJB Deployment Descriptor Editor. See Working with the WebLogic extensions page for details.

Prerequisite: The EJB project must be targeted to a WebLogic server runtime.

To edit EJB module mappings using the Mapping editor:

  1. Switch to the J2EE perspective.
  2. In the Project Explorer view, right-click the EJB project and select EJB to RDB Mapping > Generate Map.
  3. The Mapping Editor is displayed. Define mappings between your enterprise beans and database elements such as tables and views. See the IBM Rational Developer documentation Mapping editor for details on how to use the editor.

To directly edit the weblogic-cmp-rdbms-jar.xml file associated with an EJB module:

  1. Switch to the J2EE perspective.
  2. In the Project Explorer view, expand the EJB project.
  3. A folder will be available for each version of WebLogic that is enabled for the project. These are labeled wls81 (for WebLogic Server 8.1), wls70 (for WebLogic Server 7.0) or wls61 (for WebLogic Server 6.1).
  4. Expand the WebLogic folder and double-click on weblogic-cmp-rdbms-jar.xml to open the file in the XML editor.

See the BEA WebLogic Server documentation for details on how WebLogic CMP and CMR mappings should be configured.

Related concepts
Enabling WebLogic support

Related tasks
Working with the WebLogic extensions page

Terms of use | Feedback
(C) Copyright IBM Corporation 2002, 2004. All Rights Reserved.