Deploying 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:
- Deploying Oracle ADF Applications
- Undeploying Oracle ADF Applications
- Redeploying Oracle ADF Applications
1 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. This example assumes that you have created an .ear file containing the ADF application.
> Deploying ADF Applications Using Fusion Middleware Control
To deploy an Oracle ADF application using Fusion Middleware Control:
- From the navigation pane, expand the farm, then WebLogic Domain, and then the domain.
- Select the server in which you want to deploy the application.The server home page is displayed.
- From the WebLogic Server menu, choose Application Deployment, then Deploy.The Deployment Wizard, Select Archive page is displayed.
- 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.
- 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.
- Click Next.The Select Target page is displayed.
- 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.
- Click Next.
- In the Application Attributes section, for Application Name, enter the application name.
- 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.
- 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.
- 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. 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.
- 13. In the Distribution section, you can select one of the following:
- Distribute and start application (servicing all requests)
- Distribute and start application in admin mode (servicing only admin requests)
- Distribute only14. Click Next.
The Deployment Wizard, 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. 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.
- 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.16. Expand Deployment Plan
- You can edit and save the deployment plan, if you choose.17. Click Deploy.Fusion Middleware Control displays processing messages.
18. When the deployment is completed, click Close.
Deploying ADF Applications Using WLST or the Administration Console
You can deploy an ADF application using the WLST command line or the Oracle WebLogic Server Administration Console.
Take the following steps:
- 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.
- Save the changes to the original .ear file, using the following command:
wls:/offline> archive.save()
- 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))
To deploy the application using the Oracle WebLogic Server Administration Console:
- If you have not already done so, in the Change Center of the Administration Console, click Lock & Edit.
- In the left pane of the Administration Console, select Deployments.
- In the right pane, click Install.
Undeploying Oracle ADF Applications
To undeploy an Oracle ADF application using Fusion Middleware Control:
- From the navigation pane, expand Application Deployments, then the application to undeploy.The application home page is displayed.
- From the Application Deployment menu, choose Application Deployment, then Undeploy.The confirmation page is displayed.
- Click Undeploy.Processing messages are displayed.
- 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.
To redeploy an Oracle ADF application using Fusion Middleware Control:
- From the navigation pane, expand the farm, then Application Deployments.
- Select the application.The application home page is displayed.
- From the Application Deployment menu, choose Application Deployment, and then Redeploy.The Select Application page is displayed.
- Click Next.The Select Archive page is displayed.
- 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.
- 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.
- Click Next.The Application Attributes page is displayed.
- In the Application Attributes section, for Application Name, enter the application name.
- 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.
- 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.
- 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.
- Click Next.The Deployment Settings page is displayed.
- 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
- Expand Deployment Plan.You can edit and save the deployment plan, if you choose.
- Click Deploy.Fusion Middleware Control displays processing messages.
- When the deployment is completed, click Close.
- In the Confirmation page, click Redeploy.
Laisser un commentaire