Luca Morandini wrote:

Sylvian,

I'm not completely convinced a rewriting of SQLTransformer is needed to handle transactions... I tried the following:

<sql:query isstoredprocedure="false">
name="test">
begin
DELETE FROM CRRegion
WHERE Id > 80;
COMMIT;
INSERT INTO CRRegion
(Id, Name)
VALUES
('90', 'Foo');
INSERT INTO CRRegion
(Id, Name)
VALUES
('91', 'Bar');
ROLLBACK;
end;
</sql:query>

And it worked just fine (both the commit and the rollback parts). I even tried
some variations on this theme and they worked just as well.

In the above example, the transaction is contained in a _single_ <sql:query> element. What Daniel pointed out, IIUC, is that it's not possible to have a transaction across several <sql:query>.

Sylvain

--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



Reply via email to