BEA Logo BEA WebLogic Server Release 6.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

   Programming WebLogic JDBC:   Previous Topic   |   Next Topic   |   Contents   

 

Programming WebLogic JDBC

 

Contents

 

1. Introduction to WebLogic JDBC

Overview of JDBC

Overview of JDBC Drivers

Types of JDBC Drivers

Table of Drivers

Description of JDBC Drivers

WebLogic Server JDBC Two-Tier Drivers

WebLogic jDriver for Oracle

WebLogic jDriver for Microsoft SQL Server

WebLogic jDriver for Informix

WebLogic Server JDBC Multitier Drivers

WebLogic Pool Driver

WebLogic RMI Driver

WebLogic JTS Driver

Third-Party Drivers

Cloudscape

Sybase jConnect Driver

Oracle Thin Driver

Overview of Connection Pools

Using Connection Pools with Server-side Applications

Using Connection Pools with Client-side Applications

Overview of MultiPools

Choosing the MultiPool Algorithm

Overview of Clustered JDBC

Overview of DataSources

JDBC API

WebLogic JDBC Class Definitions

JDBC 2.0

Limitations

Platforms

2. Administration and Configuration for WebLogic JDBC

Configuring JDBC

Configuring Connection Pools

Configuring MultiPools

Configuring DataSources

Monitoring JDBC Connectivity

3. Performance Tuning Your JDBC Application

Overview of JDBC Performance

WebLogic Performance-Enhancing Features

How Connection Pools Enhance Performance

Caching Data

Designing Your Application For Best Performance

1. Process as Much Data as Possible Inside the Database

2. Use Built-in DBMS Set-based Processing

3. Make Your Queries Smart

4. Make Transactions Single-batch

5. Never Have a DBMS Transaction Span User Input

6. Use In-place Updates

7. Keep Operational Data Sets Small

8. Use Pipelining and Parallelism

4. Configuring WebLogic JDBC Features

Using DataSources

DataSource Import Statements

Setting Up WebLogic Server to Use a DataSource

Obtaining a Client Connection Using a DataSource

Code Examples

Using Connection Pools

Creating a Connection Pool at Startup

Properties

Creating a Connection Pool Dynamically

Managing Connection Pools

Retrieving information About a Pool

Disabling a Connection Pool

Shrinking a Connection Pool

Shutting Down a Connection Pool

Resetting a Pool

Using MultiPools

MultiPool Features

Choosing the MultiPool Algorithm

Backup Pool

Load Balancing

Guidelines to Setting Wait For Connection Times

Messages and Error Conditions

SQL Warnings

Capacity Issues

5. Using WebLogic Multitier JDBC Drivers

Overview of WebLogic Multitier Drivers

Using the WebLogic RMI Driver

Limitations When Using the WebLogic RMI Driver

Setting up WebLogic Server to Use the WebLogic RMI Driver

Setting up the Client to Use the WebLogic Server

Import the Following Packages:

Obtain the Client Connection

Using a JNDI Lookup to Obtain the Connection

Using Only the WebLogic RMI Driver to Obtain the Connection

Using the WebLogic JTS Driver

Implementing with the JTS Driver

Using the WebLogic Pool Driver

6. Using Third-Party Drivers with WebLogic Server

Overview of Third-Party JDBC Drivers

Using the Third-Party Drivers

Limitations

Setting the Environment for Your Third-Party Driver

CLASSPATH for Third-Party Driver on Windows NT

CLASSPATH for Third-Party Driver on Unix

Getting a Connection with Your Third-Party Driver

Using Connection Pools With a Third-Party Driver

Create the Connection Pool and DataSource

Using a JNDI Lookup to Obtain the Connection

Setting a Direct Connection

Create the Connection Pool

Setting a Direct Connection Using the Oracle Thin Driver

Setting a Direct Connection Using the Sybase jConnect Driver

7. Migrating JDBC

T3 API Deprecated

JDBC Package Name Change

8. Using dbKona

Introduction to dbKona

dbKona in a Multitier Configuration

How dbKona and a JDBC Driver interact

How dbKona and WebLogic Events Can interact

The dbKona Architecture

The dbKona API

The dbKona API Reference

The dbKona Objects and Their Classes

Data Container Objects in dbKona

DataSet

QueryDataSet

TableDataSet

EventfulTableDataSet

Record

Value

Data Description Objects In dbKona

Schema

Column

KeyDef

SelectStmt

Miscellaneous Objects in dbKona

Exceptions

Constants

Entity Relationships

Inheritance Relationships

Possession Relationships

Implementing With dbKona

Accessing a DBMS With dbKona

Step 1. Importing packages

Step 2. Setting Properties For Making a Connection

Step 3. Making a Connection to the DBMS

Preparing a Query, Retrieving, and Displaying Data

Step 1. Setting Parameters for Data Retrieval

Step 2. Creating a DataSet for the Query Results

Step 3. Fetching the Results

Step 4. Examining a TableDataSet's Schema

Step 5. Examining the Data with htmlKona

Step 6. Displaying the Results with htmlKona

Step 7. Closing the DataSet and the Connection

Using a SelectStmt Object To Form a Query

Step 1. Setting SelectStmt Parameters

Step 2. Using QBE to Refine the Parameters

Modifying DBMS Data With a SQL Statement

Step 1. Writing SQL Statements

Step 2. Executing Each SQL Statement

Step 3. Displaying the Results with htmlKona

Modifying DBMS Data With a KeyDef

Step 1. Creating a KeyDef and Building Its Attributes

Step 2. Creating a TableDataSet with a KeyDef

Step 3. Inserting a Record into the TableDataSet

Step 4. Updating a Record In the TableDataSet

Step 5. Deleting a Record from the TableDataSet

Step 6. More on Saving the TableDataSet

Step 7. Verifying the changes

Code Summary

Using a JDBC PreparedStatement with dbKona

Using Stored Procedures With dbKona

Step 1. Creating a Stored Procedure

Step 2. Examining the Results

Using Byte Arrays For Images and Audio

Step 1. Retrieving and Displaying Image Data

Step 2. Inserting An Image Into a Database

Using dbKona For Oracle Sequences

Constructing a dbKona Sequence Object

Creating and Destroying Sequences on an Oracle Server from dbKona

Using a Sequence

Code Summary

9. Testing JDBC Connections and Troubleshooting

Testing Connections

Validating a DBMS Connection from the Command Line

Troubleshooting JDBC

Troubleshooting JDBC Connections

UNIX users

WinNT

SEGVs with JDBC and Oracle Databases

Out-of-Memory Errors

Codeset Support

Other Problems with Oracle on UNIX

Thread-related Problems on UNIX

Closing JDBC Objects

Troubleshooting Problems with Shared Libraries on UNIX

WebLogic jDriver for Oracle

Solaris

HP-UX

 

Back to Top