10 Deploying Applications

Deployment is the process of packaging application files as an archive file and transferring them to a target application server. This chapter describes how to deploy, redeploy, and undeploy applications to Oracle Fusion Middleware.

Topics:

Overview of Deploying Applications

Oracle WebLogic Server provides a Java EE-compliant infrastructure for deploying, undeploying, and redeploying Java EE-compliant applications and modules.

The following topics describe:

What Types of Applications Can You Deploy?

You can deploy the following into Oracle WebLogic Server:

  • A complete Java EE application packaged as an Enterprise Archive (EAR) file.

  • Standalone modules packaged as Java Archive files (JARs) containing Web services, Enterprise JavaBeans (EJBs), application clients (CARs), or resource adapters (RARs).

  • An ADF application. Oracle Application Development Framework (Oracle ADF) is an end-to-end application framework that builds on Java Platform, Enterprise Edition (Java EE) standards, and open-source technologies to simplify and accelerate implementing service-oriented applications.

  • An Oracle SOA Suite composite application. A SOA composite application is a single unit of deployment that greatly simplifies the management and lifecycle of SOA applications.

  • An Oracle WebCenter Portal application. WebCenter Portal applications differ from traditional Java EE applications in that they support run-time customization, including the application's pages, the portlets contained within these pages, and document libraries.

A Metadata Archive (MAR) is a compressed archive of selected metadata, such as the application-level deployment profile, for an application. A MAR is used to deploy metadata content to the metadata service (MDS) repository. The following application types use a MAR as a container for content that is deployed to the MDS Repository: ADF applications, SOA composite applications, and Oracle WebCenter Portal applications.

Note:

If your application uses password indirection in the application-level data source, you cannot use Fusion Middleware Control to deploy the application. The section "Deploying an Application to an EAR File to run on Oracle WebLogic Server" in the Oracle JDeveloper Help describes how to change the settings of the application to be able to deploy the application using Fusion Middleware Control.

You can use Fusion Middleware Control, Oracle WebLogic Server Administration Console, Oracle JDeveloper, or the command line to deploy, undeploy, or redeploy an application. Which method you use depends on the type of application, as described in Table 10-1.

Table 10-1 Tools to Deploy Applications

Type of Application Tools to Use

Pure Java EE application

Oracle WebLogic Server Administration Console

Fusion Middleware Control: Deployment Wizard

Oracle JDeveloper

WLST command line

ADF application

Fusion Middleware Control: Deployment Wizard

Oracle JDeveloper

WLST command line

SOA Composite application

Fusion Middleware Control: SOA Composite Deployment Wizard

Oracle JDeveloper

WLST command line

WebCenter Portal application

Fusion Middleware Control: Deployment Wizard

Oracle JDeveloper

WLST command line

If your application uses an MDS Repository, you must register the repository with the Oracle WebLogic Server domain before you deploy your application. Applications such as custom Java EE applications developed by your organization and some Oracle Fusion Middleware component applications, such as Oracle B2B and Oracle Web Services Manager, use an MDS Repository. For information about the MDS Repository and registering the repository, see Managing the MDS Repository.

Note:

If your application contains an application-level credential store, and you are moving the application from a test to a production environment, you must reassociate the credential store, as described in Reassociating the Domain Policy Store in Securing Applications with Oracle Platform Security Services.

About Deployment, Redeployment, and Undeployment

When you deploy an application, you deploy it to the application server for the first time.

When you redeploy an application, you can:

  • Redeploy a new version of the application; the previous version is still available, but the state is set to "Retired."

    This is known as the production redeployment strategy. Oracle WebLogic Server automatically manages client connections so that only new client requests are directed to the new version. Clients already connected to the application during the redeployment continue to use the older version of the application until they complete their work, at which point Oracle WebLogic Server automatically retires the older application.

  • Redeploy the same version of the application or redeploy an application that is not assigned a version; the application version you select is replaced with the new deployment.

  • Redeploy a previous version of the application; the earlier, retired version is set to "Active" and the later version is set to "Retired."

When you undeploy an application, Oracle WebLogic Server stops the application and removes staged files from target servers. It does not remove the original source files used for deployment.

Understanding and Managing Data Sources

A data source is a Java object that application components use to obtain connections to a relational database.

The following topics describe data sources and how to manage them:

About Data Sources

A data source is a Java object that application components use to obtain connections to a relational database. Specific connection information, such as the URL or user name and password, are set on a data source object as properties and do not need to be explicitly defined in an application's code. This abstraction allows applications to be built in a portable manner, because the application is not tied to a specific back-end database. The database can change without affecting the application code.

Applications use the Java Naming and Directory Interface (JNDI) API to access a data source object. The application uses a JNDI name that is bound to the data source object. The JNDI name is logical and can be mapped to any data source object. Like data source properties, using JNDI provides a level of abstraction, since the underlying data source object can change without any changes required in the application code. The result is that the details of accessing a database are transparent to the application.

See Administering JDBC Data Sources for Oracle WebLogic Server for more information about data sources.

When you configure certain Oracle Fusion Middleware components, such as Oracle SOA Suite, using the Oracle WebLogic Server Configuration Wizard, you specify the data source connection information. If the components use the MDS Repository, the Configuration Wizard prepends mds- to the data source name to indicate that the data source is a system data source used by MDS Repository.

See Creating WebLogic Domains Using the Configuration Wizard for information about specifying data sources with the Configuration Wizard.

If you are using Oracle Real Application Clusters (Oracle RAC) or Oracle Fusion Middleware Cold Failover Cluster, you must configure one of the following types of data sources:

  • Multi data sources

    To use multi data sources, you must use the Oracle WebLogic Server Administration Console. Note that if you create a multi data source and you add an existing MDS data source to it, the data source you added is no longer considered a valid MDS Repository. The repository is not displayed in Fusion Middleware Control or Oracle WebLogic Server Administration Console. For example, the MDS Repository is not listed in the Fusion Middleware Control navigation pane and is not displayed as a choice for a target metadata repository when you deploy an application.

  • GridLink data sources

    To use GridLink data sources, you can use the Oracle WebLogic Server Administration Console or Fusion Middleware Control, as described in Creating a GridLink Data Source Using Fusion Middleware Control.

See Administering JDBC Data Sources for Oracle WebLogic Server for more information about configuring multi data sources and GridLink data sources.

Creating and Managing JDBC Data Sources

You can create and manage JDBC data sources using the following management tools:

  • The Oracle WebLogic Server Administration Console

  • The WebLogic Scripting Tool (WLST)

  • Fusion Middleware Control

To create an MDS data source manually, you should use Fusion Middleware Control or WLST to set the correct attributes for the data source. The MDS data source is displayed in the navigation pane in Fusion Middleware Control and in the domain structure in the Administration Console. If your application uses an MDS Repository, you must register the repository with the Oracle WebLogic Server domain before you deploy your application. For information about the MDS Repository and registering the repository, see Managing the MDS Repository.

Note:

When you create the data source, you must use the MDS schema created by the Repository Creation Utility (RCU), not other schemas.

Although it is not recommended, you can also use the Oracle WebLogic Server Administration Console to create a MDS data source. If you do, note the following:

  • You must prefix the data source name with mds- if you intend it to be used with MDS Repository.

  • You must target the data source to the Administration Server and to all Managed Servers to which you are deploying applications that need the data source.

  • You must turn off global transactions.

See Administering JDBC Data Sources for Oracle WebLogic Server for information about creating and managing a data source using the Oracle WebLogic Server Administration Console or WLST and for more information about configuring multiple data sources.

