How to Replicate Memory Scopes in a Clustered Environment How to Enable the Application for ADF MBeans

8-24 Java EE Developers Guide for Oracle Application Development Framework Before you deploy the application to WebSphere, manually edit the web.xml file for your application to change the allPages security constraint as follows: security-constraint web-resource-collection web-resource-nameallPagesweb-resource-name url-patternurl-pattern web-resource-collection . . . security-constraint

8.3.5 How to Replicate Memory Scopes in a Clustered Environment

If you are deploying an application that is intended to run in a clustered environment, you need to ensure that all managed beans with a lifespan longer than one request are serializable, and that the ADF framework is aware of changes to managed beans stored in ADF scopes view scope and page flow scope. For more information, see the How to Set Managed Bean Memory Scopes in a Server-Cluster Environment section of the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework.

8.3.6 How to Enable the Application for ADF MBeans

An ADF application uses many XML files for setting configuration information. Some of these configuration files have ADF MBean counterparts that are deployed with the application. After the application has been deployed, you can change configuration properties by accessing the ADF MBeans using the Enterprise Manager Fusion Middleware Control MBean browser. To enable ADF MBeans, you must register them in the web.xml file. Example 8–4 shows a web.xml file with listener entries for connections and configuration. Example 8–4 Enabling ADF MBeans in the web.xml File listener listener-class oracle.adf.mbean.share.connection.ADFConnectionLifeCycleCallBack listener-class listener listener listener-class oracle.adf.mbean.share.config.ADFConfigLifeCycleCallBacklistener-class listener Additionally, the ADFConnection and ADFConfig MBeans require the application to be configured with an MDS repository. MDS configuration entries in the adf-config.xml file for a file-based MDS are shown in Example 8–5 . For more information about configuring MDS, see the Oracle Fusion Middleware Administrators Guide. Example 8–5 MDS Configuration Entries in the adf-config.xml File adf-mds-config xmlns=http:xmlns.oracle.comadfmdsconfig mds-config xmlns=http:xmlns.oracle.commdsconfig version=11.1.1.000 persistence-config metadata-store-usages metadata-store-usage default-cust-store=true deploy-target=true id=myFileStore metadata-store name=myReposName 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