0 Replies Latest reply: Aug 6, 2012 5:28 PM by 657156 RSS

    calling OCIBreak() and OCIReset() from a threaded context

      We have code that occasionally errors with ORA-12151, with tracing indicating some funk surrounding OCI calls to OCIPing(), OCIBreak(), and OCIReset(). What the code is trying to do here is release a connection from a pool (our implementation, not OCIPool) and before releasing it trying to make sure nothing is actively running on the connection etc. The environment is created in THREADED mode (ie not non-blocking).

      Reading the documentation its not really clear to me if OCIBreak() and OCIReset() are really intended to be called while in THREADED mode.

      Can anyone provide some insight here? Is it a bad idea to call break/reset as part of a general connection-reset routine?

      The basic control flow (minus error handling etc) is:

      reset() {
      int rc = OCIBreak(connection_, err_);
      rc = OCIReset(connection_, err_);
      if (OCIPing(connection_, err_, OCI_DEFAULT) != OCI_SUCCESS) {
      return errors;
      return 0;