Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Overview of this book

Table of Contents (20 chapters)
JDBC 4.0 and Oracle JDeveloper for J2EE Development
Credits
About the Author
About the Reviewer
Preface

Creating a Data Table by Binding a MBean


In this section we will create a Data Table with the Create Data Table Wizard by binding the Data Table with a managed bean that represents the data source for the Data Table . The procedure to create a Data Table using an MBean is as follows:

  1. 1. Create a JavaBean class for a Web Service.

  2. 2. Create a Service Endpoint Interface (SEI) for the Web Service.

  3. 3. Generate a Web Service from the Javabean class and the SEI.

  4. 4. Create a client class for Web Service. In the client class, connect to Oracle database using JDBC and run an SQL query to create a ResultSet, which represents the collection of data objects that we will bind to the Data Table.

  5. 5. Create an MBean from the Web Service client class.

  6. 6. In a JSF page bind a Data Table to the MBean.

First, create an application and a project in JDeveloper 10.1.3 as shown.

The Data Table JSF application consists of three tiers: the database, the middle-tier MBean, and the JSF user interface. Add a JavaBean class...