Skip Headers

Oracle TopLink Developer's Guide 10g Release 3 (10.1.3) B13593-01 |
| Home | Solution Area | Contents | Index

Previous | Next |

# Acquiring the Session Manager

TopLink maintains only one instance of the session manager class. The singleton session manager maintains all the named TopLink sessions at run time. When an application requests a session by name, the session manager retrieves the specified session from the appropriate configuration file.

As Example 78-1 illustrates, to access the session manager instance, use the `oracle.toplink.tools.sessionmanagement.SessionManager` method `getManager`. You can then use the session manager instance to load TopLink sessions.

Example 78-1 Acquiring a Session Manager Instance

    import oracle.toplink.tools.sessionmanagement.SessionManager;
    SessionManager sessionManager = SessionManager.getManager();