Skip to main content

What's New in MarkLogic 11

XCC Session.setTransactionMode is Deprecated

Use of Session.setTransactionMode to specify commit semantics and transaction type is deprecated as MarkLogic 9.0-2. This function will be removed in a future version. Use the new Session.setAutoCommit and Session.setUpdate methods instead.

The following table illustrates how to replace calls to setTransactionMode with equivalent calls to setAutoCommit and setUpdate:

If you call setTransactionMode with this value,

Then replace it with the following calls on the same Session object:

AUTO

setAutoCommit(true); setUpdate(Session.Update.AUTO);

MULTI_AUTO

setAutoCommit(false); setUpdate(Session.Update.AUTO);

UPDATE

setAutoCommit(false); setUpdate(Session.Update.TRUE);

QUERY

setAutoCommit(false); setUpdate(Session.Update.FALSE);

UPDATE_AUTO_COMMIT

setAutoCommit(true); setUpdate(Session.Update.TRUE);

QUERY_SINGLE_STATEMENT

setAutoCommit(true); setUpdate(Session.Update.FALSE);