The following topics describe how to create and manage JDBC data sources with Fusion Middleware Control:

Creating a JDBC Data Source Using Fusion Middleware Control

To create a JDBC data source using Fusion Middleware Control:

  1. From the WebLogic Domain menu, choose JDBC Data Sources.

    The JDBC Data Sources page is displayed, as shown in the following figure:

  2. From Create, select Generic Data Source.
  3. Follow the instructions in the wizard to set the properties of the data source and to target the data source for one or more of the Managed Servers in the domain.

    For help on individual fields and properties, use your mouse to give focus to a field. Fusion Middleware Control displays a popup definition of the field.

    Note that the data source properties you define in Fusion Middleware Control are similar to those you define when creating data sources in the Oracle WebLogic Server Administration Console. As a result, you can also refer to Creating a JDBC Data Source in Administering JDBC Data Sources for Oracle WebLogic Server for more information about the data source properties.

Editing a JDBC Data Source Using Fusion Middleware Control

To edit an existing JDBC data source using Fusion Middleware Control:

  1. From the WebLogic Domain menu, choose JDBC Data Sources.

    The JDBC Data Sources page is displayed.

  2. Click the data source that you want to edit.

    The page for that particular JDBC Data Source is displayed.

  3. Use the tabs on this page to modify the properties of the selected data source.

    For help on individual fields and properties, use your mouse to give focus to a field. Fusion Middleware Control displays a popup definition of the field.

    Note that the data source properties you edit in Fusion Middleware Control are similar to those you edit when editing data sources in the Oracle WebLogic Server Administration Console. As a result, you can also refer to Creating a JDBC Data Source in Administering JDBC Data Sources for Oracle WebLogic Server for more information about the data source properties.

Monitoring a JDBC Data Source Using Fusion Middleware Control

To monitor a JDBC data source using Fusion Middleware Control:

  1. From the WebLogic Domain menu, choose JDBC Data Sources.

    The JDBC Data Sources page is displayed.

  2. Select the data source that you want to monitor.
  3. Select the Monitoring tab to display the statistics for the JDBC data source.

    This page shows the current instances of the selected data source.

    Note that only data sources that are targeted to a running Managed Server are shown on this page. If a specific data source is not listed on the monitoring page, then edit the data source to be sure it is targeted to a running Managed Server.

  4. For each data source instance, review the performance metrics.
Controlling a JDBC Data Source Using Fusion Middleware Control

To start, stop, suspend, resume, or clear the statement cache for a JDBC data source using Fusion Middleware Control:

  1. From the WebLogic Domain menu, choose JDBC Data Sources.

    The JDBC Data Sources page is displayed.

  2. Select the data source that you want to control
  3. Select the Control tab.

    Note that only data sources that are targeted to a running Managed Server are shown on this page. If a specific data source is not listed on the control page, edit the data source to be sure that it is targeted to a running Managed Server.

  4. Select the instance and click Start, Stop, Resume, Suspend, Shrink, Reset, or Clear Statement Cache to control or change the state of the selected JDBC data source.
Creating a GridLink Data Source Using Fusion Middleware Control

A single GridLink data source provides connectivity between WebLogic Server and an Oracle Database service targeted to an Oracle RAC cluster. For detailed information about GridLink data sources, see Creating a GridLink Data Source in Administering JDBC Data Sources for Oracle WebLogic Server.

To create a Grid Link data source using Fusion Middleware Control:

  1. From the WebLogic Domain menu, choose JDBC Data Sources.

    The JDBC Data Sources page is displayed.

  2. From Create, select GridLink Data Source.
  3. Follow the instructions in the wizard to set the properties of the data source and to target the data source for one or more of the Managed Servers in the domain.

    For help on individual fields and properties, use your mouse to give focus to a field. Fusion Middleware Control displays a popup definition of the field.

    Note that the data source properties you define in Fusion Middleware Control are similar to those you define when creating data sources in the Oracle WebLogic Server Administration Console. As a result, you can also refer to Creating a GridLink Data Source in Administering JDBC Data Sources for Oracle WebLogic Server for more information about the data source properties.

Deploying, Undeploying, and Redeploying Java EE Applications

A Java EE application consists of one or more components, which can be application clients, web components, and EJB components, and can be deployed on Manager Servers.

You can use Fusion Middleware Control, Oracle WebLogic Server Administration Console, Oracle JDeveloper, or the command line to deploy, undeploy, or redeploy a Java EE application.

The following topics describe using Fusion Middleware Control and the command line to accomplish these tasks:

Deploying Applications to Oracle WebLogic Server describes deploying applications using Oracle WebLogic Server Administration Console and the WLST command line.

About Managed Server Independence and Deploying Applications

Managed Server Independence for Deployment (MSI-D) lets administrators update applications and libraries without requiring contact with the Administration Server. MSI-D makes the deployment of applications and libraries more resilient to resource and network unavailability.

MSI-D lets you upgrade or patch applications and libraries by simply placing the new application or library version in a predefined directory without invoking any deployment commands; this is also referred to as hot patching.

Using the WebLogic Server Administration Console and Fusion Middleware Control, you can view, test, and monitor MSI-D applications and libraries. However, the typical deployment and control operations (such as start, stop, update, and delete) are not supported for these applications and libraries.

The following figure shows the Deployments screen in Fusion Middleware Control with an MSI-D application selected. The Start and Stop options are not available (they are grayed out.)

For more information, see Understanding Managed Server Independence Mode in Administering Server Startup and Shutdown for Oracle WebLogic Server.

Deploying Java EE Applications

You can deploy an application to a Managed Server instance or a cluster. This section describes how to deploy an application to a Managed Server. It contains the following topics:

Deploying Java EE Applications Using Fusion Middleware Control

