Skip Headers
Oracle® Fusion Applications Developer's Guide
11g Release 1 (11.1.3)

Part Number E15524-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

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

53 Running and Deploying Applications on Oracle WebLogic Server

This chapter provides a basic overview of the Oracle WebLogic Server environment and information about how to run your applications on Integrated WebLogic Server. It also provides information about how to deploy your applications to the Administration Server instance of WebLogic Server for the purpose of performing end-to end testing of new applications. If you are deploying customizations or extensions, see the Oracle Fusion Applications Extensibility Guide.

This chapter includes the following sections:

The scope of this chapter is limited to what is unique in the Oracle Fusion Applications environment. For general details about Oracle WebLogic Server, references are made to the generic Oracle Fusion Middleware guides.

53.1 Introduction to Deploying Applications to Oracle WebLogic Server

Deployment is the process of packaging application files as an archive file and transferring it to a target application server. You can use JDeveloper to deploy your Oracle Applications Development Framework (Oracle ADF) applications or SOA applications directly to Oracle WebLogic Server or indirectly to an archive file as the deployment target, and then install this archive file to the target server. You also can run Oracle ADF applications (but not SOA applications) in JDeveloper using Integrated WebLogic Server.

If you are using Integrated WebLogic Server, JDeveloper already provides the environment to run the application using the Run command. You do not need to create deployment descriptors or create standalone WebLogic Server domains. For more information on using Integrated WebLogic Server, see Section 53.2, "Running Applications on Integrated WebLogic Server."

If you are deploying the application to a standalone WebLogic Server instance, you must perform several tasks to prepare the application for deployment. You may need to create or edit deployment descriptors and deployment profiles to prepare the application.

Whether you are using standalone or Integrated WebLogic servers to host the application, you will need to configure the WebLogic domains for Oracle Fusion Applications. You must run the Configure Fusion Domain Wizard from JDeveloper to configure the Integrated WebLogic Server or create a property file that is used to configure standalone WebLogic Server instances. For more information about the wizard, see Chapter 2, "Setting Up Your Development Environment."

Table 53-1 describes some common deployment techniques that you can use during the application development and deployment cycle.

Table 53-1 Deployment Techniques for Development Environments

Deployment Technique Environment When to Use

Run directly from JDeveloper

Test or Development

When you are developing your application. You want deployment to be quick because you will be repeating the editing and deploying process many times.

JDeveloper contains Integrated WebLogic Server, on which you can run and test your application.

Use JDeveloper to directly deploy to the target application server

Test or Development

When you are ready to deploy and test your application on an application server in a test environment.

For example, you can also use the test environment to develop your deployment scripts.

Use JDeveloper to deploy to an EAR file, then use the Oracle WebLogic Server Administration console, WLST commands, or Enterprise Manager for deployment.

Test or Development

When you are ready to deploy and test your application on an application server in a test environment. As an alternative to deploying directly from JDeveloper, you can deploy to an EAR file. and then use other tools to deploy to the WebLogic Server instance.

You can also use the test environment to develop your deployment scripts.


All WebLogic Server instances within the same domain must be at the same major and minor version. Servers within a domain can be at different maintenance pack levels as long as the Administration Server instance of Weblogic Server is at the same maintenance pack level or higher than WebLogic Server instances called Managed Servers. For more information about the tasks that are required, see Section 53.3, "Preparing to Deploy Oracle ADF Applications to an Administration Server Instance of WebLogic Server."

After you have performed the tasks required for standalone deployment, you can use JDeveloper to deploy directly to a WebLogic Server instance or to create an Enterprise Archive (EAR) file and deploy the EAR file using WebLogic Server Administration Console, Enterprise Manager, or WebLogic Scripting Tool (WLST) commands.

For more information on how to deploy an application directly using JDeveloper, see Section 53.4, "Deploying Your Oracle ADF Applications to an Administration Server Instance of WebLogic Server."

For more information about deploying the application using WebLogic Server Administration Console, or WLST, see the Oracle Fusion Middleware Administrator's Guide and the Oracle Fusion Middleware Administrator's Guide for Oracle Application Development Framework.

Note:

This chapter discusses deploying applications. If you are deploying customizations or extension, see the "Deploying ADF Customizations and Extensions" and the "Deploying SOA Composite Customizations and Extensions" sections of the Oracle Fusion Applications Extensibility Guide.

