Skip Headers

# Session Acquisition Overview

Previous

Next

Oracle recommends that you export session instances from TopLink Workbench to one or more uniquely named `sessions.xml` files and then use the session manager to load sessions from these `sessions.xml` files.

The TopLink session manager enables developers to build a series of sessions that are maintained under a single entity. The session manager is a static utility class that loads TopLink sessions from the `sessions.xml` file, caches the sessions by name in memory, and provides a single access point for TopLink sessions. The session manager supports the following session types:

- Server Session

- Database Session

- SessionBroker

See Understanding TopLink Sessions for detailed information on these available sessions.

The session manager has two main functions: it creates instances of the sessions and it ensures that only a single instance of each named session exists for any instance of a session manager.

This is particularly useful for EJB applications in that an enterprise bean can acquire the session manager and acquire the desired session from it.