Skip Headers
Oracle® Application Server TopLink Application Developer's Guide
10g Release 2 (10.1.2)
Part No. B15901-01
  Go To Documentation Library
Go To Product List
Solution Area
Go To Table Of Contents
Go To Index


Introduction to Data Access Concepts

In OracleAS TopLink applications, data access offers the functionality and features that enable you to manipulate data on a database and map a data source with the OracleAS TopLink Software Development Kit (SDK).

This section introduces some of the key concepts associated with OracleAS TopLink data access features.

JDBC Connections

Java Database Connectivity (JDBC) is an application programming interface (API) that gives Java applications access to a database. OracleAS TopLink applications rely on JDBC connections to read objects from, and write objects to, the database.

OracleAS TopLink applications use either individual JDBC connections or a JDBC connection pool, depending on the application architecture.

Individual JDBC Connections

An individual JDBC connection gives a single user access to the database for a single session. For example, a two-tier OracleAS TopLink architecture usually connects to the database using a database session and a single JDBC connection. OracleAS TopLink invokes the JDBC connection as part of the login for the database session in the sessions.xml file.

For more information about sessions, see Chapter 4, "Sessions".

JDBC Connection Pools

A JDBC connection pool is a collection of JDBC connections managed as a group. Most three-tier multiuser applications use connection pools.

JDBC connection pools enable you to configure connections for several users using less than a one-to-one ratio of connections to users, because the connections in the pool are reusable. For example, a two-tier application requires one JDBC connection for its one user. A three-tier application, conversely, can support several thousand users with a connection pool of only a few connections, depending on the application. The connection pool assigns connections to clients, retrieves the connections when clients complete their tasks, and reuses them for future database requests. The connection pool also queues database requests when requests outnumber the available connections.

OracleAS TopLink supports two types of connection pools: the default OracleAS TopLink internal connection pool and external connection pools.

Internal Pools

Because of the multiuser nature of a server session, OracleAS TopLink establishes a connection pool for all server sessions by default. The pool includes several database connections that can be configured, and OracleAS TopLink manages the pool automatically.

External Pools

OracleAS TopLink supports external connection pools. Applications that include an application server usually use an external connection pool, managed by a Java Transaction Architecture (JTA) device.


The JTA is a specification that enables your application to participate in a distributed transaction system. The system provides transaction management and connection pooling and enables your application to interact with multiple databases transparently.

OracleAS TopLink applications that use an application server often use JTA to manage database transactions.

Data Conversion

OracleAS TopLink applications store object attributes on a database. To enable this functionality, OracleAS TopLink must convert object attributes, which are Java types such as STRING and INTEGER, to database types, such as VARCHAR and NUMERIC. The OracleAS TopLink conversion manager manages these conversions and enables you to build custom conversion classes.