Skip Headers
Oracle® Fusion Middleware Developer's Guide for Oracle WebCenter
11g Release 1 (11.1.1)
E10148-02
  Go To Documentation Library
Library
Go To Product List
Product
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

25 Testing and Deploying Your WebCenter Application

This chapter describes how to test custom WebCenter applications on Integrated WebLogic Server (Integrated WLS Server) that comes packaged with Oracle JDeveloper. This chapter also describes how to deploy applications using JDeveloper, to Oracle WebLogic Managed Server instances configured to test application deployment or host applications for the production purpose. For information about deploying custom WebCenter applications through other tools, such as, Oracle Enterprise Manager Fusion Middleware Control, Oracle WebLogic Administration Console, and WLST commands, see the chapter, "Deploying WebCenter Applications" in Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter.

This chapter includes the following sections:

25.1 Introduction to Oracle WebLogic Servers

This section provides an overview of Integrated WLS Server and Oracle WebLogic Managed Server (managed server). Using Oracle JDeveloper, you can test your applications on Integrated WLS Server and deploy applications to managed servers that reside outside Oracle JDeveloper.

Integrated WLS Server

Integrated WLS Server (Default Server) comes packaged with Oracle JDeveloper. The Default Server connection appears as IntegratedWLSConnection in Application Server under IDE Connections in the Resource Palette. The Default Server is meant for quick and easy testing of applications in development environments.

When the Default Server is started, an instance of the server is created once for all applications. You can run multiple applications simultaneously. When an application is run on the Default Server, a server instance, named after the application, is created.

Testing custom WebCenter applications on Integrated WLS Server is easy because:

Oracle WebLogic Managed Server

A managed server hosts applications and the resources needed by those applications. A domain, which is a logically related group of Oracle WebLogic Server resources, can have any number of managed servers. An Administration Server manages these servers. Managed servers can be deployed to hold production applications or test or both.

25.2 Testing a Custom WebCenter Application on Integrated WLS Server

When you run an application on the Default Server, a server instance named after the application is created. You can watch the progress of each application in the Run Manager panel. The Run Manager panel also lets you stop the Default Server instances.

This section includes the following:

25.2.1 How to Run a Custom WebCenter Application on Integrated WLS Server

Since Integrated WLS Server is preconfigured to run applications in Oracle JDeveloper, you are not required to create deployment profiles.

To run a custom WebCenter application, right-click the .jspx page in the project folder and select Run. Clicking Run triggers packaging and deployment of your custom WebCenter application on an instance of Integrated WLS Server named after the application.

You can see the DefaultServer Log window to know how the activity is progressing.


Note:

When the Integrated WLS Server instance stops, the application is undeployed, and therefore, becomes unavailable.

For a more persistent testing scenario, you can deploy your application to Integrated WLS Server by right-clicking the application and then selecting Deploy. This deploys the application to the Default Server instance and it is always available when the Default Server is running. If you choose this method, then you must first create deployment profiles, as described in Section 25.3.2, "How to Create Deployment Profiles". If you deploy your application to Integrated WLS Server, then the Deployment Configuration dialog displays to let you configure and customize deployment settings. The file system MDS repository pre-created by JDeveloper displays in the Repository Name field.


25.2.2 What Happens When You Run a WebCenter Application on Integrated WLS Server

Oracle WebCenter temporarily modifies mds-config in the adf-config.xml file to reconfigure the directory paths for the running application. It provides the menu option Build > Clean Runtime MDS Customizations that lets you remove view-oriented customizations made during testing.

Secure attributes and credentials are migrated by default when running a custom WebCenter application on Integrated WLS Server.

Integrated WLS Server creates an archive directory of your custom WebCenter application at system_directory/o.j2ee/drs.

25.3 Deploying a Custom WebCenter Application to an Oracle WebLogic Managed Server Instance

This section describes how to deploy a custom WebCenter application to an Oracle WebLogic Managed Server instance using JDeveloper. From JDeveloper, you can deploy an application for the testing purpose, or to hold the application in a production environment.

