This section discusses the Open Server SRV_T_SESSIONID property which has been modified to support Open Server context migration. For more information about using SRV_T_SESSIONID in context migration, see “Instructing clients to migrate to a different server”.
The SRV_T_SESSIONID is a thread property that retrieves the session ID that the client sends to Open Server. As of ESD #15, an Open Server application can also set the SRV_T_SESSIONID property using the srv_thread_props() function, given that:
The srv_thread_props(CS_SET, SRV_T_SESSIONID) call is made inside the SRV_CONNECT event handler and,
The client supports connection migration or high availability.
This sample code sets the SRV_T_SESSIONID property:
CS_RETCODE ret; CS_SESSIONID hasessionid; ret = srv_thread_props(sp, CS_SET, SRV_T_SESSIONID, hasessionid, sizeof(hasessionid), NULL);
In versions earlier than ESD #14, for HA-failover,
you must program an srv_negotiate() sequence
to send the session ID to the client.