To deploy a Java EE application to a Managed Server using Fusion Middleware Control:

  1. From theWebLogic Domain menu, select Control, then Deployments.

    The Deployments page is displayed.

  2. From the Deployments menu, select Deploy to open the Deploy Java EE Application Assistant.

    The Select Archive page is displayed, as shown in the following figure:

  3. In the Archive or Exploded Directory section, you can select one of the following:
    • Archive is on the machine where this browser is running. Enter the location of the archive or click Browse to find the archive file.

    • Archive or exploded directory is on the server where Enterprise Manager is running. Enter the location of the archive or click Browse to find the archive file.

  4. In the Deployment Plan section, you can select one of the following:
    • Create a new deployment plan when deployment configuration is done.

    • Deployment plan is on the machine where this Web browser is running. If you select this option, enter the path to the plan.

    • Deployment plan is on the server where Enterprise Manager is running. If you select this option, enter the path to the plan.

  5. In the Deployment Type section, you can select one of the following:
    • Deploy this archive or exploded directory as an application

    • Deploy this archive or exploded directory as a library

  6. Click Next.

    The Select Target page is displayed.

  7. Select the target to which you want to deploy the application. The Administration Server, Managed Servers, and clusters are listed. You can select a cluster, one or more Managed Servers in the cluster, or a Managed Server that is not in a cluster. Although the Administration Server is shown in the list of targets, you should not deploy an application to it. The Administration Server is intended only for administrative applications such as the Oracle WebLogic Server Administration Console.
  8. Click Next.

    The Application Attributes page is displayed.

  9. In the Application Attributes section, for Application Name, enter the application name.
  10. In the Context Root of Web Modules section, if the Web module does not have the context root configured in the application.xml file, you can specify the context root for your application. The context root is the URI for the Web module. Each Web module or EJB module that contains Web services may have a context root.
  11. In the Distribution section, you can select one of the following:
    • Install and start application (servicing all requests)

    • Install and start application in administration mode (servicing only admin requests)

    • Install only. Do not start

  12. You can expand Other Options, which provides the following for Application Source Accessibility:
    • Use the defaults defined by the deployment's targets. Recommended selection.

    • Copy this application onto every target. During deployment, the files will be copied automatically to the Managed Servers to which the application is targeted.

    • Make the application accessible from the source location that it will be deployed on. You must ensure that each target can reach the location.

  13. In Other Options, you can also select one of the following for Deployment Plan Source Accessibility:
    • Use the same accessibility as the application.

    • Copy the deployment plan onto every target. During deployment, the files will be copied automatically to the Managed Servers to which the application is targeted.

    • Make the deployment plan accessible from the source location that it will be deployed on. You must ensure that each target can reach the location.

  14. Click Next.

    The Deploy Java EE Application: Deployment Settings page is displayed.

  15. On this page, you can perform common tasks before deploying your application or you can edit the deployment plan or save it to a disk.

    See About the Common Deployment Tasks in Fusion Middleware Control for more detailed information about these tasks.

    Depending on the type of application, in the Deployment Tasks section, you can:

    • Configure Web modules: Click Go to Task in the Configure Web Modules row. The Configure Web Modules page is displayed. Click Configure General Properties to view and edit the general configuration for the Web Module or Map Resource References to map the resource references.

      For example, you can change the session invalidation interval or the maximum age of session cookies.

    • Configure EJB modules: Click Go to Task in the Configure EJB modules row to set standard EJB deployment descriptor properties. The Configure EJB Modules page is displayed. Click Configure EJB Properties to view and edit the general configuration for the EJBs or Map Resource References to map the resource preferences.

      For example, you can configure the maximum number of beans in the free pool or the network access point.

    • Configure application security: Click Go to Task in the Configure Application Security row. Depending on what type of security is used, different pages are displayed, as described in About the Common Deployment Tasks in Fusion Middleware Control.

    • Configure persistence: Click Go to Task in the Configure Persistence row to configure Java Persistent API (JPA) persistence units.

  16. Expand Deployment Plan.

    You can edit and save the deployment plan, if you choose. If you edit the deployment plan and change descriptor values, those changes are saved to the deployment plan. In addition, the following configurations are saved to the deployment plan:

    • Application attributes

    • Web module configuration

    • EJB configuration

    Application attributes related to MDS are stored in the file adf-config.xml. Application security attributes are stored in weblogic-application.xml.

    Fusion Middleware Control updates the relevant files and repackages the .ear file.

  17. Click Deploy.

    Fusion Middleware Control displays processing messages.

  18. When the deployment is completed, click Close.
Deploying Java EE Applications Using WLST

You can deploy an application using the WLST command line. To deploy a Java EE application when WLST is connected to the Administration Server, you use the WLST command deploy, using the following format:

deploy(app_name, path [,targets] [,stageMode] [,planPath] [,options])

You must invoke the deploy command on the computer that hosts the Administration Server.

For example, to deploy the application mainWebApp:

deploy("myApp","/scratch/applications/wlserveR/samples/server/examples/build/mainWebApp")

You can also deploy the application using the weblogic.deployer, as shown in the following example:

java weblogic.Deployer -adminurl http://localhost:7001 
   -user username -password password -deploy 
   -name myApp c:\localfiles\mainWebApp
   -plan c:\localfiles\productionEnvPlan.xml

For more information about using WLST to deploy applications, see:

Undeploying Java EE Applications

You can undeploy an application or a specific version of an application from a Managed Server instance or a cluster. This section describes how to undeploy an application from a Managed Server. If an application has been deployed to multiple servers, when you undeploy it using Fusion Middleware Control, the application is undeployed from all the servers.

This section contains the following topics:

Undeploying Java EE Applications Using Fusion Middleware Control

To undeploy a Java EE application from a Managed Server using Fusion Middleware Control:

  1. From the navigation pane, expand Application Deployments.
  2. Select the application to undeploy.

    The application home page is displayed.

  3. From the Deployment menu, choose Undeploy.
  4. Select the application.
  5. In Confirmation page, click Undeploy.

    Processing messages are displayed.

  6. When the operation completes, click Close.

Alternatively, you can navigate to the domain, Managed Server, or cluster. Then, from the target's menu, choose Application Deployment, then Undeploy. In the Select Application page, select the application you want to undeploy.

Undeploying Java EE Applications Using WLST

You can undeploy an application using the WLST command line. To undeploy a Java EE application when WLST is connected to the Administration Server, you use the WLST command undeploy, using the following format:

undeploy(app_name, path [,targets] [,options])

You must invoke the undeploy command on the computer that hosts the Administration Server.

For example, to undeploy the application businessApp from all target servers and specify that WLST wait 60,000 ms for the process to complete:

wls:/mydomain/serverConfig> undeploy('businessApp', timeout=60000)

Redeploying Java EE Applications

You can redeploy a new version of an updated application, redeploy the same version, or redeploy a non-versioned application. You can redeploy an application to a cluster or a Managed Server.

The following topics describe how to redeploy an application to a Managed Server:

If you are redeploying a non-versioned application or a versioned application with the same version, note the following:

  • The file name and path for the archive you are redeploying must be identical to the file name and path you used when you initially deployed the application.

    For example, if the file name and path of the original application was /dua0/staging/myApp.ear, then the revised application must be /dua0/staging/myApp.ear.

  • If you initially deployed the application using the Oracle WebLogic Server Administration Console or WLST or other management tools other than Fusion Middleware Control, then you cannot redeploy the application using Fusion Middleware Control.

Redeploying Java EE Applications Using Fusion Middleware Control

To redeploy a Java EE application to a Managed Server using Fusion Middleware Control:

  1. From the navigation pane, expand Application Deployments.
  2. Select the application to redeploy.

    The application home page is displayed.

  3. From the Domain Application Deployment menu, choose Deployments.
  4. From the Deployments menu, select Redeploy to open the Redeploy Java EE Application Assistant.

    The Select Application page is displayed.

  5. Click Next.
  6. In the Archive or Exploded Directory section, you can select one of the following:
    • Use the archive or exploded directory in the existing source location of the application on the Administration Server.

    • Archive is on the machine where this browser is running. Enter the location of the archive or click Browse to find the archive file.

    • Archive or exploded directory is on the server where Enterprise Manager is running. Enter the location of the archive or click Browse to find the archive file.

  7. In the Deployment Plan section, you can select one of the following:
    • Create a new deployment plan when deployment configuration is done.

    • Use the current deployment plan of this application.

    • Deployment plan is on the machine where this Web browser is running. Enter the path to the plan or click Browse to find the plan file.

    • Deployment plan is on the server where Enterprise Manager is running. Enter the path to the plan or click Browse to find the plan file.

  8. Click Next.

    The Application Attributes page is displayed.

  9. Click Next.

    The Deployment Wizard, Deployment Settings page is displayed.

  10. On this page, you can perform common tasks before deploying your application or you can edit the deployment plan or save it to a disk. Depending on the type of application, in the Deployment Tasks section, you can:
    • Configure Web modules

    • Configure application security

    • Configure EJB modules

    • Configure persistence

    See About the Common Deployment Tasks in Fusion Middleware Control for detailed information about these tasks.

  11. Expand Deployment Plan.

    You can edit and save the deployment plan, if you choose. If you edit the deployment plan and change descriptor values, those changes are saved to the deployment plan. In addition, the following configurations are saved to the deployment plan:

    • Application attributes

    • Web module configuration

    • EJB configuration

    Application attributes related to MDS are stored in the file adf-config.xml. Application security attributes are stored in weblogic-application.xml.

    Fusion Middleware Control updates the relevant files and repackages the .ear file.

  12. Click Redeploy.

    Processing messages are displayed.

  13. When the operation completes, click Close.

