I was wondering if there was a way that I could span a transaction across 
multiple requests to individual xqy modules, and commit/rollback at any point. 
According to the documentation of using transactions within xquery modules, it 
seems like transactions only last for the lifetime of the request to the 
module. Functions like xdmp:set-transaction-mode() only seem to modify the 
transaction that is implicitly created by calling an xquery module, and even if 
you are in 'update' mode, the transaction doesn't persist beyond the lifetime 
of the request.

Here's an example of what I would like to do:

POST http://server/v1/manage/transactions (create transaction and obtain txid 
1234)
POST http://server/doThisXQuery.xqy?txid=1234 (post a document and associate it 
with txid 1234)
POST http://server/nowDoThisXQuery.xqy?txid=1234 (post another document and 
associate it with txid 1234)
GET http://server/finishTransaction?txid=1234 (validate document integrity and 
either commit/rollback txid 1234)

Thank you,
Dave Christensen


_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to