Skip Headers

# Connections

Previous

Next

A connection is an object that provides access to a data source by way of the driver you configure your application to use (see "Configuring Database Login Connection Options"). Relational projects use JDBC to connect to the data source; EIS and XML projects use JCA. TopLink uses the interface `oracle.toplink.internal.databaseaccess.Accessor` to wrap data source connections. This interface is accessible from certain events (see "Descriptor Event Manager").

Typically, when using a server session, TopLink uses a a different connection for both reading and writing. This lets you use nontransactional connections for reading and avoid maintaining connections when not required. See "Reading Through the Write Connection" and "Exclusive Write Connections" for more information.

By default, a TopLink server session acquires connections lazily: that is, only during the commit operation of a unit of work. Alternatively, you can configure TopLink to acquire a write connections at the time you acquire a client sessions (see "Lazy Connection Acquisition").

Connections can be allocated from internal or external connection pools (see "Connection Pools").