For information about deploying custom WebCenter applications through Fusion Middleware Control, Oracle WebLogic Administration Console, and WLST commands, see the chapter, "Deploying WebCenter Applications" in Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter.

This section includes the following:

25.3.1 What You May Need to Know About Database Connections and Application Security Migration When Deploying Custom WebCenter Applications

This section describes database connections- and application security-related points that you should consider before deploying any custom WebCenter applications.

Custom WebCenter applications use database connection types: JDBC DataSource and JDBC URL. Depending upon the database connections used by an application and tools to be used to deploy or test an application, you can choose which approach out of those discussed in this section is best suited to set up or migrate connection credentials in development and production modes.

This section also describes security migration for applications that use database connections specifying passwords and external applications with shared or public credentials.

This section includes the following sub sections:

25.3.1.1 What You May Need to Know About JDBC DataSource

This section describes what types of JDBC data sources can be created, what these data sources consist of, and which type to choose and when.

  • Application-level data source with password indirection: JDeveloper generates this data source when you run an application on Integrated WLS Server. That is, to generate application-level data source with password indirection, the Auto Generate and Synchronize weblogic-jdbc.xml Descriptors During Deployment checkbox is selected by default in the Application Properties dialog, as shown in Figure 25-1. In this case, JDeveloper uses MBean calls to pass the database passwords to the Integrated WLS Server.

    Figure 25-1 Auto Generate and Synchronize weblogic-jdbc.xml Descriptors During Deployment Checkbox

    Description of Figure 25-1 follows
    Description of "Figure 25-1 Auto Generate and Synchronize weblogic-jdbc.xml Descriptors During Deployment Checkbox"

    To generate an application-level indirection data source, JDeveloper does the following:

    • Generates a *-jdbc.xml file for each connection stored in the Application Resources.

    • Sets the indirect password attribute in the jdbc.xml file:

      <jdbc-driver-params>
      <use-password-indirection>true</use-password-indirection>
      </jdbc-driver-params>
      
    • Adds each *-jdbc.xml file as a module in the weblogic-application.xml file.

    • Adds a resource reference to each JDBC JNDI name in the web.xml file, if this file exists.

    If you choose to generate application data source with password indirection, then you must add credential mappings using Oracle WebLogic Administration Console to be able to activate the application. For more information on adding credential mappings, see the section "Creating a JDBC Data Source" in Oracle Fusion Middleware Configuring and Managing JDBC for Oracle WebLogic Server.


    Note:

    Do not use WLST commands to deploy applications that use application-level data sources with password indirection, because WLST cannot set password indirection credential mappings on the server.

  • Global data source: Choose this type of data source if you plan to deploy applications through Fusion Middleware Control, Oracle WebLogic Administration Console. This data source is also recommended when you deploy an application to an EAR file and then deploy the EAR file through WLST (wldeployer) command to a managed server running in production mode.

    Deselect the Auto Generate and Synchronize weblogic-jdbc.xml Descriptors During Deployment checkbox so that JDeveloper does not create an application-level data source with password indirection. Instead, create the global data source using Oracle WebLogic Administration Console after deploying an application to a managed server in production mode. For more information on creating global data sources, see the section "Creating a JDBC Data Source" in Oracle Fusion Middleware Configuring and Managing JDBC for Oracle WebLogic Server.

25.3.1.2 What You May Need to Know About JDBC URL

For applications that use the JDBC URL connection type, a credential store consisting of jps-config.xml and cwallet.sso files is created for each application. These files are stored in the META-INF directory of the application.

25.3.1.3 What You May Need to Know About Application Security Migration

The following is applicable if you configured security in your application using the Configure ADF Security wizard, or the application contains connections with secure attributes, for example, database connection password, external applications with shared or public credentials:

Credential Migration

If you do not intend to migrate credentials, then deselect the Credentials checkbox in the Security Deployment Options section in the Application Properties dialog (see Figure 25-2)

Figure 25-2 Security Deployment Options

Description of Figure 25-2 follows
Description of "Figure 25-2 Security Deployment Options"

