Skip Headers
Oracle® Application Development Framework Developer's Guide
10g Release 3 (10.1.3)
B25386-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

22.2 Deployment Steps

To deploy an application, you perform these steps:

Step 1: Install the ADF Runtime Library on the Target Application Server

Step 2: Create a Connection to the Target Application Server

Step 3: Create a Deployment Profile for the JDeveloper Project

Step 4: Create Deployment Descriptors

Step 5: Perform Additional Configuration Tasks Needed for ADF

Step 6: Perform Application Server-Specific Configuration

Step 7: Deploy the Application


Step 1 Install the ADF Runtime Library on the Target Application Server

This step is required if you are deploying ADF applications to third-party application servers, and optional if you are deploying on Oracle Application Server or standalone OC4J. See Section 22.12, "Installing ADF Runtime Library on Third-Party Application Servers" for installation steps.

JSF applications that contain ADF Faces components have a few additional deployment requirements:

Step 2 Create a Connection to the Target Application Server

In JDeveloper, create a connection to the application server where you want to deploy your application. Note that if your target application server is WebSphere, you can skip this step because JDeveloper cannot create a connection to WebSphere. For WebSphere, you deploy applications using the WebSphere console. See Section 22.9, "Deploying to WebSphere" for details.

To create a connection to an application server:

  1. In the Connections Navigator, right click Application Server and choose New Application Server Connection. The Create Application Server Connection wizard opens.

  2. Click Next to proceed to the Type page.

  3. On the Type page:

    • Provide a name for the connection.

    • In the Connection Type list box, select the application server type. You can deploy ADF applications on these application servers:

      • Standalone OC4J 10.1.3

      • Oracle Application Server (10.1.2 or 10.1.3)

      • WebLogic Server (8.x or 9.x)

      • JBoss 4.0.x

      • Tomcat 5.x

    • Click Next.

  4. If you selected Tomcat as the application server, the Tomcat Directory page appears. Enter the Tomcat's "webapps" directory as requested and click Next. This is the last screen for configuring a Tomcat server.

  5. If you selected JBoss as the application server, the JBoss Directory page appears. Enter the JBoss's "deploy" directory as requested and click Next. This is the last screen for configuring a JBoss server.

  6. On the Authentication page enter a user name and password that corresponds to the administrative user for the application server. Click Next.

  7. On the Connection page, identify the server instance and configure the connection. Click Next.

  8. On the Test page, test the connection. If not successful, return to the previous pages of the wizard to fix the configuration.

    If you are using WebLogic, you may see this error when testing the connection:

    Class Not Found Exception - weblogic.jndi.WLInitialContextFactory

    This exception occurs when weblogic.jar is not in JDeveloper's classpath. You may ignore this exception and continue with the deployment.

  9. Click Finish.

Step 3 Create a Deployment Profile for the JDeveloper Project

Deployment profiles are project components that govern the deployment of a project or application. A deployment profile specifies the format and contents of the archive file that will be created.

To create a deployment profile:

  1. In the Applications Navigator, select the project for which you want to create a profile.

  2. Choose File > New to open the New Gallery.

  3. In the Categories tree, expand General and select Deployment Profiles.

  4. In the Items list, select a profile type. For ADF applications, you should select one of the following from the Items list:

    • WAR File

    • EAR File

    • EJB JAR File

    You can also select Business Components Archive, if you are using ADF Business Components.

    If the desired item is not found or enabled, make sure you selected the correct project, and select All Technologies in the Filter By dropdown list.

    Click OK.

  5. In the Create Deployment Profile dialog provide a name and location for the deployment profile, and click OK.

    The profile, <name>.deploy, will be added to the project, and its Deployment Profile Properties dialog will open.

  6. Select items in the left pane to open dialog pages in the right pane. Configure the profile by setting property values in the pages of the dialog.

    Typically you can accept the default settings. One of the settings that you might want to change is the J2EE context root (select General on the left pane). By default, this is set to the project name. You need to change this if you want users to use a different name to access the application. Note that if you are using custom JAAS LoginModules for authentication with JAZN, the context root name also defines the application name that is used to look up the JAAS LoginModule.

  7. Click OK to close the dialog.

  8. Save the file to keep all changes.

