Deploying ADF Essentials on Oracle Weblogic Server 12c
By Juan Camilo Ruiz on Dec 24, 2012
The recent released ADF Essentials gives developers a free version of the core components of the ADF framework which they can use to build an end-to-end ADF-based solution including advanced UI components, taskflows, the binding layer and business components or EJBs.
While Oracle Weblogic Server 12c was released a few months back, none of the current ADF releases are officially certified to run on it. However, with a little bit of tweaking here and there, I've manged to completely deploy an ADF Essentials application on WLS 12c - procedure that I'm going to share in this entry.
Disclaimer: Oracle does not offers support for this deployment today. So feel free to leave your comment in this entry or submit questions on the Oracle Forum if you run into issues and we as a community will try to figure things out.
Adding ADF Essentials to WLS 12c and Tweaking the server startupBefore deploying the ADF application the following steps need to be performed on the server:
- Create a domain where you deploy the ADF Essentials applications e.g adfessentials_domain using, this can be done with the QuickStart assistant. Do not install the JRF libraries on the domain.
- Download and unzip the ADF Essentials libraries inside the <adfessentials_domain>/lib folder using the the following command unzip -j adf_essentials.zip
- My laptop is 64-bit with 8GB of RAM, so I added the following parameters to my environment: export USER_MEM_ARGS="-Xms1024M -Xmx2048m -XX:MaxPermSize=640m"
- Start the server using <adfessentials_domain>/bin/startWebLogic.sh -Doracle.mds.cache=simple
- Create a data source on the server using the Weblogic Console. e.g jdbc/summit_adfDS
Modifying and Deploying the ADF ApplicationAny given ADF Essentials application' s EAR file contains extra-libraries that are needed for the application to run on 3rd party application servers. For this article I used the ADF Summit application which can be downloaded from here. Before generating the EAR file make the following changes to the application:
- Adjust the Application Module local configuration to use the server's data source defined previously. For the Summit application change the configuration on all the application modules.
- Set the deployment platform to Glassfish3.1 at the ViewController and and at the application level. This will add the required libraries
- Under the application resources->META-INF open the weblogic-application.xml and comment out all of its content.
- For this application in specific I had to remove the reference to the oracleThreeColumnTemplate on the index.jspx, we are currently investigating this as well as the weblogic-application.xml tweak.
- Deploy the application to EAR file.
- Before deploying the application into the server you need to add a modified version of the web.xml file which removes a reference to the Glassfish Listener used for deploying and undeploying. This is the extract of the file that you need to modify: <!--listener> <listener-class>oracle.adf.share.glassfish.listener.ADFGlassFishAppLifeCycleListener</listener-class> </listener-->
- After modifying the file, re-package the application and deploy it to the server. Here is a video that summarized all the steps described above