by my opinion xtk.session.Write() is final statement (after execution an automatically COMMIT is done).
It is best option to open one ticket towards Adobe Support to clarify usage of rollback().
You might try to create a procedure on DB level (basic Oracle example below) and then adapt your web service to invoke procedure and then everything will be done by your database.
CREATEPROCEDURE foo (x NUMBER)IS BEGIN SAVEPOINT update_bar;
-- Do some inserts here. INSERTINTO bar VALUES(x); -- Sometimes there might be an error. IF x =3THEN RAISE_APPLICATION_ERROR(-20000,'Wooops...'); ENDIF; EXCEPTION WHEN OTHERS THEN -- Rollback everything which was made after `SAVEPOINT update_bar` ROLLBACKTO update_bar; RAISE; END foo;
you may use dbEngine class to work with sql queries from JS.
var dbEngine = instance.engine
dbEngine.exec("UPDATE your_table SET column = 1 WHERE 1=1")
Therefore, it is possible to use something like dbEngine.rollback() but not after the code above because commit is done automatically. You have to write procedure in order to use commit or rollback after transaction.