Oracle® Application Server TopLink Application Developer's Guide
10g Release 2 (10.1.2) Part No. B15901-01 |
|
Previous |
Next |
This chapter introduces a basic approach to packaging that offers consistency across your projects, and the flexibility to work with projects of all kinds.
The OracleAS TopLink approach to deployment includes packaging application files into a single file, such as a Java archive (JAR) file or an enterprise archive (EAR) file. This approach enables you to create clean and self-contained deployments that do not require significant file management.
After you create these files, you deploy the project.
As an integral part of the enterprise application, OracleAS TopLink provides persistence and object-to-relational mapping functions. In most cases, the client does not interact with OracleAS TopLink directly; instead, clients access a client application that passes requests to OracleAS TopLink. As a result, there are two important steps to OracleAS TopLink deployment: Make the packaged OracleAS TopLink application available; and add code to the client application to invoke OracleAS TopLink.
The goal of deployment is to provide the project to the client applications. Before you attempt to deploy an OracleAS TopLink application, you must complete the following:
Build the project elements, including beans, classes, and datasources.
Define the application mappings in OracleAS TopLink Mapping Workbench.
Build the application deployment files. Use OracleAS TopLink Mapping Workbench and the OracleAS TopLink Sessions Editor to create the files.
Package and deploy the application.
Add code to the client application to enable it to access the OracleAS TopLink application.
You can deploy the application mappings that you define in OracleAS TopLink Mapping Workbench with your application as an XML file or as a compiled Java class. OracleAS TopLink Mapping Workbench supports exporting for both these formats.
The more traditional approach to deployment is to export Java source files from OracleAS TopLink Mapping Workbench. It requires you to recompile the resulting Java files.
XML deployment files offer better flexibility both before and after deployment, and are easier to troubleshoot if a problem occurs. Because of this, in most cases, you should deploy your project using XML files rather than Java source files.