53.1.1 Prerequisites for Deployment

Before you deploy an application, you should perform the following tasks:

  1. You must run the Configure Fusion Domain Wizard to set up the Integrated WebLogic Server domain or create a property file to be used to set up the standalone WebLogic Server domain. For instructions, see Chapter 2, "Setting Up Your Development Environment."

  2. If you want more debugging output, set the environment variable using one of the shell commands as shown in Example 53-1, before starting the Administration Server instance of WebLogic Server or before starting JDeveloper if you are going to run Integrated WebLogic Server.

    Example 53-1 Setting Environment Variable

    # For csh shell
    setenv JAVA_OPTIONS "$JAVA_OPTIONS -Djbo.debugoutput=console"
    #
    # For bash shell
    export JAVA_OPTIONS="$JAVA_OPTIONS -Djbo.debugoutput=console"
    
  3. You must disable the Auto Generate and Synchronize weblogic-jdbc.xml Descriptors During Deployment option to use the Global Java Database Connectivity (JDBC) datasource. To do this, open Application Properties and choose the Deployment category as shown in Figure 53-1. Unselect the Auto Generate and Synchronize weblogic-jdbc.xml Descriptors During Deployment option and click OK.

    Figure 53-1 Application Properties — Deployment Dialog

    Application Properties - Deployment

53.1.2 Introduction to the Standalone Administration Server WebLogic Server Instance

A Weblogic Server instance is a configured instance to host applications, such as Web applications, Enterprise applications, and Web services, and resources, such as Java Message Service (JMS), and JDBC, Diagnostics.

There are two types of WebLogic Server instances: Administration Server and Managed Server.

The Administration Server instance is the central configuration controller for the entire domain. Its purpose is to:

  • Host the Administration Console.

  • Enable you to start and stop the servers from a central location.

  • Enable you to migrate servers and services within the domain.

  • Enable you to deploy applications within the domain.

Figure 53-2 Administration Server Configuration

Administration Server Configuration

There is only one Administration Server instance of WebLogic Server in a domain, and an Administration Server instance of WebLogic Server controls only one domain.

A Managed Server WebLogic Server instance is a running instance that hosts the applications and the resources that are needed by those applications. Each Managed Server WebLogic Server instance is independent of all other Managed Server WebLogic Server instances in the domain, unless they are in a cluster. You can have as many Managed Server WebLogic Server instances as you need in a domain.

The Administration Server instance of WebLogic Server stores the master copy of the domain configuration, including the configuration for all Managed Server WebLogic Server instances in the domain. Each Managed Server WebLogic Server instance stores a local copy of its configuration. When a Managed Server WebLogic Server instance starts, it connects to the Administration Server instance of WebLogic Server to synchronize the configuration.

In most cases, a single server environment is used for development purposes. This is where a single server acts as the Administration Server instance of WebLogic Server and as the host for applications, as illustrated in Figure 53-3.

However, there are some teams that use a Managed Server for either Oracle Enterprise Scheduler (ESS) runtime or Service-Oriented Architecture (SOA). When you are setting up your standalone WebLogic server, you can choose one of the following options:

  • Administration Server - Oracle ADF (includes ESS libraries)

  • Administration Server - Oracle ADF + ESS Runtime

  • Administration Server - Oracle ADF and Managed Server - ESS Runtime

  • Administration Server - Oracle ADF and Managed Server - SOA

  • Administration Server and Managed Server - SOA

Figure 53-3 Single Server Environment

Single Server Environment

Figure 53-4 illustrates the structure of the domain directory:

Figure 53-4 Domain Directory Structure

Domain Directory Structure

You deploy applications to the Administration Server instance of WebLogic Server. Only Administration Servers and Managed Servers are used in a production environment. Therefore, all your end-to-end testing should be done using the Administration Server.

There are two types of Administration Servers:

  • Non-SOA

  • SOA

Not all components are available in both. For example, WebCenter libraries are not available in SOA and SOA libraries are not available in non-SOA. Oracle ADF applications containing UI must be deployed to the non-SOA WebLogic server, and SOA composites must be deployed to the SOA-configured WebLogic Server.

