Purpose: Define the interface and common protocol of a TopLink compliant session.
Description: The session is the primary interface into TopLink, the application should do all of its reading and writing of objects through the session. The session also manages transactions and units of work. Normally the session is passed and used by the application controler objects. Controler objects normally sit behind the GUI and perform the buiness processes required for the application, they should perform all explict database access and database access should be avoided from the domain object model. Do not use a globally accessable session instance, doing so does not allow for multiple sessions. Multiple sessions may required when performing things like data migration or multiple database access, as well the unit of work feature requires the usage of multiple session instances. Although session is abstract, any users of its subclasses should only cast the variables to Session to allow usage of any of its subclasses.
Responsibilities:
|
|