TAstaServerSocket Threading ASTA Servers
There are three elements of a multi-threaded database ASTA server.
·
Set the ThreadingModel property. If tmPooledSessions is chosen, then you
must set the DataBaseSessions property to the number of sessions to be created at server startup.
·
Code
the ThreadedDBSupplySession event.
· Code the ThreadedDBSupplyQuery event
When an ASTA server starts up, the method CreateSessionsForDbThreads is called. If the DataBaseSessions property is greater than 0, and the ThreadedDBSupplySession event and the ThreadedDBSupplyQuery event is coded, then an AstaSessionList can be created that will act as a pool of connections to the database. If you choose to thread the server, these two events must be coded. Use the function UseThreads to verify at runtime which threading model is in effect.