To redeploy an application to a cluster, select the cluster. Then, from the target's menu, select Application Deployment, then Redeploy.

Redeploying Java EE Applications Using WLST

You can redeploy an application using the WLST command line. To redeploy a Java EE application when WLST is connected to the Administration Server, you use the WLST command redeploy, using the following format:

redeploy(app_name [,planpath] [,options])

You must invoke the redeploy command on the computer that hosts the Administration Server.

For example, to redeploy the application businessApp from all target servers:

redeploy('businessApp')

Deploying, Undeploying, and Redeploying Oracle ADF Applications

Oracle ADF is an end-to-end application framework that builds on Java Platform, Enterprise Edition (Java EE) standards and open-source technologies to simplify and accelerate implementing service-oriented applications.

You can use Fusion Middleware Control, Oracle WebLogic Server Administration Console, Oracle JDeveloper, or the command line to deploy, undeploy, or redeploy an Oracle ADF application. The following topics describe using Fusion Middleware Control, the Administration Console, and the command line to accomplish these tasks:

See Developing Fusion Web Applications with Oracle Application Development Framework for information on developing ADF applications and for deploying them using Oracle JDeveloper

Deploying Oracle ADF Applications

You can deploy an application to a WebLogic Server Managed Server instance or a cluster. This section describes how to deploy an application to a Managed Server and assumes that you have created an .ear file containing the ADF application.

This section contains the following topics:

Deploying ADF Applications Using Fusion Middleware Control

To deploy an Oracle ADF application using Fusion Middleware Control:

  1. From the navigation pane, expand the domain.
  2. Select the server in which you want to deploy the application.

    The server home page is displayed.

  3. From the WebLogic Server menu, choose Deployments.

    The Deployments page is displayed.

  4. From the Deployments menu, select Deploy to open the Deploy Java EE Application Assistant.

    The Select Archive page is displayed.

  5. In the Archive or Exploded Directory section, you can select one of the following:
    • Archive is on the machine where this browser is running. Enter the location of the archive or click Browse to find the archive file.

    • Archive or exploded directory is on the server where Enterprise Manager is running. Enter the location of the archive or click Browse to find the archive file.

  6. In the Deployment Plan section, you can select one of the following:
    • Create a new deployment plan when deployment configuration is done.

    • Deployment plan is on the machine where this Web browser is running. Enter the path to the plan.

    • Deployment plan is on the server where Enterprise Manager is running. Enter the path to the plan.

  7. In the Deployment Type section, you can select one of the following:
    • Deploy this archive or exploded directory as an application

    • Deploy this archive or exploded directory as a library

  8. Click Next.

    The Select Target page is displayed.

  9. Select the target to which you want to deploy the application. The Administration Server, Managed Servers, and clusters are listed. You can select a cluster, one or more Managed Servers in the cluster, or a Managed Server that is not in a cluster. Although the Administration Server is shown in the list of targets, you should not deploy an application to it. The Administration Server is intended only for administrative applications such as the Oracle WebLogic Server Administration Console.
  10. Click Next.

    The Application Attributes page is displayed, as shown in the following figure:

  11. In the Application Attributes section, for Application Name, enter the application name.
  12. In the Context Root of Web Modules section, if the Web module does not have the context root configured in the application.xml file, you can specify the context root for your application. The context root is the URI for the Web module. Each Web module or EJB module that contains Web services may have a context root.
  13. In the Target Metadata Repository section, you can choose the repository and partition for this application. If the partition name is not specified in the adf-config.xml file, the application name plus the version is used as the default partition name. This ensures that the partition used is unique in the domain so that the metadata for different applications are not accidentally imported into the same repository partition and overwrite each other. Typically, each application's metadata is deployed to its own partition.
    • To change the repository, click the icon next to the Repository Name. In the Metadata Repositories dialog box, select the repository and click OK.

    • To change the partition, enter the partition name in Partition Name. Oracle recommends that you create a new partition for each application. If you enter a name of a partition that does not exist, the partition is created.

    The adf-config.xml file in the .ear file is updated with the new information.

    If the partition or repository specified in the application is not valid in the domain, Fusion Middleware Control displays a message.

  14. If the application's adf-config.xml file archive contains MDS configuration for an MDS shared repository, the Shared Metadata Repository section is displayed. In this section, you can choose the repository and partition for this application. If the partition or repository specified in the application is not valid in the domain, Fusion Middleware Control displays a message.

    If you change the repository or partition, the adf-config.xml file in the .ear file is updated with the new information.

  15. In the Distribution section, you can select one of the following:
    • Install and start application (servicing all requests)

    • Install and start application in administration mode (servicing only administration requests)

    • Install only. Do not start.

  16. You can expand Other Options. See Deploying Java EE Applications for a description of those options.
  17. Click Next.

    The Deployment Wizard, Deployment Settings page is displayed.

  18. On this page, you can perform common tasks before deploying your application or you can edit the deployment plan or save it to a disk. Depending on the type of application, in the Deployment Tasks section, you can:
    • Configure Web modules: Click Go to Task in the Configure Web Modules row. The Configure Web Modules page is displayed. Click Configure General Properties to view and edit the general configuration for the Web Module or Map Resource References to map the resource references.

      For example, you can change the session invalidation interval or the maximum age of session cookies.

    • Configure EJB modules: Click Go to Task in the Configure EJB modules row to set standard EJB deployment descriptor properties. The Configure EJB Modules page is displayed. Click Configure EJB Properties to view and edit the general configuration for the EJBs or Map Resource References to map the resource preferences.

      For example, you can configure the maximum number of beans in the free pool or the network access point.

    • Configure application security: Click Go to Task in the Configure Application Security row. Depending on what type of security is used, different pages are displayed, as described in About the Common Deployment Tasks in Fusion Middleware Control.

    • Configure persistence: Click Go to Task in the Configure Persistence row to configure Java Persistent API (JPA) persistence units.

    • Configure ADF Connections: To modify the ADF connections, click Go to Task in the Configure ADF Connections row. The Configure ADF Connections page is displayed, showing the current connection information. To modify a connection type, click the Edit icon for a particular row. For example, you can modify the connection information for an external application. For more information about ADF connections, see Developing Fusion Web Applications with Oracle Application Development Framework.

    For more information about these options, see About the Common Deployment Tasks in Fusion Middleware Control.

  19. Expand Deployment Plan.

    You can edit and save the deployment plan, if you choose.

  20. Click Deploy.

    Fusion Middleware Control displays processing messages.

  21. When the deployment is completed, click Close.
Deploying ADF Applications Using WLST

To deploy an ADF application using the WLST command line:

  1. If your application uses an MDS Repository, you must configure the application archive (.ear) file before you deploy your application. You must provide the repository information for the deploy target repository and any shared metadata repositories using the WLST getMDSArchiveConfig command. The repository specified must already be registered with the domain before deploying the application. The following example show how to use this command to get the MDSArchiveConfig and call the setAppMetadataRepository method to set the deploy target repository. Otherwise, your application will fail to start.
    wls:/offline> archive = getMDSArchiveConfig(fromLocation='/tmp/App1.ear')
    wls:/offline> archive.setAppMetadataRepository(repository='AppRepos1',
                  partition='partition1', type='DB', jndi='mds-jndi1')
    

    The operation places the changes in the MDS configuration portion of the adf-config.xml file in the archive file.

  2. Save the changes to the original .ear file, using the following command:
    wls:/offline> archive.save()
    
  3. Deploy the application.

    To deploy an application when WLST is connected to the Administration Server, you use the WLST command deploy, using the following format:

    deploy(app_name, path [,targets] [,stageMode] [,planPath] [,options])
    

    You must invoke the deploy command on the computer that hosts the Administration Server.

    For example, to deploy the application myApp:

    deploy("myApp","/scratch/applications/myApp", targets='myserver', timeout=120000))
    

    See:

