On UNIX platforms, ODBC calls must be single-threaded. Connection Manager provides a cache property JAG_CM_MUTEX to be used for this purpose. The JAG_CM_MUTEX property provides access to an Open Server SRV_OBJID mutex structure. The structure should be obtained with JagCmCacheProps(JAG_CM_MUTEX) and locked with the Server-Library srv_lockmutex routine before performing any of the following calls:
JagCmGetConnection and JagCmReleaseConnection calls on ODBC caches.
All ODBC calls.
The lock should be released as soon as the operation is complete.
The sample C components contain code that demonstrates how to single-thread ODBC calls.
This requirement should be temporary. A solution that eliminates the need for single-threading is planned for a future release.
Copyright © 2005. Sybase Inc. All rights reserved. |