JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS Database Binding Component Tutorial     Java CAPS Documentation
search filter icon
search icon

Document Information

Using the Database Binding Component

Tutorial Plan

Database Binding Component Project in a Nutshell

Starting the GlassFish V2 Application Server

To Start the GlassFish V2 Application Server From NetBeans IDE

Creating a BPEL Module Project For Table Type Operations

To Create a BPEL Module Project

Connecting to a MySQL Database

To Connect to a MySQL Database

Starting the GlassFish Admin Console

To Start the Admin Console

Setting Up Database Access

Integrating a JDBC Driver

To Integrate a JDBC Driver

Creating a JDBC Connection Pool

To Create a JDBC Connection Pool

To Create a JDBC Resource

Creating a WSDL Document For Type : DATABASE

To Create a WSDL Document : dbWSDL

To Select the Database Connection

To Edit the SQL Code

Source View

Creating a WSDL Document For Type SOAP

To Create a WSDL Document : SOAPWSDL

Creating a BPEL Process

To Create a BPEL Process

To Add a Partner Link

To Add a Web Service and Basic Activities

To Edit Web Service : Receive1

To Edit the Web Service : Invoke1

To Edit the Web Service : Reply1

To Edit the Basic Activities : Assign1

To Edit the Basic Activities : Assign2

Validating BPEL

To Invoke Explicit Validation

Design View : Notifications

The Design View

Creating the Composite Application Project

To Create the Composite Application Project

Deploying and Testing the Composite Application

To Deploy the Composite Application

To Test the Composite Application

Debug the Test Case

To Debug the Test Case

Creating a BPEL Module Process Using Prepared Statements

Creating a BPEL Module Project Using Procedures

Creating a BPEL Module Project Using SQL File

Creating a BPEL Module Process Using Prepared Statements

A Prepared Statement represents a SQL statement that has been compiled. Prepared statements can be used to perform insert, update, delete and query operations. Prepared statements provide the ability to create queries that are more secure, have better performance, and are more convenient to write. They come in two flavors: bound parameter prepared statements, and bound result prepared statements.

Prepared statements allow query templates to be created and then stored on the database server. When a query needs to be made, data to fill in the template is sent to the database server, and a complete query is formed and then executed.

The basic process for creating and using bound parameter prepared statements is simple. A query template is created and sent to the database server. The database server receives the query template, validates it to ensure that it is well-formed, parses it to ensure that it is meaningful, and stores it in a special buffer. It then returns a special handle that can later be used to reference the prepared statement. When a query needs to be made, data to fill in the template is sent to the database server, and then a complete query is formed and then executed.

This process has some very important behaviors wrapped up in it. The body of the query is only sent to the database server once. On requests to execute the query, only the data to fill in the template needs to be delivered to the database server. Most of the work required to validate and parse the query only needs to be done a single time, instead of each time that the query is executed. Additionally, for queries that contain a small amount of data, the overhead of sending the query is greatly reduced.

For steps, see the following links:

  1. Creating a WSDL Document For Type : DATABASE

    1. Select Type — Prepared Statement.

      image:Prepared Statement
    2. Enter a valid Prepared Statement.

    3. Click Discover Parameters to view types for the parameters.

    4. Click Discover Resultset to discover the Resultset types.

      image:Prepared Statement — Parameters
    5. Click Next.

    6. Enter JNDI Name.

    7. Click Finish.

  2. Creating a WSDL Document For Type SOAP.

  3. Creating a BPEL Process.

  4. Validating BPEL.

  5. Design View : Notifications.

  6. Creating the Composite Application Project.

  7. Deploying and Testing the Composite Application.

For a demonstration, see http://wiki.open-esb.java.net/Wiki.jsp?page=DatabaseBindingComponentPollScenario.