BEA Logo BEA WebLogic Server Release 6.1

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

  |  

  WebLogic Server Doc Home   |     Programming WebLogic JDBC   |   Previous Topic   |   Next Topic   |   Contents   |   View as PDF

Programming WebLogic JDBC

 

 

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 Interface Definitions

JDBC 2.0

Limitations

Platforms

 

Administration and Configuration for WebLogic JDBC

Configuring JDBC

Configuring Connection Pools

Configuring MultiPools

Configuring DataSources and TxDataSources

Monitoring JDBC Connectivity

 

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

 

Configuring WebLogic JDBC Features

Using Connection Pools

Advantages to Using Connection Pools

Connection Pool Fail-Over Requirements

Creating a Connection Pool at Startup

Connection Pool Attributes

Notes About Refreshing Connections in a JDBC Connection Pool

Permissions

Connection Pool Limitation

Creating a Connection Pool Dynamically

Properties

Dynamic Connection Pool Sample Code

Import Packages

Use JNDI to Retrieve the JdbcServices Object

Set the Properties

Create the Dynamic Pool

Retrieve the Pool Handle

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

Choosing the MultiPool Algorithm

High Availability

Load Balancing

MultiPool Fail-Over Limitations and Requirements

Guidelines to Setting Wait for Connection Times

Messages and Error Conditions

Exceptions

Capacity Issues

Configuring and Using DataSources

Importing Packages to Access DataSource Objects

Obtaining a Client Connection Using a DataSource

Code Examples

 

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

Row Caching with the WebLogic RMI Driver

Important Limitations to Using Row Caching with the WebLogic RMI Driver

Using the WebLogic JTS Driver

Implementing with the JTS Driver

Using the WebLogic Pool Driver

 

Using Third-Party Drivers with WebLogic Server

Overview of Third-Party JDBC Drivers

Limitations

Setting the Environment for Your Third-Party Driver

CLASSPATH for Third-Party Driver on Windows

CLASSPATH for Third-Party Driver on UNIX

Updating Oracle Thin Driver

Using the Oracle 10g Thin Driver

Package Change for Oracle Thin Driver 9.x and 10g

Updating Sybase jConnect Driver

Installing and Using the IBM Informix JDBC Driver

Connection Pool Attributes when using the IBM Informix JDBC Driver

Programming Notes for the IBM Informix JDBC Driver

Getting a Connection with Your Third-Party Driver

Using Connection Pools with a Third-Party Driver

Creating the Connection Pool and DataSource

Using a JNDI Lookup to Obtain the Connection

Getting a Physical Connection from a Connection Pool

Code Sample for Getting a Physical Connection

Limitations for Using a Physical Connection

Obtaining a Direct (Non-pooled) JDBC Connection

Obtaining a Direct Connection Using the Oracle Thin Driver

Obtaining a Direct Connection Using the Sybase jConnect Driver

Oracle Thin Driver Extensions

Sample Code for Accessing Oracle Extensions to JDBC Interfaces

Import Packages to Access Oracle Extensions

Establish the Connection

Retrieve the Default Row Prefetch Value

Sample Code for Accessing Oracle Blob/Clob Interfaces

Import Packages to Access Blob and Clob Extensions

Query to Select Blob Locator from the DBMS

Declare the WebLogic Server java.sql Objects

Begin SQL Exception Block

Updating a CLOB Value Using a Prepared Statement

Tables of Oracle Interfaces

Oracle Extensions and Supported Methods

Oracle Blob/Clob Extensions and Supported Methods

 

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 (Deprecated)

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 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

Checking Record Status Before Saving

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. Setting parameters

Step 3. 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

 

Testing JDBC Connections and Troubleshooting

Testing Connections

Validating a DBMS Connection from the Command Line

How to Test a Two-Tier Connection from the Command Line

Syntax

Arguments

Examples

How to Validate a Multitier WebLogic JDBC Connection from the Command Line

Syntax

Arguments

Examples

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

Abandoning JDBC Objects

Troubleshooting Problems with Shared Libraries on UNIX

WebLogic jDriver for Oracle

Solaris

HP-UX

Incorrectly Set File Permissions

Incorrect SHLIB_PATH

 

back to top   next page