Deploying ADF Applications Using the Administration Console

To deploy the application using the Oracle WebLogic Server Administration Console:

  1. If you have not already done so, in the Change Center of the Administration Console, click Lock & Edit.
  2. In the left pane of the Administration Console, select Deployments.
  3. In the right pane, click Install.

Undeploying Oracle ADF Applications

To undeploy an Oracle ADF application using Fusion Middleware Control:

  1. From the navigation pane, expand Application Deployments.
  2. Select the application to undeploy.

    The application home page is displayed.

  3. From the Domain Application Deployment menu, choose Deployments.
  4. From the Deployments menu, select Undeploy.
  5. In the Confirmation page, click Undeploy.

    Processing messages are displayed.

  6. When the operation completes, click Close.

Alternatively, you can navigate to the domain, Managed Server, or cluster. Then, from the target's menu, choose Application Deployment, then Undeploy. In the Select Application page, select the application you want to undeploy.

Note that when you undeploy an application, documents stored in the MDS partition are not deleted.

Redeploying Oracle ADF Applications

When you redeploy an application, if the application contains a Metadata Archive (MAR), the contents of the MAR is imported to the application's metadata repository only if the MAR is changed. If the MAR is unchanged from previous deployment of the application, it is ignored.

If you are redeploying a non-versioned application or a versioned application with the same version, note the following:

  • The file name and path for the archive you are redeploying must be identical to the file name and path you used when you initially deployed the application.

    For example, if the file name and path of the original application was /dua0/staging/myApp.ear, then the revised application must be /dua0/staging/myApp.ear.

  • If you initially deployed the application using the Oracle WebLogic Server Administration Console or WLST or other management tools other than Fusion Middleware Control, then you cannot redeploy the application using Fusion Middleware Control.

To redeploy an Oracle ADF application using Fusion Middleware Control:

  1. From the navigation pane, expand Application Deployments.
  2. Select the application to redeploy.

    The application home page is displayed.

  3. From the Domain Application Deployment menu, choose Deployments.
  4. From the Deployments menu, select Redeploy.
  5. Click Next.

    The Select Archive page is displayed.

  6. In the Archive or Exploded Directory section, you can select one of the following:
    • Use the archive or exploded directory in the existing source location of the application on the Administration Server.

    • Archive is on the machine where this browser is running. Enter the location of the archive or click Browse to find the archive file.

    • Archive or exploded directory is on the server where Enterprise Manager is running. Enter the location of the archive or click Browse to find the archive file.

  7. In the Deployment Plan section, you can select one of the following:
    • Create a new deployment plan when deployment configuration is done.

    • Deployment plan is on the machine where this web browser is running. Enter the path to the plan.

    • Deployment plan is on the server where Enterprise Manager is running. Enter the path to the plan.

  8. Click Next.

    The Application Attributes page is displayed.

  9. In the Application Attributes section, for Application Name, enter the application name.
  10. In the Context Root of Web Modules section, if the Web module does not have the context root configured in the application.xml file, you can specify the context root for your application. The context root is the URI for the Web module. Each Web module or EJB module that contains Web services may have a context root.
  11. The Target Metadata Repository section is displayed. In this section, you can choose the repository and partition for this application:
    • To change the repository, click the icon next to the Repository Name. In the Metadata Repositories dialog box, select the repository and click OK.

    • To change the partition, enter the partition name in Partition Name. Oracle recommends that you create a new partition for each application. If you enter a name of a partition that does not exist, the partition is created.

  12. If the application's adf-config.xml file archive contains MDS configuration for an MDS shared repository, the Shared Metadata Repository section is displayed. In this section, you can choose the repository and partition for this application.
  13. Click Next.

    The Deployment Settings page is displayed.

  14. On this page, you can perform common tasks before deploying your application or you can edit the deployment plan or save it to a disk. In the Deployment Tasks section, you can:
    • Configure Web modules

    • Configure application security

    • Configure persistence

    See About the Common Deployment Tasks in Fusion Middleware Control for detailed information about these options.

  15. Expand Deployment Plan.

    You can edit and save the deployment plan, if you choose.

  16. Click Deploy.

    Fusion Middleware Control displays processing messages.

  17. When the deployment is completed, click Close.
  18. In the Confirmation page, click Redeploy.

Deploying, Undeploying, and Redeploying SOA Composite Applications

Oracle SOA Suite uses the SCA standard as a way to assemble service components into a SOA composite application. You can deploy, undeploy, and redeploy SOA composite applications.

SOA composite applications consist of the following:

  • Service components such as Oracle Mediator for routing, BPEL processes for orchestration, human tasks for workflow approvals, business rules for designing business decisions, and complex event processing for queries of event streams

  • Binding components (services and references) for connecting SOA composite applications to external services, applications, and technologies

These components are assembled together into a SOA composite application. This application is a single unit of deployment that greatly simplifies the management and lifecycle of SOA applications.

You can use Fusion Middleware Control, Oracle JDeveloper, or the command line to deploy, undeploy, or redeploy a SOA application. The following topics describe using Fusion Middleware Control to accomplish these tasks:

For additional information about deploying SOA composite applications, see Administering Oracle SOA Suite and Oracle Business Process Management Suite

Deploying SOA Composite Applications

When you deploy a SOA composite application, the deployment extracts and activates the composite application in the SOA Infrastructure.

You can deploy SOA composite applications from Fusion Middleware Control with the Deploy SOA Composite wizard:

  1. From the navigation pane, expand SOA, and then select soa-infra.

    The SOA Infrastructure home page is displayed.

  2. From the SOA Infrastructure menu, choose SOA Deployment, then Deploy.

    The Deployment Wizard, Select Archive page is displayed, as shown in the following figure:

  3. In the Archive or Exploded Directory section, you can select one of the following:
    • Archive is on the machine where this browser is running. Enter the location of the archive or click Browse to find the archive file.

    • Archive or exploded directory is on the server where Enterprise Manager is running. Enter the location of the archive or click Browse to find the archive file.

      You can specify the archive of the SOA composite application to deploy. The archive contains the project files of the application to be deployed (for example, HelloWorld_rev1.0.jar for a single archive or OrderBooking_rev1.0.zip for multiple archives).

  4. In the Configuration Plan section, optionally specify the configuration plan to include with the archive. The configuration plan enables you to define the URL and property values to use in different environments. During process deployment, the configuration plan is used to search the SOA project for values that must be replaced to adapt the project to the next target environment.
  5. Click Next.

    The Select Target page appears.

  6. In the SOA Partition section, select the partition into which to deploy this SOA composite application. Partitions enable you to logically group SOA composite applications into separate sections. Note that even if there is only one partition available, you must explicitly select it. Once deployed, a composite cannot be transferred to a different partition.
  7. Click Next.

    The Confirmation page appears.

  8. Review your selections.
  9. Select whether or not to deploy the SOA composite application as the default revision. The default revision is instantiated when a new request comes in.
  10. Click Deploy.

    Processing messages are displayed.

  11. When deployment has completed, close the confirmation box.

See Deploying Applications in Administering Oracle SOA Suite and Oracle Business Process Management Suite for complete information about deploying SOA Composite applications.

