You are using one connection/session per thread?
Based on your "problem" description, I suspect that you have concurrency issues.
Personally I prefer using
Oracle C++ Call Interface[
^]
For more info on OCI (used by OTL) see
http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28395/toc.htm[
^]
>>One of the working threads block
>>upon invoking a stored procedure and never come back.
>>This happens randomly on different times.
>>There are no exceptions thrown even after a long time of invocation.
From your description I feel that "the symptoms" are consistent with a subtle concurrency bug, but that's just my feeling...
About five years ago I played a bit around with OTL and Oracle, I ended up using C++ Builder with Direct Oracle Access from Allround Automations. Obviously that option isn't available to you. While I initially invested a lot of work in the OTL based approach I never became really happy with the result, feeling that to much was out of my control.
IMHO: OTL tries far to hard to present the user with a C++ish api, which I feel isn't quite as readable as code based on Oracle C++ Call Interface. OCCI may seem a bit javaish, but it's quite clear what's going on in your code. I would guess OCCI is also used in a lot more production scenarios than OTL, but that's an unqualified guess.
I've developed a number of multithreaded server applications using Oracle as the RDBMS. I've worked directly with OCI and I've used OCCI, solutions based on both approaches has proven to be very stable once I have them working. Those applications relied heavily on
ACE[
^], and ACE has pretty serious error handling and logging features, that has enabled me to detect errors, find their location and fix them pretty fast.
I haven't a clue about what's wrong with your application, but gave it a best shot based on very little information from your side.
Best of luck
Espen Harlinn