add property to turn on userRequestRetryVersionConflictsInterceptor (#752)
This commit is contained in:
@@ -106,8 +106,9 @@ public class AppProperties {
|
||||
private final List<String> custom_provider_classes = new ArrayList<>();
|
||||
private Boolean upliftedRefchains_enabled = false;
|
||||
|
||||
private List<Integer> search_prefetch_thresholds = new ArrayList<>();
|
||||
private boolean userRequestRetryVersionConflictsInterceptorEnabled = false;
|
||||
|
||||
private List<Integer> search_prefetch_thresholds = new ArrayList<>();
|
||||
|
||||
public List<String> getCustomInterceptorClasses() {
|
||||
return custom_interceptor_classes;
|
||||
@@ -671,6 +672,14 @@ public Cors getCors() {
|
||||
this.upliftedRefchains_enabled = upliftedRefchains_enabled;
|
||||
}
|
||||
|
||||
public Boolean getUserRequestRetryVersionConflictsInterceptorEnabled() {
|
||||
return userRequestRetryVersionConflictsInterceptorEnabled;
|
||||
}
|
||||
|
||||
public void setUserRequestRetryVersionConflictsInterceptorEnabled(Boolean userRequestRetryVersionConflictsInterceptorEnabled) {
|
||||
this.userRequestRetryVersionConflictsInterceptorEnabled = userRequestRetryVersionConflictsInterceptorEnabled;
|
||||
}
|
||||
|
||||
public static class Cors {
|
||||
private Boolean allow_Credentials = true;
|
||||
private List<String> allowed_origin = List.of("*");
|
||||
@@ -690,8 +699,6 @@ public Cors getCors() {
|
||||
public void setAllow_Credentials(Boolean allow_Credentials) {
|
||||
this.allow_Credentials = allow_Credentials;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static class Logger {
|
||||
|
||||
@@ -28,6 +28,7 @@ import ca.uhn.fhir.jpa.dao.search.IHSearchSortHelper;
|
||||
import ca.uhn.fhir.jpa.delete.ThreadSafeResourceDeleterSvc;
|
||||
import ca.uhn.fhir.jpa.graphql.GraphQLProvider;
|
||||
import ca.uhn.fhir.jpa.interceptor.CascadingDeleteInterceptor;
|
||||
import ca.uhn.fhir.jpa.interceptor.UserRequestRetryVersionConflictsInterceptor;
|
||||
import ca.uhn.fhir.jpa.interceptor.validation.RepositoryValidatingInterceptor;
|
||||
import ca.uhn.fhir.jpa.ips.provider.IpsOperationProvider;
|
||||
import ca.uhn.fhir.jpa.model.config.SubscriptionSettings;
|
||||
@@ -457,6 +458,10 @@ public class StarterJpaConfig {
|
||||
fhirServer.registerProvider(theIpsOperationProvider.get());
|
||||
}
|
||||
|
||||
if (appProperties.getUserRequestRetryVersionConflictsInterceptorEnabled() ) {
|
||||
fhirServer.registerInterceptor(new UserRequestRetryVersionConflictsInterceptor());
|
||||
}
|
||||
|
||||
// register custom providers
|
||||
registerCustomProviders(fhirServer, appContext, appProperties.getCustomProviderClasses());
|
||||
|
||||
|
||||
@@ -214,6 +214,8 @@ hapi:
|
||||
narrative_enabled: false
|
||||
mdm_enabled: false
|
||||
mdm_rules_json_location: "mdm-rules.json"
|
||||
## see: https://hapifhir.io/hapi-fhir/docs/interceptors/built_in_server_interceptors.html#jpa-server-retry-on-version-conflicts
|
||||
# userRequestRetryVersionConflictsInterceptorEnabled : false
|
||||
# local_base_urls:
|
||||
# - https://hapi.fhir.org/baseR4
|
||||
logical_urls:
|
||||
|
||||
Reference in New Issue
Block a user