RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSessionsService.MaxSessions Property

Indicates the maximum number of sessions the TCustomSessionsService can keep in memory.

Pascal
property MaxSessions: Integer;
C++
__property int MaxSessions;

Set MaxSessions to limit the number of sessions that the sessions service stores in memory. If MaxSessions is –1, then there is no limit to the number of sessions, and the application can continue creating sessions until it runs out of memory. When MaxSessions is greater than or equal to zero, any attempt to create a new session when the sessions service has MaxSessions already stored in memory causes an ESessionsException exception. The Exception occurs before the OnStartSession event.

Note: When the application terminates sessions, it frees up memory for new sessions. Thus, after reaching the limit imposed by MaxSessions, the application can add subsequent sessions after explicitly terminating a session or waiting for one to time out.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!