Some services have a SDO co-location requirement and need to be deployed to the SOA container. If the service must be deployed to the SOA-configured WebLogic Server, create a new EAR profile containing only that service or services from your application workspace.

For information about how to configure the SOA WebLogic Server, see Section 2.3, "Setting Up the Personal Environment for Standalone WebLogic Server."

53.2 Running Applications on Integrated WebLogic Server

Integrated WebLogic Server is a single server that is included within JDeveloper. You can run your applications directly on this server without needing to deploy. Integrated WebLogic Server is sufficient to run your application to make sure it displays correctly in browsers, or for testing and debugging portions of the application. However, real end-to-end testing should be done in an Administration Server instance of WebLogic Server because that is what will be used in a production environment.

Note:

You cannot use Integrated WebLogic Server to run SOA applications. You must deploy SOA applications to a standalone WebLogic Server instance. For more information, see Section 53.5, "Deploying Your SOA Projects to an Administration Server Instance of WebLogic Server."

Integrated WebLogic Server has already been configured with the Oracle Fusion Middleware Extensions for Applications (ApplCore) domain extension templates so all of the Oracle Fusion applications will run on Integrated WebLogic Server as they would in an Administration Server instance of WebLogic Server.

JDeveloper has a default connection to Integrated WebLogic Server and does not require any deployment profiles or descriptors.

When you run your application in JDeveloper using the run or debug commands, Integrated WebLogic Server starts automatically and your application runs in the target browser.

When you use JDeveloper to run an application for the first time, it automatically creates the Integrated WebLogic Server instance.

You can also start the server directly from within JDeveloper. To do this, go to the main menu and select Run > Start Server Instance.

Tip:

The first time Integrated WebLogic Server starts, it tries to use the first available port in the 7101 - 7105 range. The following message appears as the first line in the Default server log in JDeveloper. You should use the alternate port for all access:

HTTP port conflict detected. The HTTP port will be reassigned to port 7102.

The server and the application are considered separate entities, so even if you stop the application, it does not stop the server. To terminate the application, select the application name from the terminate button dropdown menu in the Server Instance Log page, as shown in Figure 53-5.

Figure 53-5 Terminating the Application

Terminating the application

To terminate the server, select the server name, as shown in Figure 53-6.

Figure 53-6 Terminating the Integrated WebLogic Server Instance

Terminating the WebLogic Server Instance

53.2.1 How to Deploy an Application with Metadata to Integrated WebLogic Server

When an application is running in Integrated WebLogic Server, the Metadata Archive (MAR) profile itself will not be deployed to a repository. Instead, a simulated Oracle Metadata Services (MDS) repository will be configured for the application that reflects the metadata information contained in the MAR. This metadata information is simulated and the application runs based on their location in source control.

Any customizations or documents created by the application are written to this simulated MDS repository directory. You can keep the default location for this directory or you can set it to a different directory. You also have the option to preserve customizations across different application runs or to delete the customizations before each application run.

Before you begin, you must first create your MAR deployment profile. For information about how to create a MAR deployment profile, see Section 53.3.2, "How to Create Deployment Profiles for Standalone WebLogic Server Deployment".

To deploy a MAR deployment profile to Integrated WebLogic Server:

  1. Go to the Application Navigator, right-click the application and select Application Properties.

  2. In the Application Properties dialog, expand Run and choose MDS. See Figure 53-7.

    Figure 53-7 Setting the Run MDS Options

    Setting the Run MDS Options
  3. In the Run MDS page:

    1. Select the MAR profile from the MAR Profile dropdown list.

    2. Enter a directory path in Override Location if you want to customize the location of the simulated repository.

    3. Select the Directory Content option. You can choose to preserve the customizations across application runs or delete customizations before each run.

53.3 Preparing to Deploy Oracle ADF Applications to an Administration Server Instance of WebLogic Server

You must prepare the application and the WebLogic Server instance before you deploy applications to an Administration Server instance of WebLogic Server.

Before you begin:

Before you deploy the application to a standalone WebLogic Server instance, you need to:

53.3.1 How to Reference the Shared Libraries

Shared libraries are available in the integrated and standalone WebLogic Server container and your projects must be updated so that they can use a shared library.

When you create your WebLogic Server domain, all the required shared libraries should be automatically created for you. When you choose a new technology or library in JDeveloper, the weblogic.xml and weblogic-application.xml files are automatically updated to reference these shared libraries. If, for some reason, the required references are not created automatically, you must update the weblogic.xml and weblogic-application.xml files manually.

