0 Replies Latest reply on Jul 12, 2012 7:22 PM by plhtyuk


      Hi everyone,

      We do the following in an OCI program :

      1. The environment is properly initialized with OCI_THREADED (and without OCI_ENV_NO_MUTEX).

      2. Two threads A and B are involved.

      3. Thread A creates and properly sets up a service context handle and a session handle.

      4. Both threads A and B use the same service context and session handles (though never concurrently). This works fine.

      5. At one point, thread A ends. Thread B continues to execute.

      6. After A ends, thread B gets an OCI_INVALID_HANDLE when it attempts to use the service context and session handles.

      7. Note that thread B would have closed the handles before ending, but does not have the chance to get that far.

      Is that normal? Is it forbidden to share service context and user session handles amongst threads? The documentation strongly suggests otherwise.

      We are using Oracle client 11G Release 1 and the server is also at the same version.

      Best regards.