Component that keeps a pool of sessions

Icon

clip0132

Properties and Events view

DelphiGuide_nxSessionPool1     DelphiGuide_nxSessionPool1(a)

                                                           

Purpose

There are 2 main uses for this component:

a) if you are writing multi-threaded code and need a session for a limited

time you can setup a TnxSessionPool and inside your threads call

nxSessionPool.AcquireSession, use the returned session as long as you need

and later call Session.Release to put it back into the pool.

b) TnxSessionPool, just like TnxSession, implements InxSessionRequests. That

interface is required for "remote plugins". Normally you would connect a

remote plugin of some kind to a session, and then only call that plugin from

the thread that owns the session. If you connect a remote plugin to a

session pool it will automatically use a session from the pool for each

request, meaning you can now call your plugin from any number of threads at

the same time. (Assuming the plugin itself is written in a way that it can

handle multi-threaded usage.)

Please also see Common Properties and Events for more details.

Home | Site Contents | Documentation | NexusDB Manual V4 | Delphi Guide | VCL Component Overview | Sessions and Databases