To view or edit a deployment profile, right-click it in the Navigator, and choose Properties, or double-click the profile in the Navigator. This opens the Deployment Profile Properties dialog.

Step 4 Create Deployment Descriptors

Deployment descriptors are server configuration files used to define the configuration of an application for deployment and are deployed with the J2EE application as needed. The deployment descriptors a project requires depend on the technologies the project uses, and on the type of the target application server. Deployment descriptors are XML files that can be created and edited as source files, but for most descriptor types JDeveloper provides dialogs that you can use to view and set properties.

In addition to the standard J2EE deployment descriptors (for example: application.xml, web.xml, and ejb-jar.xml), you can also have deployment descriptors that are specific to your target application server. For example, if you are deploying on Oracle Application Server, you can also have orion-application.xml, orion-web.xml, and orion-ejb-jar.xml.

To create a deployment descriptor:

  1. In the Applications Navigator, select the project for which you want to create a descriptor.

  2. Choose File > New to open the New Gallery.

  3. In the Categories tree, expand General and select Deployment Descriptors.

  4. In the Items list, select a descriptor type, and click OK.

    If the desired item is not found, make sure you selected the correct project, and select All Technologies in the Filter By dropdown list. If the desired item is not enabled, check to make sure the project does not already have a descriptor of that type. A project may have only one instance of a descriptor.

    JDeveloper starts the Create Deployment Descriptor wizard or opens the file in the editor pane, depending on the type of deployment descriptor you selected.


Note:

For EAR files, do not create more than one deployment descriptor per application or workspace. These files are assigned to projects, but have workspace scope. If multiple projects in an application or workspace have the same deployment descriptor, the one belonging to the launched project will supersede the others. This restriction applies to application.xml, data-sources.xml, jazn-data.xml, and orion-application.xml.

To view or change deployment descriptor properties:

  1. In the Applications Navigator, right-click the deployment descriptor and choose Properties. If the context menu does not have a Properties item, then the descriptor must be edited as a source file. Choose Open from the context menu to open the profile in an XML editor window.

  2. Select items in the left pane to open dialog pages in the right pane. Configure the descriptor by setting property values in the pages of the dialog.

  3. Click OK when you are done.

To edit a deployment descriptor as an XML file:

Step 5 Perform Additional Configuration Tasks Needed for ADF

If your application uses ADF Faces components, ensure that the standard J2EE deployment descriptors contain entries for ADF Faces, and that you include the ADF and JSF configuration files in your archive file (typically a WAR file). When you create ADF Faces components in your application, JDeveloper automatically creates and configures the files for you.

Check that the WAR file includes the following configuration and library files:

If you are using ADF databound UI components as described in Section 5.2, "Using the Data Control Palette to Create Databound UI Components", check that you have the DataBindings.cpx file. For information about the file, see Section 5.3, "Working with the DataBindings.cpx File".

A typical WAR directory structure for a JSF application has the following layout:

MyApplication/
  JSF pages
  WEB-INF/
    configuration files (web.xml, faces-config.xml etc)
    tag library descriptors (optional)
    classes/
      application class files
      Properties files
    lib/
      commons-beanutils.jar
      commons-collections.jar
      commons-digester.jar
      commons-logging.jar
      jsf-api.jar
      jsf-impl.jar
      jstl.jar
      standard.jar

Step 6 Perform Application Server-Specific Configuration

Before you can deploy the application to your target application server, you may need to perform some vendor-specific configuration. See the specific application server sections later in this chapter.

Step 7 Deploy the Application


Note:

If you are running WebLogic 8.1, see Section 22.8.3, "WebLogic 8.1 Deployment Notes".

To deploy to the target application server from JDeveloper:

You can also use the deployment profile to create the archive file (EAR, WAR, or JAR file) only. You can then deploy the archive file using tools provided by the target application server. To create an archive file: