Skip Headers

Oracle TopLink Developer's Guide 10g Release 3 (10.1.3) B13593-01 |
| Home | Solution Area | Contents | Index

Previous | Next |

# CMP Applications

After you build the WAR and JAR files (see "CMP Applications"), build them into an EAR file for deployment. To deploy the EAR file to your J2EE server, copy the EAR to a commonly used directory. You may also need to use server-specific deployment tools. For more information, see the server documentation.

This section describes:

- Deploying a CMP Application to OC4J

- Deploying a CMP Application to BEA WebLogic Server

- Deploying a CMP Application to IBM WebSphere Application Server 4.0

For additional information on server-specific configuration, see Chapter 7, "Integrating TopLink With an Application Server ``".

Optionally, you may also consider "Hot Deployment of EJB".

## Deploying a CMP Application to OC4J

The most efficient way to deploy a CMP application to OC4J is using Oracle Enterprise Manager 10g. For more information, see Oracle Application Server Administrator's Guide.

When you deploy a CMP application to OC4J:

- It performs a partial EJB conformance check on the beans and their associated interfaces.

- It builds the internal OC4J classes that manage security and transactions, as well as the RMI stubs and skeletons that enable client access to the beans.

- TopLink builds concrete bean subclasses and EJB finder method implementations.

## Deploying a CMP Application to BEA WebLogic Server

TopLink CMP support includes integration for BEA WebLogic Server. To enable TopLink CMP for BEA WebLogic entity beans, use the WebLogic EJB Compiler (ejbc) to compile the EJB JAR file, as follows:

- Run ejbc from the command line. Include the EJB JAR file as a command line argument. ejbc creates an EJB JAR file that contains the original classes as well as all required generated classes and files.

When you run ejbc:

- It performs a partial EJB conformance check on the beans and their associated interfaces.

- It builds the internal BEA WebLogic classes that manage security and transactions, as well as the RMI stubs and skeletons that enable client access to the beans.

- TopLink builds concrete bean subclasses and EJB finder method implementations.

For more information about running ejbc, see the BEA WebLogic Server documentation.

### Troubleshooting ejbc

When you start ejbc, it processes the data in a series of stages. If errors occur while running ejbc, attempt to determine which stage causes the problem. Common problems include the following:

- Bean classes that do not conform with the EJB specification

- Classes missing from the classpath (all domain classes, required TopLink classes, and all required BEA WebLogic classes must be on the classpath)

- Java compiler (javac) problems, often caused by using an incorrect version of the JDK

- A failure when generating the RMI stubs and skeletons (a failure of RMI compiler (rmic))

Refer to Chapter 15, "Troubleshooting Application Deployment" for additional information.

## Deploying a CMP Application to IBM WebSphere Application Server 4.0

TopLink CMP support includes an integration for IBM WebSphere application server 4.0. Use the following procedure to deploy your application to WebSphere applicaton server:

1. Use the TopLink Deploy Tool for WebSphere to compile the EJB JAR file. For more information, see "Using the WebSphere Deploy Tool".

2. Start the WebSphere Administration Server.

3. Start the Administration Console and deploy the compiled JAR file.

For more information about deploying the JAR file, see the IBM WebSphere application server documentation.

Note: When you deploy an application that contains an entity bean, set up a data source and associate it with the bean. For more information about how to create and associate data sources, see the IBM WebSphere application server documentation.

It is not necessary to deploy the EJB JAR file in WebSphere Studio Application Developer (WSAD), because deployment is carried out using the Deploy Tool (see "Using the WebSphere Deploy Tool").

### Starting the Entity Bean

You can start the bean in either the WebSphere application server or in WSAD.

To start the bean in IBM WebSphere application server, do the following:

1. Select the application that contains the entity beans.

2. Right-click and choose Start.

A message dialog box appears if the bean starts successfully. If an error occurs, consult Part V, "Troubleshooting a TopLink Application" for troubleshooting information.

To start the bean in WSAD, do the following:

1. Right-click the EJB project, and choose Run on Server.

2. To view the status of the process, open the Console tab of the Server view.