What You May Need to Know About JDBC Data Source for Oracle WebLogic Server

Deploying an ADF Java EE Application 8-25 class-name= oracle.mds.persistence.stores.file.FileMetadataStore property name=metadata-path value=C:\Temp\ property name=partition-name value=myAppName metadata-store metadata-store-usage metadata-store-usages persistence-config mds-config adf-mds-config In a production environment, an MDS repository that uses a database is required. You can use JDeveloper, Enterprise Manager Fusion Middleware Control, or WLST commands to switch from a file-based repository to a database MDS repository. Additionally, if several applications are sharing the same MDS configuration, you can ensure that each application has distinct customization layers by defining a adf:adf-properties-child property in the adf-config.xml file. JDeveloper automatically generates this entry when creating applications. If your adf-config.xml file does not have this entry, add it to the file with code similar to that of Example 8–6 . Example 8–6 Adding MDS Partition Code to the adf-config.xml File adf:adf-properties-child xmlns=http:xmlns.oracle.comadfconfigproperties adf-property name=adfAppUID value=Application3-4434 adf-property name=partition_customizations_by_application_id value=true adf:adf-properties-child The value attribute is either generated by JDeveloper or you can set it to any unique identifier within the server farm where the application is deployed. This value can be set to the value attribute of the adfAppUID property. When adf-property name is set to adfAppUid, then the corresponding value property should be set to the name of the application. By default, JDeveloper generates the value property using the application’s package name. If the package name is not specified, JDeveloper generates the value property by using the workspace name and a four-digit random number. For more information about configuring Oracle ADF applications using ADF MBeans, see the Oracle Fusion Middleware Administrators Guide for Oracle Application Development Framework.

8.3.7 What You May Need to Know About JDBC Data Source for Oracle WebLogic Server

An Oracle ADF Java EE application can use a JDBC data source to connect to the database. You use the Oracle WebLogic Server Administration Console to configure a JDBC data source. A JDBC data source has three types: global, application level, and application level with password indirection. You generally set up a global JDBC data source in WebLogic Server. Any application that requires access to that database can use that JDBC data source. An application can also include application-level JDBC data sources. When the application is packaged for deployment, if the Auto Generate and Synchronize weblogic-jdbc.xml Descriptor During Deployment option is selected, JDeveloper creates a connection_name-jdbc.xml file for each connection that was defined. Each connection’s information is written to the corresponding connection_name-jdbc.xml file entries are also changed in 8-26 Java EE Developers Guide for Oracle Application Development Framework weblogic-application.xml and web.xml. When the application is deployed to WebLogic Server, the server looks for application-level data source information before it looks for the global data source. If the application is deployed with password indirection set to true, WebLogic Server will look for the connection_name-jdbc.xml file for user name information and it will then attempt to locate application-level credential maps for these user names to obtain the password. If you are using JDeveloper to directly deploy the application to WebLogic Server, JDeveloper automatically creates the credential map and populates the map to the server using an MBean call. However, if you are deploying to an EAR file, JDeveloper will not be able to make the MBean call to WebLogic Server. You must set up the credential maps using the Oracle WebLogic Administration Console. Even if you have a global JDBC data source set up, if you do not also have credential mapping set up, WebLogic Server will not be able to map the credentials with passwords and the connection will fail. For more information about JDBC data sources, password indirection, and how to set up application credential mappings, see JDBC Data Sources in the Deploying Applications section of the JDeveloper online help. For more information, see the Preparing the Standalone Application Server for Deployment section of the Oracle Fusion Middleware Administrators Guide for Oracle Application Development Framework.

8.4 Deploying the Application

You can use JDeveloper to deploy applications directly to the standalone application server or create an archive file and use other tools to deploy to the application server. Table 8–2 describes some common deployment techniques that you can use during the application development and deployment cycle. The deployment techniques are listed in order from deploying on development environments to deploying on production environments. It is likely that in the production environment, the system administrators deploy applications by using Enterprise Manager Fusion Middleware Control or scripts. Note: Before you begin to deploy applications that use Oracle ADF to the standalone application server, you need to prepare the application server environment by performing tasks such as installing the ADF runtime and creating and extending domains or cells. For more information, see the Preparing the Standalone Application Server for Deployment section of the Oracle Fusion Middleware Administrators Guide for Oracle Application Development Framework.