If you retain the default selection in the Security Deployment Options section, then the credential migration will behave as follows, depending on if the WebLogic domain is in development or production mode:

  • To enable credential migration for an application to be deployed in development mode, start the managed server with -Djps.app.credential.overwrite.allowed=true, by adding the following option to the setDomainEnv.cmd or setDomainEnv.sh file located in domain\bin:

    set EXTRA_JAVA_PROPERTIES=-Djps.app.credential.overwrite.allowed=true %EXTRA_JAVA_PROPERTIES%
    
  • When you deploy a custom WebCenter application to a managed server running in production mode, secure attributes of the connections packaged within your application and any shared or public credentials specified for external applications are not migrated to the domain-level credential store. This is because secure properties are likely to be different between development and production environments. Therefore, you must reconfigure secure attributes of connections and shared or public credentials for external applications using WLST commands or Fusion Middleware Control, as described in Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter.

    For more information on credential migration behavior, see the section "Configuring the Credential Store" in Oracle Fusion Middleware Security Guide.

Identity Migration

In Figure 25-2, in the Security Deployment Options section, the Users and Groups checkbox is selected by default. This indicates that the users and groups created in the application's jazn-data.xml file will be migrated to the identity store configured on the WebLogic Managed Server, if the authenticator configured in the domain allows creation of users and groups. It is recommended that you deselect this option because, typically, users and groups in the managed server's identity store should be used to access the application.

Policy Migration

The Application Policies checkbox must always be selected.

25.3.2 How to Create Deployment Profiles

To deploy your application to a WebLogic Server that resides outside JDeveloper, you must first create deployment profiles. A deployment profile packages or archives a custom WebCenter application and associated files so that the application can be deployed to an Oracle WebLogic Managed Server instance. Deployment profiles are created at project and application level. At the project level, a WAR profile is created. This file packages a Web application as a Web Application Archive (WAR) file. It contains the projects to be deployed and any associated files, such as, pages, Java classes, weblogic.xml, web.xml, and so on. At the application level, an EAR file is created. This file packages the complete application as an Enterprise Archive (EAR) file. The EAR file contains application artifacts such as, adf-config.xml, connections.xml, weblogic-application.xml, jazn-data.xml, metadata archive files (.mar), and all project-related WAR files. For custom WebCenter applications, the MAR is automatically generated and included in the EAR file, if there is MDS metadata to be packaged.


Note:

You can deploy Oracle ADF applications, such as custom WebCenter applications, only as EAR files. Therefore, while creating deployment profiles, ensure that the WAR and MAR files of the application are included in the application's EAR file.

To create a project-level WAR deployment profile:

  1. Right-click ViewController and select New.

  2. In the New Gallery, expand General, select Deployment Profile, then WAR File, and then click OK.

  3. In the Create Deployment Profile -- WAR File dialog, enter a name for your deployment profile and click OK.

  4. In the WAR Deployment Profile Properties dialog, select the Specify Java EE Web Context Root option and enter a meaningful context root. Then click OK.

  5. In the Project Properties dialog, click OK.

To create an application-level EAR deployment profile:

  1. From the File menu, choose New.

  2. In the New Gallery, expand General, select Deployment Profile, then EAR File, and then click OK.

  3. In the Create Deployment Profile -- EAR File dialog, enter a name for your deployment profile and click OK.

  4. In the Edit EAR Deployment Profile Properties dialog, select Application Assembly, then select the project WAR you want to make available in the project file. Click OK.

  5. In the Application Properties dialog, click OK.

  6. In the Application Navigator, right-click the application name, choose Deploy, deployment profile name, to, and then choose to EAR file. This creates the .ear file in the deploy folder located in JDEV_HOME\mywork\application_name\deploy\, as shown in Figure 25-3.

    Figure 25-3 EAR Status in Deployment - Log

    Description of Figure 25-3 follows
    Description of "Figure 25-3 EAR Status in Deployment - Log"

25.3.3 How to Create and Provision an Oracle WebLogic Managed Server Instance

