Posted By: Alberto Pilat ServerVersion is not thread safe?!? - 09/11/14 03:24 PM
We have just verified in a multithread environment (web application) that calling to TOracleSession.ServerVersion dosen't work;
I'm using ThreadSafe = True, but calling ServerVersion from different threads cause a crash.
Instead, if I execute a simple query like 'select from v$version' using TOracleQuery/TORacleDataset, it works fine.
Now we can modify our behavior with critical section or other stuff, but I ask to Allround if there are other method/propertys that can be not thread safe (we don't have source code) so we can check.

Thanks
Posted By: Marco Kalter Re: ServerVersion is not thread safe?!? - 09/12/14 09:44 AM
I can indeed see how there might be an issue. We'll fix it.

Methods and properties that might clash when used simultaneously for the same TOracleSession instance from different threads:
  • ServerVersion
  • SetPassword
  • SetTransaction
  • Savepoint
  • RollbackToSavepoint
  • Setting SQLTrace
  • Setting OptimizerGoal
  • Setting IsolationLevel
  • Getting AUDSID
Thank you Marco: we not use the others meths/props you listed.
But I have some doubt about Savepoint and RollbackToSavepoint...pheraps are they used internally by TOracleDataSet or not?
Posted By: Marco Kalter Re: ServerVersion is not thread safe?!? - 09/16/14 09:37 AM
Only if you are using TOracleDataSet.CachedUpdates.

I can send you a test version with a fix for this issue, so that you can verify. Just let me know your Delphi version and I will arrange it.
Of course we use it!!!

When possible I'll test the fix as soon as possible:
Delphi XE4
DOA 4.1.3.5

my email: a.pilat@mondoedp.com

P.S. I also posted a question about applyupdates on 64 bit, if you can have a look...
Hi Marco,
please could you provide the test version you spoke about last week? Or let me know when it will be available so I can schedule my test?
Thanks
Posted By: Marco Kalter Re: ServerVersion is not thread safe?!? - 09/23/14 09:19 AM
Yes, we'll have it available later this week.
© Allround Automations forums