#1 2013-10-09 20:24:26

yurasek
Member
From: Belarus
Registered: 2011-04-19
Posts: 18

Shared transaction between user sessions

When at least one user (local or remote) starts a transaction, then all the other record of any data will fail until the transaction is closed. In older versions of the framework transaction was common to all connections, how can enable this mechanism work?

P.S. Figured out yourself: it is necessary to use methods TSQLRestServerDB.DB.TransactionBegin() and TSQLRestServerDB.DB.Commit().

Last edited by yurasek (2013-10-09 20:45:00)

Offline

#2 2013-10-09 20:43:57

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Shared transaction between user sessions

Transactional flow is made by session ID.

At best, transactional content should be done on the server side, within a service.

Or you may have to use BATCH commands.
Perhaps we need an option to run the BATCH within a transaction, which is not the same by now.
What do you think?

Offline

#3 2013-10-09 20:52:42

yurasek
Member
From: Belarus
Registered: 2011-04-19
Posts: 18

Re: Shared transaction between user sessions

I'm using is not very good practice when in the back end in a separate thread is infinitely open and close a transaction with a certain interval, that allows to reach high-speed inserting.

Offline

#4 2013-10-09 21:00:47

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Shared transaction between user sessions

In this context, BATCH process is just perfect for fast high-speed insertion.

I would like to add some inserted IDs within the BATCH insert (for nested IDs).
You can insert/update several classes in the same BATCH process, by the way.

Offline

Board footer

Powered by FluxBB