Skip to content

Commit

Permalink
[Fix] Minor transactional behavior fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
ledsoft committed Sep 13, 2024
1 parent f3b9d9a commit dd6aff5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import org.springframework.security.access.prepost.PostAuthorize;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.net.URI;
Expand Down Expand Up @@ -442,7 +443,7 @@ public void remove(@NonNull Term term) {
@Throttle(value = "{#vocabularyIri, #term.getUri()}",
group = "T(ThrottleGroupProvider).getTextAnalysisVocabularyTerm(#vocabulary.getUri(), #term.getUri())",
name="termDefinitionAnalysis")
@Transactional
@Transactional(propagation = Propagation.REQUIRES_NEW)
@PreAuthorize("@termAuthorizationService.canModify(#term)")
public void analyzeTermDefinition(AbstractTerm term, URI vocabularyIri) {
term = findRequired(term.getUri()); // required when throttling for persistent context
Expand Down

0 comments on commit dd6aff5

Please sign in to comment.