Book Image

Developing Web Applications with Oracle ADF Essentials

Book Image

Developing Web Applications with Oracle ADF Essentials

Overview of this book

With ADF, Oracle gives you the chance to use the powerful tool used by Oracle's own developers. Modern enterprise applications must be user-friendly, visually attractive, and fast performing. Oracle Fusion Applications are just that; but to get the desired output you need proven methods to use this powerful and flexible tool to achieve success in developing your enterprise applications. "Developing Web Applications with Oracle ADF Essentials" explains all you need to know in order to build good-looking, user-friendly applications on a completely free technology stack. It explains the highly productive, declarative development approach that will literally have your application running within a few hours, as well as how to use Java to add business logic. "Developing Web Applications with Oracle ADF Essentials" tells you how to develop and deploy web application applications based on the highly productive and free Oracle ADF Essentials framework. You will first learn how to build business services on top of database tables, and then how to easily build a web application using these services. You will see how to visually design the flow through your application with ADF task flows, and how to use Java programming to implement business logic. Using this book, you can start building and deploying advanced web applications on a robust, free platform quickly. Towards the end, you will be ready to build real-world ADF Essentials applications and will be able to consider yourself an ADF Essentials journeyman.
Table of Contents (16 chapters)
Developing Web Applications with Oracle ADF Essentials
About the Author
About the Reviewers

Can it run faster?

Because the deployment from JDeveloper to GlassFish currently takes quite a long time, many developers choose to run their new code first in the WebLogic server that is pre-integrated into JDeveloper. If you set up WebLogic for MySQL, a simple application like the preceding should be able to start in 20-30 seconds instead of several minutes.


Hopefully, the deployment speed to GlassFish will be improved in the future. Check out the for any tips about speeding up deployment that have been discovered after the publication of this book.

Setting up WebLogic for MySQL

If you want to run MySQL applications in the built-in WebLogic server, you first need to copy the MySQL Connector JAR (mysql-connector-java-5.1.25-bin.jar) to a directory where WebLogic can find it. A good choice is the directory for external libraries in the JRA installation: C:\adfessentials\middleware111240\jdk160_24\lib\ext.


If you are familiar with WebLogic, you should be able to place the MySQL connector in the WebLogic default domain lib directory. However, in JDeveloper, this does not work. Either use the preceding directory or modify the domain startup scripts.

Adding a DataSource to WebLogic

Once you have the driver installed, you need to define a datasource with the right name like you did earlier in the chapter for GlassFish.

First, in JDeveloper, start the built-in WebLogic server with the command Run | Start Server Instance. The first time you start the server, you will be prompted for a password to the default domain. Watch the messages in the log window until you see the following command:

<Server started in RUNNING mode>

Then, open a web browser and type in the address http://localhost:7101/console. Log in with the admin user and the password you provided. After a little while, the WebLogic console window opens.

Expand the Services node under Domain Structure to the left and select the Data Sources node. Click on New | Generic Data Source. Give your datasource a Name (SakilaDS) and a JNDI Name (jdbc/SakilaDS), and choose Database Type as MySQL. In the next two steps, just leave the defaults. On the Connection Properties page, provide your connection details:

  • Database Name: sakila

  • Host Name: localhost

  • Port: 3306

  • Database User Name: root

  • Password and Confirm Password: Your database root password, for example, ADFsecret/13

On the following screen, click on Test Configuration. You should see Connection test succeeded.

Click on Next (not Finish) and check the checkbox next to DefaultServer. Then, click on Finish.


In WebLogic, a JDBC driver definition is by default not connected to any server. If you forget to check the checkbox associating the SakilaDS datasource with the DefaultServer, the server can't connect to the database.

Running your first ADF Essentials application again

To run your first ADF Essentials application in the built-in WebLogic, server simply right-click on FilmPage in the Application Navigator and choose Run. The application will automatically be re-built, deployed to the built-in WebLogic server, and opened in a browser.