API calling sequence - Connection concentrator
This scenario covers the API calling sequence when connection concentrator is used. The connection concentrator feature allows the database manager to handle many more clients than there are coordinating agents or threads. This API calling sequence applies to communication buffer exit libraries.
When a client reaches a unit of work boundary and does
not send another request immediately, client sockets are placed into
an idle pool. The agent that previously handled client requests moves
on to another client. When the idle socket has data to read, a dispatcher
finds an idle agent to handle it. Over the life of an SQL connection,
there might be multiple agents that handle the client requests. Each
time the socket is moved in and out of the idle pool,
db2commexitDeregister and db2commexitRegister are called. The following
calls are made:db2commexitRegisterfor a new socket connection.db2commexitRecvanddb2commexitSendto handle authentication, possibly multiple times.db2commexitUserIdentityfor a new connectiondb2commexitRecvanddb2commexitSendto handle client SQL requests, possibly multiple times.The client does not send another request immediately and the socket is placed into an idle pool.
db2commexitDeregisterto disassociate with the agent.At some future point, the client sends another request, at which point the dispatcher chooses an idle agent. The agent is likely a different one than used previously:
db2commexitRegisterto associate an agent.db2commexitRecvanddb2commexitSendto handle client SQL requests, possibly multiple times.db2commexitDeregisterto terminate socket connection.
Note: There are multiple calls to
db2commexitRegister and db2commexitDeregister for a single SQL connection.