Skip Headers

# Understanding the Two-Tier Architecture

Previous

Next

A two-tier application generally includes a Java client that connects directly to the database through TopLink. The two-tier architecture is most common in complex user interfaces with limited deployment. The database session provides TopLink support for two-tier applications.

For more information, see Understanding TopLink Sessions.

Two-Tier Architecture

Description of "Two-Tier Architecture"

Although the two-tier architecture is the simplest TopLink application pattern, it is also the most restrictive, because each client application requires its own session. As a result, two-tier applications do not scale as easily as other architectures.

Two-tier applications are often implemented as user interfaces that directly access the database (see Figure: Two-Tier Architecture). They can also be non-interface processing engines. In either case, the two-tier model is not as common as the three-tier model.

The following are key elements of an efficient two-tier (client-server) architecture with TopLink:

- Minimal dedicated connections from the client to the database

- An isolated object cache