Undeploying SOA Composite Applications

You can undeploy SOA composite applications from Fusion Middleware Control with the Undeploy SOA Composite wizard:

  1. From the navigation pane, expand SOA, and then select soa-infra.

    The SOA Infrastructure home page is displayed.

  2. From the SOA Infrastructure menu, choose SOA Deployment, then Undeploy.
  3. Select the composite to undeploy and click Next.
  4. Review your selections. If you are satisfied, click Undeploy.

    Processing messages are displayed.

  5. When undeployment has completed, close the confirmation window.

See Undeploying Applications in Administering Oracle SOA Suite and Oracle Business Process Management Suite for complete information about undeploying SOA Composite applications

Redeploying SOA Composite Applications

You can redeploy SOA composite applications from Fusion Middleware Control with the Redeploy SOA Composite wizard:

  1. From the navigation pane, expand SOA, and then select soa-infra.

    The SOA Infrastructure home page is displayed.

  2. From the SOA Infrastructure menu, choose SOA Deployment, then Redeploy.

    The Select Composite page is displayed.

  3. Select the composite that you want to redeploy.
  4. Click Next.

    The Select Archive page appears.

  5. In the Archive or Exploded Directory section, select the location of the SOA composite application revision you want to redeploy.
  6. In the Configuration Plan section, optionally specify the configuration plan to include with the archive.
  7. Click Next.

    The Confirmation page appears.

  8. Select whether or not to redeploy the SOA composite application as the default revision.
  9. Click Redeploy.

    Processing messages are displayed.

  10. When redeployment has completed, click Close.

See Redeploying Applications in Administering Oracle SOA Suite and Oracle Business Process Management Suite for complete information about redeploying SOA Composite applications

Deploying, Undeploying, and Redeploying WebCenter Portal Applications

Oracle WebCenter Portal applications differ from traditional Java EE applications in that they support run-time customization, such as the application's pages, the portlets contained within these pages, and the document libraries.

Customizations are stored as follows:

  • WebCenter Portal application customizations are stored in Oracle Metadata Services (MDS), which is installed in a database.

  • Portlet Producer customizations (or preferences) are usually stored in a database preference store.

You can use Fusion Middleware Control, Oracle JDeveloper, or the command line to deploy, undeploy, or redeploy a WebCenter Portal application. The following topics describe using Fusion Middleware Control to accomplish these tasks:

For more information about deploying WebCenter Portal applications, see Administering Oracle WebCenter Portal

Deploying WebCenter Portal Applications

To deploy your application to a Managed Server that resides outside JDeveloper, you must first create an application deployment plan. In Oracle JDeveloper, first create a project-level deployment profile and then an application-level deployment profile. The project-level deployment profile is packaged as a Web Application Archive (WAR) file. The application-level deployment profile is packaged as a Metadata Archive (MAR). A single MAR can contain metadata content of multiple projects. MAR files are used to deploy metadata content to the MDS Repository. For information about creating deployment plans with Oracle JDeveloper, see Developing for Oracle WebCenter Portal.

For complete information about deploying Oracle WebCenter Portal applications, see Deploying WebCenter Portal Framework Applications in Administering Oracle WebCenter Portal.

To deploy an Oracle WebCenter Portal application to a Managed Server using Fusion Middleware Control:

  1. From the navigation pane, expand the domain.
  2. Select the domain in which you want to deploy the application.

    The server home page is displayed.

  3. From the WebLogic Domain menu, select Deployment. then Deploy.
  4. From the Deployments menu, select Deploy to open the Deploy Java EE Application Assistant.

    The Deployment Wizard, Select Archive page is displayed.

  5. In the Archive or Exploded Directory section, you can select one of the following:
    • Archive is on the machine where this browser is running. Enter the location of the archive or click Browse to find the archive file.

    • Archive or exploded directory is on the server where Enterprise Manager is running. Enter the location of the archive or click Browse to find the archive file.

  6. In the Deployment Plan section, you can select one of the following:
    • Create a new deployment plan when deployment configuration is done.

    • Deployment plan is on the machine where this web browser is running. Enter the path to the plan.

    • Deployment plan is on the server where Enterprise Manager is running. Enter the path to the plan.

  7. Click Next.

    The Select Target page is displayed.

  8. Select the target to which you want to deploy the application.

    You can select a cluster, one or more Managed Servers in the cluster, or a Managed Server that is not in a cluster.

  9. Click Next.

    The Application Attributes page is displayed.

  10. In the Application Attributes section, for Application Name, enter the application name.
  11. In the Context Root of Web Modules section, specify the context root for your application if you have not specified it in application.xml. The context root is the URI for the Web module. Each Web module or EJB module that contains Web services may have a context root.
  12. In the Target Metadata Repository section, you can choose the repository and partition for this application. If the partition or repository specified in the application is not valid in the domain, Fusion Middleware Control displays a message.
    • To change the repository, click the icon next to the Repository Name. In the Metadata Repositories dialog box, select the repository and click OK.

    • To change the partition, enter the partition name in Partition Name. Oracle recommends that you create a new partition for each application. If you enter a name of a partition that does not exist, the partition is created.

      Each application must have a unique partition in the repository.

  13. Click Next.

    The Deployment Wizard, Deployment Settings page is displayed.

  14. On this page, you can perform common tasks before deploying your application or you can edit the deployment plan or save it to a disk. Depending on the type of application, in the Deployment Tasks section, you can:
    • Configure Web modules: Click Go to Task in the Configure Web Modules row. The Configure Web Modules page is displayed. Click Configure General Properties to view and edit the general configuration for the Web Module or Map Resource References to map the resource references.

      For example, you can change the session invalidation interval or the maximum age of session cookies.

    • Configure EJB modules: Click Go to Task in the Configure EJB modules row to set standard EJB deployment descriptor properties. The Configure EJB Modules page is displayed. Click Configure EJB Properties to view and edit the general configuration for the EJBs or Map Resource References to map the resource preferences.

      For example, you can configure the maximum number of beans in the free pool or the network access point.

    • Configure application security: Click Go to Task in the Configure Application Security row. Depending on what type of security is used, different pages are displayed, as described in About the Common Deployment Tasks in Fusion Middleware Control.

    • Configure persistence: Click Go to Task in the Configure Persistence row to configure Java Persistent API (JPA) persistence units.

    • Configure ADF Connections: To modify the ADF connections, click Go to Task in the Configure ADF Connections row. The Configure ADF Connections page is displayed, showing the current connection information. To modify a connection type, click the Edit icon for a particular row.

    See About the Common Deployment Tasks in Fusion Middleware Control for more detailed information about these options.

  15. Expand Deployment Plan.

    You can edit and save the deployment plan, if you choose.

  16. Click Deploy.

    Fusion Middleware Control displays processing messages.

  17. When the deployment is completed, click Close.

Undeploying WebCenter Portal Applications

To undeploy a WebCenter Portal application:

  1. From the navigation pane, expand Application Deployments, then select the application to undeploy.

    The application home page is displayed.

  2. From the Deployments menu, select Undeploy to open the Deploy Java EE Application Assistant.

    The confirmation page is displayed.

  3. Click Undeploy.

    Processing messages are displayed.

  4. When the operation completes, click Close.

Alternatively, you can navigate to the domain, Managed Server, or cluster. Then, from the target's menu, choose Application Deployment, then Undeploy. In the Select Application page, select the application you want to undeploy.

Redeploying WebCenter Portal Applications

