Merge pull request #1015 from jschneid-nmdp/resolve-term-upload-deferred-short-circuit
avoid potential short circuit during saveDeferred processing of uploaded (e.g. LOINC) terminology
This commit is contained in:
commit
8c849b16a4
|
@ -850,15 +850,16 @@ public abstract class BaseHapiTerminologySvcImpl implements IHapiTerminologySvc,
|
||||||
return;
|
return;
|
||||||
} else if (myDeferredConcepts.isEmpty() && myConceptLinksToSaveLater.isEmpty()) {
|
} else if (myDeferredConcepts.isEmpty() && myConceptLinksToSaveLater.isEmpty()) {
|
||||||
processReindexing();
|
processReindexing();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TransactionTemplate tt = new TransactionTemplate(myTransactionMgr);
|
TransactionTemplate tt = new TransactionTemplate(myTransactionMgr);
|
||||||
tt.setPropagationBehavior(TransactionTemplate.PROPAGATION_REQUIRES_NEW);
|
tt.setPropagationBehavior(TransactionTemplate.PROPAGATION_REQUIRES_NEW);
|
||||||
tt.execute(t -> {
|
if(!myDeferredConcepts.isEmpty() || !myConceptLinksToSaveLater.isEmpty()) {
|
||||||
processDeferredConcepts();
|
tt.execute(t -> {
|
||||||
return null;
|
processDeferredConcepts();
|
||||||
});
|
return null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (myDeferredValueSets.size() > 0) {
|
if (myDeferredValueSets.size() > 0) {
|
||||||
tt.execute(t -> {
|
tt.execute(t -> {
|
||||||
|
|
Loading…
Reference in New Issue