I have built a multi threaded process with one Oracle Database Session used by every thread (using DBSession->ThreadSafety = true;).
This seems to work, but not very stable. (The process crashes sometimes with obscure oracle errors, like allocation buffer to small or missing parameter)
a) Is this a supported environment?
b) should i better use AssignConnect() in every thread?
c) what value is best fo ThreadSafety?
Multi threaded environment
a) Yes, TOraSession.ThreadSafety property turns OCI to thread safe mode and ODAC internal synchronization mechanism.
b) AssignConnect is not better than using one session per many threads. Source TOraSession and TOraSession copied by AssignConnect are identical to Oracle server. The best solution is to use the different TOraSession components for different threads. That is the only possible decision for Net-option.
c) The default value for ThreadSafety is True. It is the best for multithread applications.
Please send small demo project to demonstrate the problem and include script to create server objects (tables) to ODAC support email address.
b) AssignConnect is not better than using one session per many threads. Source TOraSession and TOraSession copied by AssignConnect are identical to Oracle server. The best solution is to use the different TOraSession components for different threads. That is the only possible decision for Net-option.
c) The default value for ThreadSafety is True. It is the best for multithread applications.
Please send small demo project to demonstrate the problem and include script to create server objects (tables) to ODAC support email address.