• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
Build a Web Application with JDeveloper 10
 g 
Using EJB, JPA, and JavaServerFaces
Purpose
In this tutorial, you use Oracle JDeveloper (10.1.3.1.0 or 10.1.3.2.0) to build a web application.EJB 3.0 and Java Persistence API (JPA) are used to build the data model. For the web client, JSF(JavaServer Faces) is used to build the user interface, which will include a master-detail page andan edit page.Time to Complete1 hour 
Topics
The tutorial covers the following topics:OverviewScenarioPrerequisites
Viewing Screenshots
Place the cursor over this icon to load and view all the screenshots for thistutorial. (Caution: This action loads all screenshots simultaneously, so responsetime may be slow depending on your Internet connection.)
 Note:
Alternatively, you can place the cursor over an individual icon in the following steps toload and view only the screenshot associated with that step. You can hide an individualscreenshot by clicking it.
Overview
The application reflects the Model-View-Controller architecture. The model is provided by EJBComponents, while the view and controller are provided by JavaServer Faces.We will be usingthe ADF Faces set of JSF compatible component to build a richer web user interface.
 
You will first build the data model portion of the application. The Java Persistence API (JPA) provides a POJO persistence model for object-relational mapping. The Java Persistence API wasdeveloped by the EJB 3.0 software expert group as part of JSR 220, but its use is not limited toEJB software components. It can also be used directly by web applications and applicationclients, and even outside the Java EE platform, for example, in Java SE applications.Enterprise JavaBeans (EJB) technology is the server-side component architecture for JavaPlatform, Enterprise Edition (Java EE) that encapsulates business logic. EJB technology enablesrapid and simplified development of distributed, transactional, secure and portable applications based on Java technology.The Java Persistence API is the standard API for the management of persistence andobject/relational mapping. It provides an object/relational mapping facility for applicationdevelopers using a Java domain model to manage a relational database. The Java Persistence APIis part of the Java EE platform. It can also be used in Java SE environments.In the tutorial, you implement a persistence model by developing Session and Entity beans.These beans use the EJB 3.0 annotations and JPA for model persistence.
EJB 3.0 entities represent persistent data from the database, such as a row in a customer table or an employee record in an employee table. Entities are also sharable acrossmultiple clients. You use the Entity Manager API to create, update, delete and query the persistence model.
Session beans perform a distinct, decoupled task such as checking credit history for acustomer.You will then create a master-detail form for viewing Departments and Employees information.Following this basic master-detail page creation, you will create an edit page for the selectedemployee.While developing and testing the application, you will use JDeveloper's embedded Java EEapplication server.Back to Topic List
Scenario
You need to create persistence objects for the DEPARTMENTS and EMPLOYEES tables. The persistence objects are implemented as Entity Beans. Default getter and setter methods arecreated for department and employee data. These methods are implemented as part of a session bean. Then you create a Master Detail JSF page based on Department and related Employees,and an Edit JSF page allowing the update of employee's data.Back to Topic List
Prerequisites
Before starting the tutorial, you should:
1.
Have access to or have installed Oracle JDeveloper (10.1.3.1.0 or 10.1.3.2.0) Production. Youcan download it fromOracle Technology Network .
2.
Have access to or have installed Oracle Database 10g (Release 2 or Release 1). You candownload it from Oracle Technology Network 
 
).Alternatively, you can install the free Oracle XE database. You can download it from OracleTechnology Network (http://www.oracle.com/technology/products/database/xe/index.html
 
). 
3.
Have access to or have installed the Oracle Sample Schemas, included with Oracle Database10g.The tutorial uses the HR schema. Specifically, the pages work with the DEPARTMENT andEMPLOYEES tables.Instructions for installing the HR schema and creating a connection to it in JDeveloper areavailable online at:http://www.oracle.com/technology/obe/obe1013jdev/common/OBEConnection.htm
4.
Start JDeveloper. Double-click the JDeveloper executable
jdeveloper.exe
found in the rootdirectory (
 <jdev_home> 
) where you unzipped it.If the Migrate User Settings dialog box opens, click 
NO
.Close the Tip of the Day window. 
5.
The JDeveloper IDE should now be displayed.
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...