Modified Open Server API

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”.


SRV_T_SESSIONID property

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:

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);

NoteIn versions earlier than ESD #14, for HA-failover, you must program an srv_negotiate() sequence to send the session ID to the client.