Skip Headers

# Understanding the EJB Session Bean Facade Architecture

Previous

Next

This architecture is an extension of the three-tier pattern, with the addition of EJB session beans wrapping the access to the application tier. Session beans provide public API access to application operations, enabling you to separate the presentation tier from the application tier. The architecture also lets you use session beans within a J2EE container.This type of architecture generally includes JTA integration, and serialization of data to the client.

Three-Tier Architecture Using Session Beans and Java Objects

Description of "Three-Tier Architecture Using Session Beans and Java Objects"

A common extension to the three-tier architecture is to combine session beans and persistent Java objects managed by TopLink. The resulting application includes session beans and Java objects on a TopLink three-tier architecture (see Figure: Three-Tier Architecture Using Session Beans and Java Objects).

The three-tier architecture creates a server session and shares it between the session beans in the application. When a session bean needs to access a TopLink session, the bean obtains a client session from the shared server session. This architecture has the following key features:

- Session beans delimit transactions.

  Configure TopLink to work with a JTA system and its associated connection pool.

- Accessing the persistent objects on the client side causes them to be serialized.

  Ensure that when the objects re-emerge on the server-side, they properly merge into the cache to maintain identity.