To redeploy a WebCenter Portal application:

  1. From the navigation pane, expand the domain.
  2. Select the server in which you want to redeploy the application.

    The server home page is displayed.

  3. From the WebLogic Server menu, select Deployments.

    The Deployments page is displayed. You can only redeploy applications that are versioned. If the application is not versioned, you must undeploy, then redeploy.

  4. Select the application to redeploy.
  5. From the Deployments menu, select Redeploy to open the Deploy Java EE Application Assistant.
  6. Click Next.

    The Redeploy Application page is displayed.

  7. Click Next.

    The Select Archive page is displayed.

  8. In the Archive or Exploded Directory section, you can select one of the following:
    • Archive is on the machine where this browser is running. Enter the location of the archive or click Browse to find the archive file.

    • Archive or exploded directory is on the server where Enterprise Manager is running. Enter the location of the archive or click Browse to find the archive file.

  9. In the Deployment Plan section, you can select one of the following:
    • Create a new deployment plan when deployment configuration is done

    • Use the current deployment plan of this application.

    • Deployment plan is on the machine where this web browser is running. Enter the path to the plan.

    • Deployment plan is on the server where Enterprise Manager is running. Enter the path to the plan.

  10. Click Next.

    The Application Attributes page is displayed.

  11. In the Application Attributes section, for Application Name, enter the application name.
  12. In the Context Root of Web Modules section, specify the context root for your application if you have not specified it in application.xml. The context root is the URI for the Web module. Each Web module or EJB module that contains Web services may have a context root.
  13. In the Target Metadata Repository section, select the MDS Repository and for Partition Name, enter a partition name. Be careful to use the same repository connection and partition name that you used when you originally deployed the application. If you do not, all customizations are lost.
  14. Click Next.

    The Deployment Settings page is displayed.

  15. On this page, you can perform common tasks before deploying your application or you can edit the deployment plan or save it to a disk. In the Deployment Tasks section, you can:
    • Configure Web modules

    • Configure application security

    • Configure persistence

    See About the Common Deployment Tasks in Fusion Middleware Control for detailed information about these options.

  16. Expand Deployment Plan.

    You can edit and save the deployment plan, if you choose.

  17. Click Redeploy.

    Fusion Middleware Control displays processing messages.

  18. When the deployment is completed, click Close.

Managing Deployment Plans

A deployment plan is a client-side aggregation of all the configuration data needed to deploy an archive into Oracle WebLogic Server. A deployment plan allows you to easily deploy or redeploy an application using a saved set of configuration settings.

A new deployment plan is created by default if you do not apply an existing deployment plan to an application at the time of deployment, as described in Deploying Java EE Applications. Once created, you can save a deployment plan as a file and reuse it for redeploying the application or for deploying other applications.

However, if you change the configuration of an application after it is deployed (for example, if you modify the MDS configuration of an application), then any existing deployment plans you saved no longer represent the configuration settings of the deployed application.

In such a situation, you can fetch a new deployment plan that more closely represents the configuration of the deployed application.

To fetch the deployment plan of an application that is currently deployed:

  1. From the WebLogic Domain menu, choose Deployments.
  2. Select an application from the list of currently deployed applications.
  3. From the Deployments menu, select Fetch Deployment Plan.

    The Fetch Deployment Plan page is displayed.

  4. Select a location where you want to save the deployment plan, and click Fetch.

    You can save the plan to the computer where the Web browser is running or to the computer where Fusion Middleware Control is running.

  5. In the resulting dialog box, specify a directory location for the saved deployment plan.

    You can now use this deployment plan to later deploy or redeploy the application using the configuration currently in use by the application.

Alternatively, you can edit a deployment plan on the Deployment Settings page of the Application Deployment wizard.

About the Common Deployment Tasks in Fusion Middleware Control

When you deploy an application using Fusion Middleware Control, you can use the Deployment Settings page of the Deployment wizard to perform specific deployment configuration tasks before the application is deployed.

The following describes the deployment tasks that can appear on the Deployment Settings page, depending on the type of application you are deploying.

Configure Web modules

This deployment task is available when you are deploying any application that includes a Web module. In most cases, this means the application contains a Web application deployment descriptor (web.xml or weblogic.xml); however, a Web module can also be identified by annotations in the Java code of the application.

You can use this deployment task to set standard Web application deployment descriptor properties, such as:

  • Session validation interval

  • Maximum age of session cookies

Configure EJBs

This deployment task is available for any application that includes an EJB module. In most cases, this means the application contains an EJB deployment descriptor (ejb-jar.xml or weblogic-ejb-jar.xml); however, an EJB module can also be identified by annotations in the Java code of the application.

You can use this deployment task to set standard EJB deployment descriptor properties, such as:

  • The maximum number of beans in the free pool

  • The EJB network access point

Configure Application Security

This deployment task is available for all application types. However, the options available when you select this task vary depending on the existence of the following files in the application:

  • jazn-data.xml

    If the jazn-data.xml file exists in the application, then you can:

    • Append, overwrite, or ignore policy migration.

      • If you are deploying the application for the first time, then select Append.

      • If the application was previously deployed and the application authorization policy exists, then select Append, or select Ignore to keep the application authorization policy.

      • To overwrite the previous policy, then select Overwrite.

    • Specify the Application stripe ID, if the stripe ID is inconsistent with the one defined in the migration options.

    • Specify that policies are removed when the application is undeployed.

  • cwallet.sso

    If an cwallet.sso file exists in the application, then you can set additional application credential migration options.

If the application contains both files, the page displays both sections.

For more information about the settings available when you select the Configure Application Security deployment task, see Deploying Java EE and Oracle ADF Applications with Fusion Middleware Control in Securing Applications with Oracle Platform Security Services.

If neither of these files exists in the application, then you can use this task to determine how user roles and policies will be defined when the application is deployed. For example, you can choose to use only the roles and policies defined in the deployment descriptors, or you can choose to use only the roles and policies defined on the server. The Configure Application Security page displays the following options:

  • Deployment Descriptors Only: Use only roles and policies that are defined in the deployment descriptors.

  • Custom Roles: Use roles that are defined in the Administration Console; use policies that are defined in the deployment descriptor.

  • Custom Roles and Policies: Use only roles and policies that are defined in the Administration Console.

  • Advanced: Use a custom model that you have configured on the realm's configuration page.

Configure persistence

This deployment task is available for applications that contain one or more persistence.xml files. Using this task, you can configure the Java Persistent API (JPA) persistence units for the application.

You can view details about each persistence unit and define a Java Transaction API (JTA) data source or non-JTA data source for each persistence unit.

Configuring the data sources for persistence units can be useful for applications that take advantage of Oracle TopLink. See the Solutions Guide for Oracle TopLink.

For more information about how persistence units and the persistence.xml file can be used in Java EE applications, refer to the definition of Persistence Units in the Java EE 5 Tutorial at the following Web site:

http://download.oracle.com/javaee/5/tutorial/doc/bnbqw.html#bnbrj

Configure ADF connections

This deployment task is available for applications that use ADF connections. You can modify the connection information for an external application. For more information about ADF connections, see Developing Fusion Web Applications with Oracle Application Development Framework.

Configuring Applications in Fusion Middleware Control

With Fusion Middleware Control, you can configure attributes of your application.

The type of attributes that you can configure depends on the type of application. For example, for enterprise applications, you can configure deployment order, the maximum age of session cookies, the Managed Servers or clusters to which you want to deploy the application, and other attributes.
  1. From the WebLogic Domain menu, select Deployments.
  2. Select an application.
    The application’s summary page is displayed.
  3. From the context menu, such as Domain Application Deployment, select an option, such as Administration.
    The configuration attributes that you can modify are displayed.
  4. If the application does not have a deployment plan, click Create New Deployment Plan. Specify a location for the plan.
  5. Modify any attributes you want to change or provide values for attributes with none.
  6. Click Apply.

