Creating Oracle ADF Data Controls for JavaBeans with TopLink Mappings

If you use TopLink POJO as your business service technology, model information will be exposed to the view and controller layers through ADF data control interfaces implemented by thin, Oracle-provided adapter classes.

To create adapter classes and data controls:

  1. In the navigator, select the Model project which contains the model objects you want to expose to the application client.
  2. In the model project, right-click the bean and choose Create Data Control.

    OR:

    Drag the bean from the Application Navigator onto the Data Control Palette to create the data controls.

  3. If your TopLink project includes a TopLink sessions.xml file, you will be prompted to either choose a TopLink server session or base the data control directly on the TopLink deployment descriptor. If your TopLink Project does not include a TopLink sessions.xml file, you will be given the option to base the data control directly on the TopLink deployment descriptor or cancel data control creation.

    Note: We recommend using a TopLink sessions.xml file. This allows you to have multiple clients share a single TopLink UnitOfWork (transaction), providing a consistent view of data across data controls. If you base your data control directly on the TopLink deployment descriptor, each client will be forced to use a separate TopLink UnitOfWork, which may interfere with data consistency. For more information, see the related topics list.

  4. If your bean defines attributes or methods that return a Collection type, you must specify the return type for the data control.

JDeveloper adds the data control definition file (DataControls.dcx ) to the model project. The .dcx file identifies the Oracle ADF model layer adapter classes that facilitate the interaction between the client and the available business services.

To view the business services you have registered for use with your client application:


Working with JavaBean Components in the Model Project
Working with TopLink Objects in the Model Project
About the Oracle ADF Data Controls for JavaBeans and TopLink-based Bean Components
About the Data Control Palette
About the TopLink Sessions Editor

 

 

Copyright © 1997, 2004, Oracle. All rights reserved.