The process below shows how to reference a sample oracle.shared.library shared library in a project.

To reference a shared library into a project:

  1. Go to Application Navigator, expand Application Resources > Descriptors > META-INF.

  2. Add reference shared library to weblogic-application.xml:

    1. Click the weblogic-application.xml file.

    2. Create a copy of the library-ref element.

      You can either accomplish this manually in the editor, or you can right-click the existing library-ref element to use the copy and paste options.

    3. Change the library-name element to oracle.shared.library. Leave the specification and implementation version values blank.

      Caution:

      Make sure that there are no blank spaces between the tag <library-ref> and the actual entry as they will cause problems.

    4. Repeat steps 2b and 2c to reference additional libraries.

  3. Add reference shared library to weblogic.xml using the same steps.

53.3.2 How to Create Deployment Profiles for Standalone WebLogic Server Deployment

The deployment profiles determine how the application is bundled and deployed to Standalone WebLogic Server. When running an application within JDeveloper using Integrated WebLogic Server, these deployment profiles are not used.

Tip:

When you run your application in JDeveloper Integrated WebLogic Server, these deployment profiles are not used. Instead, JDeveloper scans the entire workspace or the current working set, (if the Run Working Set option is enabled), to construct the class loader classpaths. If the data model project is eligible to be an EJB then the Libraries and Classpath entries from that project contribute to the application root class loader. The user interface project contributes to the web application class loader.

To deploy the application, you must create deployment profiles applicable to the project or projects. The deployment profiles you need depend on your application requirements. For example, an application may include Business Components Service Interface, Web Application Archive (WAR), and MAR profiles. Once you have defined these, create an EAR deployment profile for the application.

You can only deploy the application as an EAR file at the application level. Creating EAR files from the project level are incomplete and this option is disabled. The project level deployment profiles should be included in the EAR deployment profile.

Depending on the type of projects in your application, you may need to create the following deployment profiles:

  • Business Components Service deployment profile. For instructions, see the "How to Deploy Web Services to Oracle WebLogic Server" section of the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

  • EJB JAR deployment profile. For instructions, see the "Creating an EJB JAR Deployment Profile" section of the Oracle Fusion Middleware Java EE Developer's Guide for Oracle Application Development Framework.

  • WAR deployment profile. For instructions, see the "Creating a WAR Deployment Profile" section of the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework

  • MAR deployment profile. For instructions, see the "Creating a MAR Deployment Profile" section of the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework

  • EAR deployment profile. For instructions, see the "Creating an Application-Level EAR Deployment Profile" section of the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework

53.4 Deploying Your Oracle ADF Applications to an Administration Server Instance of WebLogic Server

You can deploy your Oracle ADF applications to a standalone WebLogic Server instance using JDeveloper or Ant commands.

Any necessary MDS repositories must be registered with the WebLogic Server instance. If the MDS repository is a database, the repository maps to a WebLogic Server system data source with MDS-specific requirements. Before you deploy the application, make sure to target this data source to the Administration Server instance of WebLogic Server. For more information about registering MDS, see the Oracle Fusion Middleware Administrator's Guide.

Note:

If you are using the WebLogic Server Administrative Console or WLST scripts to deploy an application packaged as an EAR file that requires MDS repository configuration in adf-config.xml, you must run the getMDSArchiveConfig WLST command to configure MDS before deploying the EAR file. MDS configuration is required if the EAR file contains a MAR file or if the application is enabled for Design Time at Runtime. For more information about WLST commands, see the Oracle Fusion Middleware WebLogic Scripting Tool Command Reference.

53.4.1 How to Create an Application Server Connection Using JDeveloper

To deploy your application using JDeveloper, you create a connection to the application server and then deploy the application.