To deploy a custom WebCenter application to a WebLogic Managed Server instance, you must first create a server instance and provision it with a required set of shared libraries, as described in the section "Creating and Provisioning a WebLogic Managed Server Instance" in Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter.

25.3.4 How to Create and Register the Metadata Service Repository

After creating the WebLogic Managed Server instance, you must create and register a Metadata Service Repository (MDS) schema for the application on the WebLogic Domain's Administration Server instance, as described in the section "Creating and Registering the Metadata Service (MDS) Repository" in Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter.

25.3.5 How to Create a WebLogic Managed Server Connection

From Oracle JDeveloper, you can deploy your applications to Oracle WebLogic Managed Server instances that reside outside JDeveloper. To do this, you must first create a connection to the server instance to which you want to deploy your application.

Before you create a connection to an Oracle WebLogic Managed Server instance, ensure that the server instance is up and running.

To create a WebLogic Managed Server connection:

  1. From the File menu, select New.

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

  3. In the Create Application Server Connection wizard, on Step 1, enter a name for the new connection, for example, WebCenterServer. Then click Next.

  4. On Step 2, specify user name and password for authentication. Click Next.

  5. On Step 3, enter the host name of the WebLogic Managed Server instance, for example, webcenter.myserver.oracle.com and the port number, for example, 7001.

  6. In the WLS Domain, specify the name of the domain in which the WebLogic Managed Server instance is created, for example, wl_server. Click Next.

  7. On Step 4, click Test Connection. The connection is set up if the test is successful.

25.3.6 How to Deploy a Custom WebCenter Application to an Oracle WebLogic Managed Server Instance

After you have created the deployment profiles and server connection, you can deploy your custom custom WebCenter application to this server instance.

To deploy a WebCenter application:

  1. In the Application Navigator, open the application to be deployed.

  2. From the Application Navigator, select the application, choose Deploy, deployment profile name, to, and then choose the connection name.

  3. In the Select Deployment Target dialog, as shown in Figure 25-4, select the name of the managed server, for example, WLS_CustomApps, and click OK.

    Figure 25-4 Select Deployment Targets dialog

    Description of Figure 25-4 follows
    Description of "Figure 25-4 Select Deployment Targets dialog"

  4. In the Deployment Configuration dialog, under the MDS tab, in the Repository Name, select the metadata repository to be used by the application you are deploying, as shown in Figure 25-5.

    Figure 25-5 Deployment Configuration dialog

    Description of Figure 25-5 follows
    Description of "Figure 25-5 Deployment Configuration dialog"

  5. In the Partition Name field, specify the application's partition name. Each application is recommended to have its own partition. The application name can be used as the partition name.

  6. Under the Connections tab, modify the connections packaged with the custom WebCenter application being deployed.


    Note:

    In the Connections tab, you cannot change secure properties of the connections. It is recommended that you modify these connections post-deployment using Fusion Middleware Control. For information, see the chapter "Managing Services" in Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter.

  7. Click Deploy. The Deployment - Log displays the deployment status, as shown in Figure 25-6.

    Figure 25-6 Deployment - Log

    Description of Figure 25-6 follows
    Description of "Figure 25-6 Deployment - Log"

25.3.7 What Happens When You Deploy A WebCenter Application to an Oracle WebLogic Managed Server Instance

During the deployment to an Oracle WebLogic Managed Server instance, the EAR file is generated. The EAR file packages the metadata archive (MAR file), which includes the metadata content to be deployed to an MDS repository. Additionally, the adf-config.xml file is reconfigured with a modified mds-config for the target deployment environment. Application-wide features, security, caching, and change persistence remain unchanged. Properties for other Oracle components, if any, are also configured in this file. Similarly, JSF and JSTL shared libraries are added in the weblogic.xml file during packaging.

25.4 Transporting Customizations Between Environments

When migrating a deployed application to a new environment, post-deployment customizations made to pages, WebCenter Web 2.0 Services, and portlets (PDK-Java and WSRP version 2 producers) must be migrated too. Export and import utilities are available to assist this process. For more information, see the chapter, "Managing Backup, Recovery, Export, and Import of WebCenter" in Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter.