|Oracle® Fusion Applications Developer's Guide
11g Release 1 (11.1.2)
Part Number E15524-02
|PDF · Mobi · ePub|
This chapter provides a basic overview of the Oracle WebLogic Server environment and information about how to run your applications on Integrated WebLogic Server. It also provides information about how to deploy your applications to the Administration Server instance of WebLogic Server for the purpose of performing end-to end testing of new applications. If you are deploying customizations or extensions, see the Oracle Fusion Applications Extensibility Guide.
This chapter includes the following sections:
The scope of this chapter is limited to what is unique in the Oracle Fusion Applications environment. For general details about Oracle WebLogic Server, references are made to the generic Oracle Fusion Middleware guides.
Deployment is the process of packaging application files as an archive file and transferring it to a target application server. You can use JDeveloper to deploy your Oracle Applications Development Framework (Oracle ADF) applications or SOA applications directly to Oracle WebLogic Server or indirectly to an archive file as the deployment target, and then install this archive file to the target server. You also can run Oracle ADF applications (but not SOA applications) in JDeveloper using Integrated WebLogic Server.
If you are using Integrated WebLogic Server, JDeveloper already provides the environment to run the application using the Run command. You do not need to create deployment descriptors or create standalone WebLogic Server domains. For more information on using Integrated WebLogic Server, see Section 52.2, "Running Applications on Integrated WebLogic Server."
If you are deploying the application to a standalone WebLogic Server instance, you must perform several tasks to prepare the application for deployment. You may need to create or edit deployment descriptors and deployment profiles to prepare the application.
Whether you are using standalone or Integrated WebLogic servers to host the application, you will need to configure the WebLogic domains for Oracle Fusion Applications. You must run the Configure Fusion Domain Wizard from JDeveloper to configure the Integrated WebLogic Server or create a property file that is used to configure standalone WebLogic Server instances. For more information about the wizard, see Chapter 2, "Setting Up Your Development Environment."
Table 52-1 describes some common deployment techniques that you can use during the application development and deployment cycle.
Table 52-1 Deployment Techniques for Development Environments
|Deployment Technique||Environment||When to Use|
Run directly from JDeveloper
Test or Development
When you are developing your application. You want deployment to be quick because you will be repeating the editing and deploying process many times.
JDeveloper contains Integrated WebLogic Server, on which you can run and test your application.
Use JDeveloper to directly deploy to the target application server
Test or Development
When you are ready to deploy and test your application on an application server in a test environment.
For example, you can also use the test environment to develop your deployment scripts.
Use JDeveloper to deploy to an EAR file, then use the Oracle WebLogic Server Administration console, WLST commands, or Enterprise Manager for deployment.
Test or Development
When you are ready to deploy and test your application on an application server in a test environment. As an alternative to deploying directly from JDeveloper, you can deploy to an EAR file. and then use other tools to deploy to the WebLogic Server instance.
You can also use the test environment to develop your deployment scripts.
All WebLogic Server instances within the same domain must be at the same major and minor version. Servers within a domain can be at different maintenance pack levels as long as the Administration Server Weblogic Server instance is at the same maintenance pack level or higher than WebLogic Server instances called Managed Servers. For more information about the tasks that are required, see Section 52.3, "Preparing to Deploy Oracle ADF Applications to an Administration Server Instance of WebLogic Server."
After you have performed the tasks required for standalone deployment, you can use JDeveloper to deploy directly to a WebLogic Server instance or to create an Enterprise Archive (EAR) file and deploy the EAR file using WebLogic Server Administration Console, Enterprise Manager, or WebLogic Scripting Tool (WLST) commands.
For more information on how to deploy an application directly using JDeveloper, see Section 52.4, "Deploying Your Oracle ADF Applications to an Administration Server Instance of WebLogic Server."
For more information about deploying the application using WebLogic Server Administration Console, or WLST, see the Oracle Fusion Middleware Administrator's Guide and the Oracle Fusion Middleware Administrator's Guide for Oracle Application Development Framework.
Note:This chapter discusses deploying applications. If you are deploying customizations or extension, see the "Deploying ADF Customizations and Extensions" and the "Deploying SOA Composite Customizations and Extensions" sections of the Oracle Fusion Applications Extensibility Guide.
Before you deploy an application, you should perform the following tasks:
You must run the Configure Fusion Domain Wizard to set up the Integrated WebLogic Server domain or create a property file to be used to set up the standalone WebLogic Server domain. For instructions, see Chapter 2, "Setting Up Your Development Environment."
If you want more debugging output, set the environment variable using one of the shell commands as shown in Example 52-1, before starting the Administration Server instance of WebLogic Server or before starting JDeveloper if you are going to run Integrated WebLogic Server.
You must disable the Auto Generate and Synchronize weblogic-jdbc.xml Descriptors During Deployment option to use the Global Java Database Connectivity (JDBC) datasource. To do this, open Application Properties and choose the Deployment category as shown in Figure 52-1. Unselect the Auto Generate and Synchronize weblogic-jdbc.xml Descriptors During Deployment option and click OK.
A Weblogic Server instance is a configured instance to host applications, such as Web applications, Enterprise applications, and Web services, and resources, such as Java Message Service (JMS), and JDBC, Diagnostics.
There are two types of WebLogic Server instances: Administration Server and Managed Server.
The Administration Server instance is the central configuration controller for the entire domain. Its purpose is to:
Host the Administration Console.
Enable you to start and stop the servers from a central location.
Enable you to migrate servers and services within the domain.
Enable you to deploy applications within the domain.
There is only one Administration Server WebLogic Server instance in a domain, and an Administration Server WebLogic Server instance controls only one domain.
A Managed Server WebLogic Server instance is a running instance that hosts the applications and the resources that are needed by those applications. Each Managed Server WebLogic Server instance is independent of all other Managed Server WebLogic Server instances in the domain, unless they are in a cluster. You can have as many Managed Server WebLogic Server instances as you need in a domain.
The Administration Server WebLogic Server instance stores the master copy of the domain configuration, including the configuration for all Managed Server WebLogic Server instances in the domain. Each Managed Server WebLogic Server instance stores a local copy of its configuration. When a Managed Server WebLogic Server instance starts, it connects to the Administration Server WebLogic Server instance to synchronize the configuration.
In most cases, a single server environment is used for development purposes. This is where a single server acts as the Administration Server WebLogic Server instance and as the host for applications, as illustrated in Figure 52-3.
However, there are some teams that use a Managed Server for either Oracle Enterprise Scheduler (ESS) runtime or Service-Oriented Architecture (SOA). When you are setting up your standalone WebLogic server, you can choose one of the following options:
Administration Server - Oracle ADF (includes ESS libraries)
Administration Server - Oracle ADF + ESS Runtime
Administration Server - Oracle ADF and Managed Server - ESS Runtime
Administration Server - Oracle ADF and Managed Server - SOA
Administration Server and Managed Server - SOA
Figure 52-4 illustrates the structure of the domain directory:
You deploy applications to the Administration Server WebLogic Server instance. Only Administration Servers and Managed Servers are used in a production environment. Therefore, all your end-to-end testing should be done using the Administration Server.
There are two types of Administration Servers:
Not all components are available in both. For example, WebCenter libraries are not available in SOA and SOA libraries are not available in non-SOA. Oracle ADF applications containing UI must be deployed to the non-SOA WebLogic server, and SOA composites must be deployed to the SOA-configured WebLogic Server.
Some services have a SDO co-location requirement and need to be deployed to the SOA container. If the service must be deployed to the SOA-configured WebLogic Server, create a new EAR profile containing only that service or services from your application workspace.
For information about how to configure the SOA WebLogic Server, see Section 2.3, "Setting Up the Personal Environment for Standalone WebLogic Server."
Integrated WebLogic Server is a single server that is included within JDeveloper. You can run your applications directly on this server without needing to deploy. Integrated WebLogic Server is sufficient to run your application to make sure it displays correctly in browsers, or for testing and debugging portions of the application. However, real end-to-end testing should be done in an Administration Server instance of WebLogic Server because that is what will be used in a production environment.
Note:You cannot use Integrated WebLogic Server to run SOA applications. You must deploy SOA applications to a standalone WebLogic Server instance. For more information, see Section 52.5, "Deploying Your SOA Projects to an Administration Server Instance of WebLogic Server."
Integrated WebLogic Server has already been configured with the Oracle Fusion Middleware Extensions for Applications (ApplCore) domain extension templates so all of the Oracle Fusion applications will run on Integrated WebLogic Server as they would in an Administration Server instance of WebLogic Server.
JDeveloper has a default connection to Integrated WebLogic Server and does not require any deployment profiles or descriptors.
When you run your application in JDeveloper using the run or debug commands, Integrated WebLogic Server starts automatically and your application runs in the target browser.
When you use JDeveloper to run an application for the first time, it automatically creates the Integrated WebLogic Server instance.
You can also start the server directly from within JDeveloper. To do this, go to the main menu and select Run > Start Server Instance.
Tip:The first time Integrated WebLogic Server starts, it tries to use the first available port in the 7101 - 7105 range. The following message appears as the first line in the Default server log in JDeveloper. You should use the alternate port for all access:
HTTP port conflict detected. The HTTP port will be reassigned to port 7102.
The server and the application are considered separate entities, so even if you stop the application, it does not stop the server. To terminate the application, select the application name from the terminate button dropdown menu in the Server Instance Log page, as shown in Figure 52-5.
To terminate the server, select the server name, as shown in Figure 52-6.
When an application is running in Integrated WebLogic Server, the Metadata Archive (MAR) profile itself will not be deployed to a repository. Instead, a simulated Oracle Metadata Services (MDS) repository will be configured for the application that reflects the metadata information contained in the MAR. This metadata information is simulated and the application runs based on their location in source control.
Any customizations or documents created by the application are written to this simulated MDS repository directory. You can keep the default location for this directory or you can set it to a different directory. You also have the option to preserve customizations across different application runs or to delete the customizations before each application run.
Before you begin, you must first create your MAR deployment profile. For information about how to create a MAR deployment profile, see Section 52.3.2, "How to Create Deployment Profiles for Standalone WebLogic Server Deployment".
To deploy a MAR deployment profile to Integrated WebLogic Server:
Go to the Application Navigator, right-click the application and select Application Properties.
In the Application Properties dialog, expand Run and choose MDS. See Figure 52-7.
In the Run MDS page:
Select the MAR profile from the MAR Profile dropdown list.
Enter a directory path in Override Location if you want to customize the location of the simulated repository.
Select the Directory Content option. You can choose to preserve the customizations across application runs or delete customizations before each run.
You must prepare the application and the WebLogic Server instance before you deploy applications to an Administration Server instance of WebLogic Server.
Before you begin:
Before you deploy the application to a standalone WebLogic Server instance, you need to:
Create and configure the WebLogic Server domains using the Configure Fusion Domain wizard as described in Chapter 2, "Setting Up Your Development Environment."
If the application is using ADF Security, you may need to:
Configure for Oracle Single Sign-on using Oracle Access Manager (OAM). For more information, see the "Applications That Will Run Using Oracle Single Sign-On (SSO)" section in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.
Migrate application-level security information to the WebLogic Server instance. For more information, see the "Configuring Security for WebLogic Server" section in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.
Set up JDBC URL for WebLogic Server. For more information, see the "Applications with JDBC URL for WebLogic" section in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.
Set up JDBC datasource for WebLogic Server. For more information, see the "Applications with JDBC Data Source for WebLogic" section in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.
Understand LDAP-based stores. For more information, see Section 49.3.8, "What You May Need to Know About Testing."
Shared libraries are available in the integrated and standalone WebLogic Server container and your projects must be updated so that they can use a shared library.
When you create your WebLogic Server domain, all the required shared libraries should be automatically created for you. When you choose a new technology or library in JDeveloper, the
weblogic-application.xml files are automatically updated to reference these shared libraries. If, for some reason, the required references are not created automatically, you must update the
weblogic-application.xml files manually.
The process below shows how to reference a sample oracle.shared.library shared library in a project.
To reference a shared library into a project:
Go to Application Navigator, expand Application Resources > Descriptors > META-INF.
Add reference shared library to
Create a copy of the
You can either accomplish this manually in the editor, or you can right-click the existing
library-ref element to use the copy and paste options.
library-name element to oracle.shared.library. Leave the specification and implementation version values blank.
Caution:Make sure that there are no blank spaces between the tag <library-ref> and the actual entry as they will cause problems.
Repeat steps 2b and 2c to reference additional libraries.
Add reference shared library to
weblogic.xml using the same steps.
The deployment profiles determine how the application is bundled and deployed to Standalone WebLogic Server. When running an application within JDeveloper using Integrated WebLogic Server, these deployment profiles are not used.
Tip:When you run your application in JDeveloper Integrated WebLogic Server, these deployment profiles are not used. Instead, JDeveloper scans the entire workspace or the current working set, (if the Run Working Set option is enabled), to construct the class loader classpaths. If the data model project is eligible to be an EJB then the Libraries and Classpath entries from that project contribute to the application root class loader. The user interface project contributes to the web application class loader.
To deploy the application, you must create deployment profiles applicable to the project or projects. The deployment profiles you need depend on your application requirements. For example, an application may include Business Components Service Interface, Web Application Archive (WAR), and MAR profiles. Once you have defined these, create an EAR deployment profile for the application.
You can only deploy the application as an EAR file at the application level. Creating EAR files from the project level are incomplete and this option is disabled. The project level deployment profiles should be included in the EAR deployment profile.
Depending on the type of projects in your application, you may need to create the following deployment profiles:
Business Components Service deployment profile. For instructions, see the "How to Deploy Web Services to Oracle WebLogic Server" section of the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.
EJB JAR deployment profile. For instructions, see the "Creating an EJB JAR Deployment Profile" section of the Oracle Fusion Middleware Java EE Developer's Guide for Oracle Application Development Framework.
WAR deployment profile. For instructions, see the "Creating a WAR Deployment Profile" section of the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework
MAR deployment profile. For instructions, see the "Creating a MAR Deployment Profile" section of the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework
EAR deployment profile. For instructions, see the "Creating an Application-Level EAR Deployment Profile" section of the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework
You can deploy your Oracle ADF applications to a standalone WebLogic Server instance using JDeveloper or Ant commands.
Any necessary MDS repositories must be registered with the WebLogic Server instance. If the MDS repository is a database, the repository maps to a WebLogic Server system data source with MDS-specific requirements. Before you deploy the application, make sure to target this data source to the Administration Server instance of WebLogic Server. For more information about registering MDS, see the Oracle Fusion Middleware Administrator's Guide.
Note:If you are using the WebLogic Server Administrative Console or WLST scripts to deploy an application packaged as an EAR file that requires MDS repository configuration in
adf-config.xml, you must run the
getMDSArchiveConfigWLST command to configure MDS before deploying the EAR file. MDS configuration is required if the EAR file contains a MAR file or if the application is enabled for Design Time at Runtime. For more information about WLST commands, see the Oracle Fusion Middleware WebLogic Scripting Tool Command Reference.
To deploy your application using JDeveloper, you create a connection to the application server and then deploy the application.
To create an application server connection:
Start WebLogic Server instance.
Open your application in JDeveloper.
Launch the Application Server Connection wizard.
In the Application Server Navigator, right-click Application Servers and choose New Application Server Connection.
In the New Gallery, expand General, select Connections and then Application Server Connection, and click OK.
In the Resource Palette, choose New > New Connections > Application Server.
Complete the wizard:
Enter the following information as you progress through the wizard:
Connection Name: Enter a name for the connection.
Username and Password: Enter a user name and password for the administrative user authorized to access the application server.
Weblogic Hostname Administration Server): Enter the name of the WebLogic Server instance containing the TCP/IP DNS where your application (
.jar,.war,.ear) will be deployed.
Port: Enter a port number for the Oracle WebLogic Server instance on which your application (
.jar,.war,.ear) will be deployed.
In the SSL Port field, enter an SSL port number for the Oracle WebLogic Server instance on which your application (
.jar,.war,.ear) will be deployed.
Select Always Use SSL to connect to the Oracle WebLogic Server instance using the SSL port.
WebLogic Domain: Optionally enter a domain only if Oracle WebLogic Server is configured to distinguish nonadministrative server nodes by name.
Test the connection.
Click Finish to close the wizard and create your application server connection.
After you have created an application server connection and an EAR deployment profile, you can deploy the application to a standalone application server.
To deploy an application:
Deploy your project to the application server:
In the Application Navigator, right-click your application and choose Deploy > deployment profile.
In the Deploy wizard Deployment Action page, select Deploy to Application Server and click Next.
In the Select Server page, select the application server connection, and click Next.
The WebLogic Options page appears. Select a deploy option and click Next.
adf-config.xml file in the EAR file requires MDS repository configuration, the Deployment Configuration dialog appears for you to choose the target metadata repository or shared metadata repositories, as shown in Figure 52-8.
The Repository Name dropdown list allows you to choose a target metadata repository from a list of metadata repositories registered with the Administration Server instance of WebLogic Server. The Partition Name dropdown list allows you to choose the metadata repository partition to which the application's metadata will be imported during deployment. For more information about managing the MDS repository, see the Oracle Fusion Middleware Administrator's Guide.
Note:If you are deploying an Oracle ADF application, do not use the Deploy to all instances in the domain option.
Verify the run-time application as:
For example, http://server06.us.company.com:7001/UIPatternsDemo/faces/ServiceRequest
You can also use the deployment profile to create an archive file (EAR file). You can then deploy the archive file using Enterprise Manager, WLST, or the Oracle WebLogic Server Administration Console.
Although an application is encapsulated in an EAR file (which usually includes WAR, MAR, and JAR components), it may have parts that are not deployed with the EAR. For instance, ADF Business Services can be deployed as a JAR.
To create an EAR archive file:
In the Application Navigator, right-click the application containing the deployment profile, and choose Deploy > deployment profile > to EAR file.
You can deploy your SOA projects using either JDeveloper or the other administration tools described in Table 52-1.
This section discusses how to deploy your SOA projects into the Administration Server instance of WebLogic Server using JDeveloper.
The basic steps to deploying your SOA project from within JDeveloper are:
Define a connection. For instructions to create an application server connection, see the "To create an application server connection" section of the Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite.
Deploy the Project. For instructions to deploy a SOA project, see the "Deploying the Profile " section of the Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite
Check the deployed SOA Project.
You can check and run your deployed SOA project from two locations:
From Enterprise Manager on port 7001 by opening the Weblogic Hostname (Administration Server) URL for which you created the Connection, such as:
After you log in, a screen similar to Figure 52-9 displays (the SOA tree in the left pane has been expanded and the first deployment has been selected):