To create an application server connection:

  1. Start WebLogic Server instance.

  2. Open your application in JDeveloper.

  3. Launch the Application Server Connection wizard.

    You can:

    • In the Application Server Navigator, right-click Application Servers and choose New Application Server Connection.

    • In the New Gallery, expand General, select Connections and then Application Server Connection, and click OK.

    • In the Resource Palette, choose New > New Connections > Application Server.

  4. Complete the wizard:

    1. Enter the following information as you progress through the wizard:

    2. Connection Name: Enter a name for the connection.

    3. Username and Password: Enter a user name and password for the administrative user authorized to access the application server.

    4. Weblogic Hostname Administration Server): Enter the name of the WebLogic Server instance containing the TCP/IP DNS where your application (.jar,.war,.ear) will be deployed.

    5. Port: Enter a port number for the Oracle WebLogic Server instance on which your application (.jar,.war,.ear) will be deployed.

    6. In the SSL Port field, enter an SSL port number for the Oracle WebLogic Server instance on which your application (.jar,.war,.ear) will be deployed.

    7. Select Always Use SSL to connect to the Oracle WebLogic Server instance using the SSL port.

    8. WebLogic Domain: Optionally enter a domain only if Oracle WebLogic Server is configured to distinguish nonadministrative server nodes by name.

    9. Test the connection.

    10. Click Finish to close the wizard and create your application server connection.

53.4.2 How to Deploy the Application Using JDeveloper

After you have created an application server connection and an EAR deployment profile, you can deploy the application to a standalone application server.

To deploy an application:

  1. Deploy your project to the application server:

    1. In the Application Navigator, right-click your application and choose Deploy > deployment profile.

    2. In the Deploy wizard Deployment Action page, select Deploy to Application Server and click Next.

    3. In the Select Server page, select the application server connection, and click Next.

    4. The WebLogic Options page appears. Select a deploy option and click Next.

      If the adf-config.xml file in the EAR file requires MDS repository configuration, the Deployment Configuration dialog appears for you to choose the target metadata repository or shared metadata repositories, as shown in Figure 53-8.

      Figure 53-8 MDS Configuration and Customization For Deployment

      MDS Configuration Customization.

      The Repository Name dropdown list allows you to choose a target metadata repository from a list of metadata repositories registered with the Administration Server instance of WebLogic Server. The Partition Name dropdown list allows you to choose the metadata repository partition to which the application's metadata will be imported during deployment. For more information about managing the MDS repository, see the Oracle Fusion Middleware Administrator's Guide.

      Note:

      If you are deploying an Oracle ADF application, do not use the Deploy to all instances in the domain option.

    5. Click Finish.

  2. Verify the run-time application as:

    http://httpHost:httpPORT/<CONTEXT>/faces/<landing jspx

    For example, http://server06.us.company.com:7001/UIPatternsDemo/faces/ServiceRequest

    http://server12.company.com:7001/D7Build1-ViewController-context-root/faces/TreeHomePage.jspx

53.4.3 How to Create an EAR File for Deployment

You can also use the deployment profile to create an archive file (EAR file). You can then deploy the archive file using Enterprise Manager, WLST, or the Oracle WebLogic Server Administration Console.

Although an application is encapsulated in an EAR file (which usually includes WAR, MAR, and JAR components), it may have parts that are not deployed with the EAR. For instance, ADF Business Services can be deployed as a JAR.

To create an EAR archive file:

  • In the Application Navigator, right-click the application containing the deployment profile, and choose Deploy > deployment profile > to EAR file.

53.5 Deploying Your SOA Projects to an Administration Server Instance of WebLogic Server

You can deploy your SOA projects using either JDeveloper or the other administration tools described in Table 53-1.

53.5.1 How to Deploy Your SOA Projects Using JDeveloper

This section discusses how to deploy your SOA projects into the Administration Server instance of WebLogic Server using JDeveloper.

The basic steps to deploying your SOA project from within JDeveloper are:

  1. Define a connection. For instructions to create an application server connection, see the "To create an application server connection" section of the Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite.

  2. Deploy the Project. For instructions to deploy a SOA project, see the "Deploying the Profile " section of the Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite

  3. Check the deployed SOA Project.

53.5.1.1 Check the Deployed SOA Project

You can check and run your deployed SOA project from two locations:

From Enterprise Manager on port 7001 by opening the Weblogic Hostname (Administration Server) URL for which you created the Connection, such as:

http://xyzzy-on.us.oracle.com:7001/em

After you log in, a screen similar to Figure 53-9 displays (the SOA tree in the left pane has been expanded and the first deployment has been selected):

Figure 53-9 Checking SOA Deployment from the EM

Checking SOA Deployment from the EM