Skip Headers

# Acquiring a Client Session

Previous

Next

Before you can acquire a client session, you must first use the session manager to acquire a server session or a session broker that contains server sessions (see "Acquiring a Session From the Session Manager").

Table: Method Used to Acquire a Client Session summarizes the methods used to acquire various types of client sessions from a server session and a session broker session that contains server sessions.

Method Used to Acquire a Client Session

Client Session | Server Session Method | Session Broker Session Method
--- | --- | ---
Regular or Isolated | `acquireClientSession()` | `acquireClientSessionBroker()`
Regular or Isolated | `acquireClientSession(ConnectionPolicy)` | not applicable
Historical | `acquireHistoricalSession(AsOfClause)` | not applicable

The `acquireClientSession` method returns a session of type `ClientSession`.

The `acquireClientSessionBroker` method returns a session of type `SessionBroker`.

In both cases, you should cast the returned object to type `Session` and use it as you would any other session.

For more information, see the following:

- "Acquiring an Isolated Client Session"

- "Acquiring a Historical Session"

- "Acquiring a Client Session That Uses Exclusive Connections"

- "Acquiring a Client Session That Uses Connection Properties"

- "Acquiring a Client Session That Uses a Named Connection Pool"

- "Acquiring a Client Session That Does Not Use Lazy Connection Allocation"