Skip Headers

# Multiple Sessions

Previous

Next

Oracle does not recommend instantiating a session and passing it around as a global entity.

Oracle recommends that you acquire sessions from the session manager and perform all persistence operations using the unit of work acquired from the session.

Note that in the case of a server session or a session broker that contains server sessions, after you acquire the session you will acquire a client session from it. From a given server session (or session broker that contains server sessions), you can acquire as many client sessions as you have clients.

Each client can easily manage concurrent access and referential constraints by acquiring a unit of work from its client session and performing all persistence operations using the unit of work.