Skip Headers
Oracle® TopLink Developer's Guide
10g Release 3 (10.1.3.1.0)

Part Number B28218-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

3 Understanding TopLink Development Tools

The TopLink runtime provides Java or J2EE applications with access to persistent entities stored in a data source. In addition to run-time capabilities, the TopLink Foundation Library includes the TopLink Application Programming Interface (API). This API enables applications to access TopLink run-time features.

TopLink includes additional development tools that simplify application development. These tools capture mapping and run-time configuration information in metadata files that TopLink passes to the application at run time.

TopLink application development includes the following:

TopLink metadata is the link between the two (see "Understanding TopLink Metadata").

Figure 3-1 illustrates how these elements interact with the data source.

Figure 3-1 TopLink Components in Development Lifecycle

Description of Figure 3-1 follows
Description of "Figure 3-1 TopLink Components in Development Lifecycle"

Development Environment

To create a TopLink application, use TopLink Workbench to map objects to data sources using relational and nonrelational models. Capture the resulting mappings and additional run-time configurations in the TopLink project file (project.xml) and build a session configuration file (sessions.xml). These files together represent your entire TopLink project, as shown in Figure 3-2.

During development, you can use the TopLink API to define query and transaction logic. When you use entity beans, there is generally little or no direct use of the TopLink API and there is no session or sessions.xml file.

Figure 3-2 TopLink Workbench in Development Environment

Description of Figure 3-2 follows
Description of "Figure 3-2 TopLink Workbench in Development Environment"

TopLink Workbench can import compiled entity classes (Java objects or EJB entity beans), as well as relational or nonrelational schemas through a JDBC driver (configured by the developer). Because TopLink imports the object and relational models for mapping, developers can develop the two models relatively independently from the mapping phase of a project development.

TopLink Run-Time Environment

The TopLink Foundation Library provides the TopLink run-time component. Access the run-time component either directly through the TopLink API or indirectly through a J2EE container when using entity beans with container-managed persistence. The run-time environment is not a separate or external process–it is embedded within the application. Application calls invoke TopLink to provide persistence behavior. This function allows for transactional and thread-safe access to shared database connections and cached objects.

In addition to J2EE environments, TopLink fully supports non-J2EE environments as well. See "Selecting an Architecture With TopLink" for more information.