2014-03-15
| ||
20:54 | • Fixed ticket [e370758677]: Fix client-side transactions plus 1 other change artifact: 52dcb8a23f user: ab | |
20:53 | • Ticket [e370758677]: 3 changes artifact: e82a46aed5 user: ab | |
2014-03-12
| ||
09:43 | ensure BeginCurrentThread / EndCurrentThread methods are called when TSQLRestServer.AcquireExecutionMode* is amBackgroundThread - due for [e370758677] check-in: 019160c987 user: abouchez tags: trunk | |
2014-03-09
| ||
18:18 | added TSQLRestServer.AcquireExecutionMode[] and AcquireExecutionLockedTimeOut[] properties, able to define execution plan for all ORM/SOA operations - will also try to fix the remote transaction problems as reported by [e370758677] check-in: f9bd34f8a1 user: User tags: trunk | |
2014-02-07
| ||
15:59 | • New ticket [e370758677] Fix client-side transactions. artifact: c855893dd0 user: root | |
Ticket Hash: | e370758677f14130d76de80a3afd958229e4b6f4 | |||
Title: | Fix client-side transactions | |||
Status: | Fixed | Type: | Code_Defect | |
Severity: | Critical | Priority: | Immediate | |
Subsystem: | Resolution: | Fixed | ||
Last Modified: | 2014-03-15 20:54:02 | |||
Version Found In: | 1.18 | |||
Description: | ||||
As reported in the forum, client-side transactions are sometimes failing, depending on the database engine.
Due to the HTTP thread pool, TransactionBeginRetry and Commit/Rollback will probably not be run in the same thread, so in the same connection. Temporary solution is to run the transaction on the server side. This proposal is to introduce a dedicated thread, at least for the write process. In the current implementation, ORM writes are protected by a critical section.. ab added on 2014-03-15 20:53:23 UTC: aMyServer.AcquireExecutionMode[execORMWrite] := amBackgroundThread; This should fix the issue. For performance, the best is to maintain all your transactions on the server side, e.g. by writing all the complex DB process in an interface-based service. For interface-based services, you can force the execution of the same instance or the same session to take place in the same thread, by setting: aServiceFactoryServer.SetOptions('',[optExecInPerInterfaceThread, optFreeInPerInterfaceThread]);Please see the SAD pdf about the thread-related advanced options of interface-based services. |