Changing MDS Configuration Attributes for Deployed Applications

If your application uses an MDS Repository, you can modify configuration attributes after the application is deployed.

To view or modify the attributes, you can use the System MBean Browser or WLST.

Note:

Changes to the configuration persist in MDS as customizations. Because these persist as customizations:

  • Any changes made to the configuration are retained across application deployments. For example, assume that an application has an ExternalChangeDetectionInterval configuration attribute value set to 40 seconds through Oracle JDeveloper. If you change the ExternalChangeDetectionInterval configuration attribute to 50 seconds, and you redeploy the application, the value of the attribute remains at 50 seconds.

  • In a cluster, because all instances of the deployed application point to the same MDS Repository partition, all instances of the application use the same value. If a configuration attribute has been changed for one application instance, all instances of that application in a cluster use the changed value.

The following topics describe how you can change the MDS configuration attributes:

Changing the MDS Configuration Attributes Using Fusion Middleware Control

To change the MDS configuration attributes of an application, take the following steps:

  1. Navigate to the application's home page by expanding Application Deployments. Then, select an application.

    The application's home page is displayed.

  2. From the Application Deployment menu, choose System MBean Browser.

    The System MBean Browser page is displayed.

  3. Expand Application Defined MBeans, then oracle.adf.share.config, then Server: name, then Application: name, then ADFConfig, then ADFConfig, and ADFConfig.
  4. Select MDSAppConfig.

    The Application Defined MBeans page is displayed, as shown in the following figure:

  5. You can view the description and values for the attributes.

    Table 10-2 describes the configuration attributes that are specific to MDS. Note that other attributes, such as ConfigMBean appear in the browser, but these are generic attributes for all MBeans.

    Table 10-2 MDS Configuration Attributes for Deployed Applications

    Attribute Description

    AppMetadataRepositoryInfo

    Read only. Describes the metadata repository partition where the application is deployed.

    AutoPurgeTimeToLive

    Automatically purge versions of metadata documents older than the given time interval, specified in seconds. Any unlabeled versions older than this time interval are automatically purged on any subsequent update from this application. If the value is not set, versions are not automatically purged.

    ConfigMBean

    If true, indicates that this MBean is a Config MBean.

    DeployTargetRepository

    The name of the target repository configured for the application.

    eventProvider

    If true, it indicates that this MBean is an event provider as defined by JSR-77.

    eventTypes

    All the event's types emitted by this MBean.

    ExternalChangeDetection

    Specifies that the MDS Repository is polled to determine if any metadata changes have been performed on other cluster nodes or by other applications. If changes are detected, notifications are sent to applications that share the repository.

    Multiple applications can share metadata that is deployed to a shared repository. Changes performed by one application to this shared metadata can be detected by the other application. To do this, all of the applications should configure the shared repository as part of their application configuration.

    If the MDS Repository is being used by more than one application in the same JVM, then MDS polls for changes if any of those applications have ExternalChangeDetection set to true.

    This attribute should only be set to false if the application metadata is never updated or if it is used only by this application and on a single server node.

    This attribute is applicable only to database-based repositories. The default is true.

    ExternalChangeDetectionInterval

    The maximum time interval, in seconds, to poll the MDS Repository to determine if there are external metadata changes. This attribute is only valid if ExternalChangeDetection is enabled.

    If the MDS Repository is shared and being used by more than one application in the same JVM, MDS uses the lowest of the values specified in the different applications for this attribute. As a result, changing the value of this parameter in one application only has an effect if the new value is lower than any values specified in the other applications.

    The default is 30 seconds.

    MaximumCacheSize

    The maximum metadata cache size limit, in kilobytes. If the value is 0, caching is disabled. If no value is specified, there is no cache limit. In this case, cached data is stored indefinitely.

    objectName

    All the event's types emitted by this MBean.

    ReadOnly

    If true, it indicates that this MBean is a read-only MBean.

    ReadOnlyMode

    Changes the application to read-only mode, so that no updates can be made to the application's repository partition, including configuration and application metadata.

    RemoteNotifications

    Enables distributed remote notifications of applicable metadata changes.This parameter is valid only if ExternalChangeDetection is enabled.

    RestartNeeded

    Enables distributed remote notifications of applicable metadata changes.This parameter is only valid if ExternalChangeDetection is enabled.

    RetryConnection

    Enables the application to retry the connection to the metadata repository after connection failure.

    SharedMetadataRepositoryInfo

    Read only. Specifies the MDS Repository partition used by the application. Note that an application can use more than one shared metadata repository.

    stateManageable

    If true, it indicates that this MBean provides State Management capabilities as defined by JSR-77.

    statisticsProvider

    If true, it indicates that this MBean is a statistic provider as defined by JSR-77.

    SystemMBean

    If true, it indicates that this MBean is a System MBean.

    Visible

    If true, it indicates that this MBean is visible to the current user.

  6. To view or modify an attribute, select the attribute.

    The attribute page is displayed.

  7. If the attribute is not read-only, you can change the values. For example, for AutoPurgeTimeToLive, you can change the interval, by entering a new value in Value.
  8. Click Apply.
  9. Navigate up to ADFConfig (the parent of MDSAppConfig) and select it.
  10. In the Operations tab, click Save.
  11. Click Invoke.

Changing the MDS Configuration Using WLST

You can change the MDS configuration of an application using WLST. The following example shows a WLST script that reads and then sets the ReadOnlyMode attribute:

"""
Getting ReadOnlyMode Attribute from MBean
"""
connect('username','password','hostname:port')
application = 'application_name'
attribute = 'ReadOnlyMode'
beanName = 'oracle.adf.share.config:ApplicationName='+ application +',name=MDSAppConfig,type=ADFConfig,Application='+ application +',ADFConfig=ADFConfig,*'

beanObjectName = ObjectName(beanName)
beans = mbs.queryMBeans(beanObjectName, None)
bean = beans.iterator().next().getObjectName()
custom()
value = mbs.getAttribute(bean, attribute)
print value

"""
Setting ReadOnlyMode Attribute from MBean
"""
attr = Attribute(attribute, Boolean(0))  
mbs.setAttribute(bean,attr)
value = mbs.getAttribute(bean, attribute)
print value

"""
Saving the Changes. This is required to persist the changes.
"""

adfConfigName = 'oracle.adf.share.config:ApplicationName='+ application + ',name=ADFConfig,type=ADFConfig,Application='+ application + ',*'
adfConfigObjectName = ObjectName(adfConfigName)
adfConfigMBeans = mbs.queryMBeans(adfConfigObjectName, None)
adfConfigMBean = adfConfigMBeans.iterator().next().getObjectName()
mbs.invoke(adfConfigMBean, 'save', None, None)

Restoring the Original MDS Configuration for an Application

To restore the original MDS configuration for an application:

  1. Navigate to the application's home page by expanding Application Deployments. Then, select an application.

    The application's home page is displayed.

  2. From the Application Deployment menu, choose System MBean Browser.

    The System MBean Browser page is displayed.

  3. Expand Application Defined MBeans, then oracle.adf.share.config, then Server: name, then Application: name, then ADFConfig, and then ADFConfig.
  4. Select the Operations tab.
  5. Select RestoreToOriginalConfiguration.

    The Operation: restoreToOriginalConfiguration page is displayed.

  6. Click Invoke.

    Use this operation with caution. It causes all changes made to the original adf-config.xml file to be discarded. The adf-config.xml is restored to the base document.