How can I optimize a java treatment (for loop, nested loop) and execute it in the background so I can continue with another treatment?
@Transactional(propagation = Propagation.REQUIRES_NEW,
readOnly = false, rollbackFor = AppTechnicalException.class)
public void update(FicheDTO dto, String code) throws {
Fiche fiche = this.ficheDAO.find(fiche.getNumero());
this.traitementToDO(dto, fiche);
Tracabilite trace = createTraceF(fiche.getNumero(), code);
}
I want that this.traitementToDO(dto, fiche)
to run in the background!