1 Aims and Objectives of This Book

Java is a popular language among developers that is used to build various enterprise solutions.

This guide will help you understand all Java products used to build a Java application. You will learn about Oracle JDBC Thin driver, Universal Connection Pool (UCP), and Java in the Database (OJVM). You will also learn about how to use these in the Web application.

This application will show you how to store details of all employees in a sample organization, add a new employee, delete an employee, and provide a salary increment to all employee in the organization.

The Web application will have two distinct users — ‘HR Admin’ and ‘HR Staff’, with each having different roles and privileges.

Over a period of two days, this guide aims to help you build a Web application using all the latest tools and technologies, JDBC driver, UCP, Java in the Database, and Oracle Database 12c Release 2 (12.2).

The guide will help you set up all prerequisites to create the Web application, including installing Oracle Database 12c Release 2 (12.2).

What you will achieve in

1.1 Architecture of the Application

Architecture of the Web Application

The HR Web application uses the MVC (Model, View, Controller) architecture and the latest tools and technologies.

For the View, or Presentation layer, you will use HTML that internally uses JavaScript, JQuery and CSS to display the results.

The Servlet will act as a controller that connects to Oracle Database through Java Beans. You will also use Maven to compile the entire Web application.

Following is a link to the Web application:

You will use HR schema and the Employees to understand the flows in the Web application.

1.2 Part I

Part I of this covers all tasks that you will cover in Day 1:

1 Understand JDBC, UCP and Java in the Database: You will familiarize yourself with the products, associated binaries and packages.

2 Overview of the HR Web Application: This chapter will discuss the HR Web application in depth and familiarize you with the flows of the Web application, packages and files that you will use in the Application.

3 Getting Started with the Application: You will understand the pre-requisites for building the application and how to get the environment ready. Some of the tools required to run the Application are Oracle Database 12c Release 2 (12.2), JDeveloper, Maven, and a Java EE to deploy and run the Application.

4 List All Employees: This chapter will help you how to put all components together and build an initial functionality to connect to the Oracle Database, and retrieve employee details from the database.

1.3 Part II

Part II covers all tasks you will complete in Day 2. You will learn how to use Universal Connection Pool (UCP) and Java in the Database (OJVM). You will also learn how to:

1 Search By Employee ID: This chapter provides details on how to implement the ‘Search by Employee ID’ functionality.

2 Update an Employee Record: In this chapter, you will learn how to update employee records.

3 Delete an Employee Record: Here, you will learn a series of steps to delete an employee record.

4 Increase Salary to All Employees: You will understand how to provide increment to the salary of the employees listed in the table.

5 Summary: This chapter will summarize all that you have learnt over the two days. It will also provide appropriate references and links for enhancing your use of the Application.