Oracle ADF 11gR2 Development Beginner's Guide ADF 11gR2 Development Beginner's Guide . Vinod Krishnan . Chapter No.10 Deploying the ADF Application

  • Published on
    18-Mar-2018

  • View
    220

  • Download
    5

Transcript

  • Oracle ADF 11gR2 Development Beginner's Guide

    Vinod Krishnan

    Chapter No.10 "Deploying the ADF Application"

  • In this package, you will find: A Biography of the author of the book

    A preview chapter from the book, Chapter NO.10 "Deploying the ADF Application"

    A synopsis of the books content

    Information on where to buy this book

    About the Author Vinod Krishnan has over eight years' experience in the Information Technology industry this exposed him to a wide range of technologies that include Java, J2EE, WebLogic, Fusion Middleware, SOA, and Webcenter.

    He has been working with Oracle ADF Technologies since 2005, and enhanced his affinity towards ADF after he joined Oracle India. For the last five years, Vinod is actively involved in large implementations of next-generation enterprise applications, utilizing Oracle's JDeveloper and Application Development Framework (ADF) technologies. He holds a B.Tech. in Information Technology from Anna University, Chennai, India.

    He is currently responsible for building and deploying applications using the Oracle Fusion Middleware technology stack as a Project Lead in Oracle America.

    He is an Oracle Certified Specialist, and the technologies he has worked on include Oracle ADF, SOA, Webcenter, and Identity Management. His contribution towards Jdeveloper and ADF discussion forums is immense. With his experience, he has learned many tips and techniques that will help a new user to learn this technology without any hassles. He writes his own blog (http://vtkrishn.com) that discusses the tips and tricks with using Oracle technologies.

    For More Information: www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

    http://www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

  • Vinod has had a multifaceted career, he has worked in positions such as Senior Consultant, Senior Applications Engineer, Software Engineer, and Solution Architect for MNCs such as Oracle, Capgemini, and Keane. Currently he is working as a Project Lead in Oracle America.

    I would like to express my gratitude to the people who saw me through this book, to all those who provided support, talked things over, read, wrote, offered comments, allowed me to quote their remarks, and assisted in the editing, proofreading, and design.

    I want to thank my wife, Sandhya, who supported and encouraged me in spite of all the time it took me away from her. It was a long and difficult journey for her.

    I would like to thank Grant Mizen, Stephanie Moss, Ameya Sawant, and Poonam Jain for helping me with the process of selection and editing.

    Thanks to Packt Publishing for giving me the opportunity to help and guide new users of ADF with my book.

    For More Information: www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

    http://www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

  • Oracle ADF 11gR2 Development Beginner's Guide Application Development Framework (ADF) 11gR2 is the next-generation JEE framework from Oracle for building robust and scalable enterprise applications. ADF 11gR2 provides out of the box infrastructure solutions that simplify application development and end user experience. Application development using ADF 11gR2 is fun as it provides a visual and declarative development experience. Some of the noted features offered by ADF 11gR2 are rich and powerful components support for rich Internet applications, Page Flow 2.0 support, drag-and-drop support for data bindings, ADF business components support, mobile development support, security implementation support, declarative development support, runtime customization, reusability support, and so on.

    Oracle ADF 11gR2 Development Beginner's Guide aims to provide step-by-step instructions for designing, developing, and deploying a highly scalable, secured, and rich Internet application. This book will help any user with basic programming skills to quickly learn what options are available, and how to develop web applications using ADF 11gR2. This book has been designed to help you learn basics and have fun while developing practical applications using ADF 11gR2.

    In this book, you will learn about developing web-based applications using ADF 11gR2 in a simple and easy way. Screenshots and practical instructions are included to make the book more interactive. This book will serve as a faithful friend to its readers.

    What This Book Covers Chapter 1, Installing and Configuring JDeveloper IDE will teach you how to install and configure the JDeveloper IDE, and how to work with the IDE.

    Chapter 2, Getting Started with ADF will teach you the basics of the Model-View-Controller architecture, how ADF fits into the MVC pattern, the components of ADF, and how to build a simple ADF application.

    Chapter 3, Understanding the Model Layer will teach you about ADF Business Components, how they work, and it will help you familiarize with the components.

    Chapter 4, Validating and Using the Model Data describes how to write business logic declaratively. Learn groovy expressions, and how to manage transactions and expose the data.

    Chapter 5, Binding the Data teaches you how to use the data controls and bind the data for the user interface.

    For More Information: www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

    http://www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

  • Chapter 6, Displaying the Data shows how to display the data in the UI using layers and components.

    Chapter 7, Working with Navigation Flows describes how to use page flows and activities, pass parameters, and about the ADF life cycle.

    Chapter 8, Layout with Look and Feel will teach you how to style the page and make it presentable.

    Chapter 9, Implementing Security will help in securing the page that you have created, and show how to allow and restrict access for different roles and groups.

    Chapter 10, Deploying the ADF Application will help you deploy the application to the server.

    Chapter 11, Advanced Features of ADF delves into the Advanced features of the ADF 11gR2 framework.

    For More Information: www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

    http://www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

  • 10Deploying the ADF Application

    Once the web application is designed, developed, and tested, the next task is to make it available for the public to access and experience the user interface and interactions. The web application is deployed to a server that can be accessed by users from any location using a web browser. The application hosted on a web server will be accessed through a request made by the user using the HTTP protocol. For any application lifecycle, deploying the application to the server is important to make it accessible from anywhere.

    In the case of the ADF web application, we will normally deploy the application as a J2EE application. The deployed application inside the web container of the server will serve the user requests.

    In this chapter, we will learn:

    ADF applica on deployment

    Preparing for deployment

    Deployment to the WebLogic server

    For More Information: www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

    http://www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

  • Deploying the ADF Applica on

    [ 238 ]

    ADF application deploymentThe ADF web applica on fi les are packaged into archives and deployed to the server for user access and interac on. Normally, in a development environment, JDeveloper 11gR2 comes with an integrated WebLogic server to test the applica on. The ADF applica on can be deployed to diff erent servers such as WebLogic and WebSphere which are provided with the ADF run me libraries, and the shared libraries related to the web applica on are available for the server. Using JDeveloper, the user can deploy the current applica on and test it with the use of the integrated WebLogic server.

    OverviewDeploying an applica on is as important as developing the applica on. The WebLogic server 10.3.5.0 is integrated with JDeveloper 11.2.2.0 . There is an op on for us to deploy the applica on to a diff erent applica on server provided that the server contains all run me libraries to support the ADF applica on. The ADF run me libraries, which are called Java Resource Files (JRF), are provided by default for the WebLogic server , WebSphere , and GlassFish . The ADF applica on is deployed to the server as a packaged enterprise archive which contains the required web content and related resource fi les. All the deployment library proper es are confi gured from the Deployment op on in the Project proper es and Applica on proper es op ons. The diff erent archives that are helpful at diff erent stages of the ADF web applica on deployments are as follows:

    Java Archive (JAR): Java archive is a Java specifi c archive that is used to package all the Java class fi les related to the project. For example, we can bundle all the u lity class fi les as a Java archive fi le and then use it in any other project. JAR fi les are used as libraries in the Model and Viewcontroller projects. The fi le structure includes a class fi le and a META-INF folder that contains the MANIFEST.MF fi le.

    ADF library (JAR): The ADF library is an archive that is specifi c to the ADF framework. The ADF library is diff erent from a Java archive fi le because the ADF library will pull all related libraries referenced by the fi les and add it to the manifest fi le. The dependent libraries are pulled by JDeveloper and added as a secondary import. The ADF library will expose the ADF task fl ows and other ADF-specifi c metadata fi les that are not exposed by a normal Java archive fi le. ADF libraries may contain task fl ows but are also used for declara ve components and page templates. Using the ADF library, we can drag-and-drop the task fl ow onto the page as a region. The structure includes the META-INF folder containing the manifest fi le along with the jar-connection.xml and jar-adf-config.xml fi les specifi c to the ADF library. The ADF library can contain confi gura on fi les for the ADF applica on.

    For More Information: www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

    http://www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

  • Chapter 10

    [ 239 ]

    Web Applica on Archive (WAR): Web archive is a package of all the web-related fi les. The Web Archive op on is available from the Viewcontroller project that contains the web resources. All fi les such as .html, .jspx, .jsff, and .jsf are packaged as WAR fi les. The fi le structure contains a WEB-INF folder that contains adfc-config.xml, web.xml, weblogic.xml, faces-config.xml, trinidad-config.xml, and so on. The classes folder contains the Java classes such as backing or managed bean added in the UI project. The lib folder will include all the dependent libraries that are required to compile the web archive fi le.

    Metadata Archive (MAR): This archive will package all the metadata fi les needed for the customiza on of the web pages. Customiza on includes a few XML fi les that will have the delta details for diff erent users. The metadata archive will package the XML fi les along with the confi gura on fi les to support the user customiza on. More about this will be discussed in Chapter 11, Advanced Features of ADF.

    Enterprise Archive (EAR): Most of the web applica ons which involve model data interac on will be packaged using the enterprise archive. The business logic which interacts with the data layer and the presenta on layer is collec vely bundled into a single archive. The presenta on layer informa on is bundled internally using the web archive and then it is added to the enterprise archive. The folder structure of an EAR will be as follows:

    adf

    META-INF

    adf-config.xml

    connections.xml

    lib

    META-INF

    application.xml

    cwallet.sso

    HRSchema-jdbc.xml

    jps-config.xml

    weblogic-application.xml

    ViewController_Webapp.war

    For More Information: www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

    http://www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

  • Deploying the ADF Applica on

    [ 240 ]

    Preparing for deploymentBefore deploying the ADF applica on to the applica on server, we have to make sure that the following tasks are set up correctly in order to deploy the applica on:

    Connec on

    Deployment profi les

    MDS confi gura on

    Deployment descriptors

    Security

    Data source

    ConnectionThe database connec on is essen al for deployment. The ADF Business Components sec on in the Model project will display the database connec on informa on for accessing the data from the DB layer. In EmpDirectoryApplication, we have the HRSchema connec on added to the Model project as the database connec on. The connec on informa on is stored in connections.xml. The connec on name alone can be deployed by selec ng the Connec on Name Only op on for the deployment profi le of the Model project. You also have an op on to deploy the Connec on Details op on in the same loca on.

    For More Information: www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

    http://www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

  • Chapter 10

    [ 241 ]

    Deployment profi lesThe deployment profi le is the se ng that is added to the project to confi gure the project for deployment. Deployment will package the project related fi les and archive it as a library. The profi le informa on will include the dependent libraries, archive loca on, fi lter op on for the fi les to include, and so on.

    Time for action creating the deployment profi leNow we will see how to create a deployment profi le for EmpDirectoryApplication. First, we will create the profi le for the ViewController project and later we will create a profi le for the applica on. Crea ng an ADF library is explained in Chapter 8, Layout with Look & Feel.

    1. Right-click on the ViewController project and select Deploy from the menu op ons.2. Select the New Deployment Profi le from the New bu on in the Deployment

    sec on of the Project proper es pane, which will create a new deployment profi le.

    The Create Deployment Profi le dialog box is displayed to the user. Select WAR File from the Profi le Type op ons and then provide Deployment Profi le Name as webappEmpDir as shown in the previous screenshot.

    3. Click on the OK bu on to open the Edit WAR Deployment Profi le Proper es page. The General sec on will allow the user to specify the WAR fi le's loca on and the web applica on's context root.

    4. The Profi le Dependencies and Library Dependencies sec ons are used to provide the dependencies for the WAR fi le. Check the adflibModel library from the Profi le Dependencies sec on under the Model sec on.

    For More Information: www.packtpub.com/oracle-adf-11gr2-development-beginners-guide/book

    http://www.packt...

Recommended

View more >