Commit transaction in UnrestrictedSessionRunner

We have a long process in UnrestrictedSessionRunner. In this one, we do a NXQL query. For each document in the query result, we do some stuff. Between each document treatment, we want to commit the transaction.

We use “TransactionHelper.commitOrRollbackTransaction();” and we obtain [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] checkTxActiveRequired Session invoked in a container without a transaction active java.lang.Throwable

What is missing? Thanks a lot.

1 votes

0 answers

741 views

ANSWER