diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml index 52c6744b1f6..e507dd7c4ad 100644 --- a/hapi-deployable-pom/pom.xml +++ b/hapi-deployable-pom/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml index bb5ac566d57..cc29f3cfb29 100644 --- a/hapi-fhir-android/pom.xml +++ b/hapi-fhir-android/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml index 6f7b6e4248e..31d086623a2 100644 --- a/hapi-fhir-base/pom.xml +++ b/hapi-fhir-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml index 460f34eab7e..d32257cda95 100644 --- a/hapi-fhir-bom/pom.xml +++ b/hapi-fhir-bom/pom.xml @@ -4,14 +4,14 @@ 4.0.0 ca.uhn.hapi.fhir hapi-fhir-bom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT pom HAPI FHIR BOM ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-checkstyle/pom.xml b/hapi-fhir-checkstyle/pom.xml index 954a371fb94..9c88b6e6c07 100644 --- a/hapi-fhir-checkstyle/pom.xml +++ b/hapi-fhir-checkstyle/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml index 33f14aace2a..23a93b54bcf 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml index 69a3ba5053a..8bbcde32d3a 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir-cli - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml index db0e10e2231..0251023a33f 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../../hapi-deployable-pom diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml index ed6b4620b0c..72c8876f6d2 100644 --- a/hapi-fhir-cli/pom.xml +++ b/hapi-fhir-cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml index fd82fc33906..55ce4f8b9f9 100644 --- a/hapi-fhir-client-okhttp/pom.xml +++ b/hapi-fhir-client-okhttp/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml index f6915626737..47c9ab41740 100644 --- a/hapi-fhir-client/pom.xml +++ b/hapi-fhir-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml index 47e0fce5ca6..6d463b32802 100644 --- a/hapi-fhir-converter/pom.xml +++ b/hapi-fhir-converter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml index cf889124527..075704bc1d5 100644 --- a/hapi-fhir-dist/pom.xml +++ b/hapi-fhir-dist/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml index ad7315822d2..6b0d1c47973 100644 --- a/hapi-fhir-docs/pom.xml +++ b/hapi-fhir-docs/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_0/3439-job-schedule-interface.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_0/3439-job-schedule-interface.yaml new file mode 100644 index 00000000000..1b584b32baf --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_0/3439-job-schedule-interface.yaml @@ -0,0 +1,4 @@ +type: change +issue: 3439 +title: 'Previously, jobs were scheduled via a @PostConstruct annotated method. This has been changed to an implementation +of IJobScheduler interface so the job scheduler can schedule all the jobs after it has been started.' diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml index 773ec839d2a..d0443b404dd 100644 --- a/hapi-fhir-jacoco/pom.xml +++ b/hapi-fhir-jacoco/pom.xml @@ -11,7 +11,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml index 8a2e53ba1d7..947a92cfd3f 100644 --- a/hapi-fhir-jaxrsserver-base/pom.xml +++ b/hapi-fhir-jaxrsserver-base/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsConformanceProvider.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsConformanceProvider.java index 23db1597ee9..529379e375d 100644 --- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsConformanceProvider.java +++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsConformanceProvider.java @@ -20,22 +20,11 @@ package ca.uhn.fhir.jaxrs.server; * #L% */ -import ca.uhn.fhir.i18n.Msg; -import java.io.IOException; -import java.lang.annotation.Annotation; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; - -import javax.annotation.PostConstruct; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeResourceDefinition; +import ca.uhn.fhir.i18n.Msg; import ca.uhn.fhir.jaxrs.server.util.JaxRsRequest; import ca.uhn.fhir.jaxrs.server.util.JaxRsRequest.Builder; import ca.uhn.fhir.rest.annotation.IdParam; @@ -58,15 +47,24 @@ import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r4.model.CapabilityStatement; import org.slf4j.LoggerFactory; +import javax.annotation.PostConstruct; import javax.ws.rs.GET; import javax.ws.rs.OPTIONS; import javax.ws.rs.Path; import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import java.io.IOException; +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Collections; import java.util.LinkedList; import java.util.List; +import java.util.Map.Entry; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; /** * This is the conformance provider for the jax rs servers. It requires all providers to be registered during startup because the conformance profile is generated during the postconstruct phase. @@ -91,7 +89,7 @@ public abstract class AbstractJaxRsConformanceProvider extends AbstractJaxRsProv /** * the server configuration */ - private RestfulServerConfiguration serverConfiguration = new RestfulServerConfiguration(); + private RestfulServerConfiguration myServerConfiguration = new RestfulServerConfiguration(); /** * the conformance. It is created once during startup @@ -111,10 +109,10 @@ public abstract class AbstractJaxRsConformanceProvider extends AbstractJaxRsProv * @param serverVersion the server version. If null, "" is used */ protected AbstractJaxRsConformanceProvider(String implementationDescription, String serverName, String serverVersion) { - serverConfiguration.setFhirContext(getFhirContext()); - serverConfiguration.setImplementationDescription(StringUtils.defaultIfEmpty(implementationDescription, "")); - serverConfiguration.setServerName(StringUtils.defaultIfEmpty(serverName, "")); - serverConfiguration.setServerVersion(StringUtils.defaultIfEmpty(serverVersion, "")); + myServerConfiguration.setFhirContext(getFhirContext()); + myServerConfiguration.setImplementationDescription(StringUtils.defaultIfEmpty(implementationDescription, "")); + myServerConfiguration.setServerName(StringUtils.defaultIfEmpty(serverName, "")); + myServerConfiguration.setServerVersion(StringUtils.defaultIfEmpty(serverVersion, "")); } /** @@ -127,10 +125,10 @@ public abstract class AbstractJaxRsConformanceProvider extends AbstractJaxRsProv */ protected AbstractJaxRsConformanceProvider(FhirContext ctx, String implementationDescription, String serverName, String serverVersion) { super(ctx); - serverConfiguration.setFhirContext(ctx); - serverConfiguration.setImplementationDescription(StringUtils.defaultIfEmpty(implementationDescription, "")); - serverConfiguration.setServerName(StringUtils.defaultIfEmpty(serverName, "")); - serverConfiguration.setServerVersion(StringUtils.defaultIfEmpty(serverVersion, "")); + myServerConfiguration.setFhirContext(ctx); + myServerConfiguration.setImplementationDescription(StringUtils.defaultIfEmpty(implementationDescription, "")); + myServerConfiguration.setServerName(StringUtils.defaultIfEmpty(serverName, "")); + myServerConfiguration.setServerVersion(StringUtils.defaultIfEmpty(serverVersion, "")); } /** @@ -151,32 +149,32 @@ public abstract class AbstractJaxRsConformanceProvider extends AbstractJaxRsProv for (ResourceBinding baseMethodBinding : myResourceNameToBinding.values()) { serverBindings.addAll(baseMethodBinding.getMethodBindings()); } - serverConfiguration.setServerBindings(serverBindings); - serverConfiguration.setResourceBindings(new LinkedList(myResourceNameToBinding.values())); - serverConfiguration.computeSharedSupertypeForResourcePerName(providers.values()); + myServerConfiguration.setServerBindings(serverBindings); + myServerConfiguration.setResourceBindings(new LinkedList(myResourceNameToBinding.values())); + myServerConfiguration.computeSharedSupertypeForResourcePerName(providers.values()); HardcodedServerAddressStrategy hardcodedServerAddressStrategy = new HardcodedServerAddressStrategy(); hardcodedServerAddressStrategy.setValue(getBaseForServer()); - serverConfiguration.setServerAddressStrategy(hardcodedServerAddressStrategy); + myServerConfiguration.setServerAddressStrategy(hardcodedServerAddressStrategy); FhirVersionEnum fhirContextVersion = super.getFhirContext().getVersion().getVersion(); switch (fhirContextVersion) { case R4: - ServerCapabilityStatementProvider r4ServerCapabilityStatementProvider = new ServerCapabilityStatementProvider(getFhirContext(), serverConfiguration); + ServerCapabilityStatementProvider r4ServerCapabilityStatementProvider = new ServerCapabilityStatementProvider(getFhirContext(), myServerConfiguration); myR4CapabilityStatement = (CapabilityStatement) r4ServerCapabilityStatementProvider.getServerConformance(null, null); break; case DSTU3: - org.hl7.fhir.dstu3.hapi.rest.server.ServerCapabilityStatementProvider dstu3ServerCapabilityStatementProvider = new org.hl7.fhir.dstu3.hapi.rest.server.ServerCapabilityStatementProvider(serverConfiguration); + org.hl7.fhir.dstu3.hapi.rest.server.ServerCapabilityStatementProvider dstu3ServerCapabilityStatementProvider = new org.hl7.fhir.dstu3.hapi.rest.server.ServerCapabilityStatementProvider(myServerConfiguration); myDstu3CapabilityStatement = dstu3ServerCapabilityStatementProvider.getServerConformance(null, null); break; case DSTU2_1: - org.hl7.fhir.dstu2016may.hapi.rest.server.ServerConformanceProvider dstu2_1ServerConformanceProvider = new org.hl7.fhir.dstu2016may.hapi.rest.server.ServerConformanceProvider(serverConfiguration); + org.hl7.fhir.dstu2016may.hapi.rest.server.ServerConformanceProvider dstu2_1ServerConformanceProvider = new org.hl7.fhir.dstu2016may.hapi.rest.server.ServerConformanceProvider(myServerConfiguration); myDstu2_1Conformance = dstu2_1ServerConformanceProvider.getServerConformance(null, null); break; case DSTU2_HL7ORG: - ServerConformanceProvider dstu2Hl7OrgServerConformanceProvider = new ServerConformanceProvider(serverConfiguration); + ServerConformanceProvider dstu2Hl7OrgServerConformanceProvider = new ServerConformanceProvider(myServerConfiguration); myDstu2Hl7OrgConformance = dstu2Hl7OrgServerConformanceProvider.getServerConformance(null, null); break; case DSTU2: - ca.uhn.fhir.rest.server.provider.dstu2.ServerConformanceProvider dstu2ServerConformanceProvider = new ca.uhn.fhir.rest.server.provider.dstu2.ServerConformanceProvider(serverConfiguration); + ca.uhn.fhir.rest.server.provider.dstu2.ServerConformanceProvider dstu2ServerConformanceProvider = new ca.uhn.fhir.rest.server.provider.dstu2.ServerConformanceProvider(myServerConfiguration); myDstu2Conformance = dstu2ServerConformanceProvider.getServerConformance(null, null); break; default: diff --git a/hapi-fhir-jpa/pom.xml b/hapi-fhir-jpa/pom.xml index b852374facf..053e9e20eee 100644 --- a/hapi-fhir-jpa/pom.xml +++ b/hapi-fhir-jpa/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml 4.0.0 diff --git a/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/model/sched/ISmartLifecyclePhase.java b/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/model/sched/IHasScheduledJobs.java similarity index 66% rename from hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/model/sched/ISmartLifecyclePhase.java rename to hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/model/sched/IHasScheduledJobs.java index 0b538eef71f..984f272ed67 100644 --- a/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/model/sched/ISmartLifecyclePhase.java +++ b/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/model/sched/IHasScheduledJobs.java @@ -20,11 +20,9 @@ package ca.uhn.fhir.jpa.model.sched; * #L% */ -public interface ISmartLifecyclePhase { - // POST_CONSTRUCT is here as a marker for where post-construct fits into the smart lifecycle. Beans with negative phases - // will be started before @PostConstruct are called - int POST_CONSTRUCT = 0; - - // We want to start scheduled tasks fairly late in the startup process - int SCHEDULER_1000 = 1000; +/** + * This interface is implemented by classes that have scheduled jobs + */ +public interface IHasScheduledJobs { + void scheduleJobs(ISchedulerService theSchedulerService); } diff --git a/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/sched/BaseSchedulerServiceImpl.java b/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/sched/BaseSchedulerServiceImpl.java index a7b5abf2688..bed64818402 100644 --- a/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/sched/BaseSchedulerServiceImpl.java +++ b/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/sched/BaseSchedulerServiceImpl.java @@ -23,8 +23,8 @@ package ca.uhn.fhir.jpa.sched; import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.i18n.Msg; import ca.uhn.fhir.jpa.model.sched.IHapiScheduler; +import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; -import ca.uhn.fhir.jpa.model.sched.ISmartLifecyclePhase; import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition; import ca.uhn.fhir.util.StopWatch; import com.google.common.annotations.VisibleForTesting; @@ -34,10 +34,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; -import org.springframework.context.SmartLifecycle; +import org.springframework.context.event.ContextClosedEvent; +import org.springframework.context.event.ContextRefreshedEvent; +import org.springframework.context.event.EventListener; import org.springframework.core.env.Environment; import javax.annotation.PostConstruct; +import java.util.Collection; import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; @@ -58,7 +61,7 @@ import java.util.concurrent.atomic.AtomicBoolean; * * */ -public abstract class BaseSchedulerServiceImpl implements ISchedulerService, SmartLifecycle { +public abstract class BaseSchedulerServiceImpl implements ISchedulerService { public static final String SCHEDULING_DISABLED = "scheduling_disabled"; public static final String SCHEDULING_DISABLED_EQUALS_TRUE = SCHEDULING_DISABLED + "=true"; @@ -140,18 +143,10 @@ public abstract class BaseSchedulerServiceImpl implements ISchedulerService, Sma protected abstract IHapiScheduler getClusteredScheduler(); - /** - * We defer startup of executing started tasks until we're sure we're ready for it - * and the startup is completely done - */ - - @Override - public int getPhase() { - return ISmartLifecyclePhase.SCHEDULER_1000; - } - - @Override + @EventListener(ContextRefreshedEvent.class) public void start() { + myStopping.set(false); + try { ourLog.info("Starting task schedulers for context {}", myApplicationContext.getId()); if (myLocalScheduler != null) { @@ -164,9 +159,17 @@ public abstract class BaseSchedulerServiceImpl implements ISchedulerService, Sma ourLog.error("Failed to start scheduler", e); throw new ConfigurationException(Msg.code(1632) + "Failed to start scheduler", e); } + + scheduleJobs(); } - @Override + private void scheduleJobs() { + Collection values = myApplicationContext.getBeansOfType(IHasScheduledJobs.class).values(); + ourLog.info("Scheduling {} jobs in {}", values.size(), myApplicationContext.getId()); + values.forEach(t -> t.scheduleJobs(this)); + } + + @EventListener(ContextClosedEvent.class) public void stop() { ourLog.info("Shutting down task scheduler..."); @@ -175,11 +178,6 @@ public abstract class BaseSchedulerServiceImpl implements ISchedulerService, Sma myClusteredScheduler.shutdown(); } - @Override - public boolean isRunning() { - return !myStopping.get() && myLocalScheduler.isStarted() && myClusteredScheduler.isStarted(); - } - @Override public void purgeAllScheduledJobsForUnitTest() throws SchedulerException { myLocalScheduler.clear(); diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml index 7bb045ffb1f..5cba5e7e9d1 100644 --- a/hapi-fhir-jpaserver-base/pom.xml +++ b/hapi-fhir-jpaserver-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/export/svc/BulkDataExportJobSchedulingHelperImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/export/svc/BulkDataExportJobSchedulingHelperImpl.java index 5f391978db1..b577653fe7a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/export/svc/BulkDataExportJobSchedulingHelperImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/export/svc/BulkDataExportJobSchedulingHelperImpl.java @@ -20,7 +20,6 @@ package ca.uhn.fhir.jpa.bulk.export.svc; * #L% */ -import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; @@ -33,6 +32,7 @@ import ca.uhn.fhir.jpa.entity.BulkExportCollectionEntity; import ca.uhn.fhir.jpa.entity.BulkExportCollectionFileEntity; import ca.uhn.fhir.jpa.entity.BulkExportJobEntity; import ca.uhn.fhir.jpa.model.sched.HapiJob; +import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition; import ca.uhn.fhir.rest.api.server.SystemRequestDetails; @@ -47,16 +47,16 @@ import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Slice; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.support.TransactionTemplate; import javax.annotation.PostConstruct; -import org.springframework.transaction.annotation.Transactional; import java.util.Date; import java.util.Optional; import static org.slf4j.LoggerFactory.getLogger; -public class BulkDataExportJobSchedulingHelperImpl implements IBulkDataExportJobSchedulingHelper { +public class BulkDataExportJobSchedulingHelperImpl implements IBulkDataExportJobSchedulingHelper, IHasScheduledJobs { private static final Logger ourLog = getLogger(BulkDataExportJobSchedulingHelperImpl.class); @Autowired @@ -72,30 +72,26 @@ public class BulkDataExportJobSchedulingHelperImpl implements IBulkDataExportJob private PlatformTransactionManager myTxManager; private TransactionTemplate myTxTemplate; - @Autowired - private ISchedulerService mySchedulerService; - @Autowired private IBulkExportJobDao myBulkExportJobDao; @Autowired private DaoConfig myDaoConfig; - - @Autowired - private FhirContext myContext; - @Autowired private BulkExportHelperService myBulkExportHelperSvc; @PostConstruct public void start() { myTxTemplate = new TransactionTemplate(myTxManager); + } + @Override + public void scheduleJobs(ISchedulerService theSchedulerService) { // job to cleanup unneeded BulkExportJobEntities that are persisted, but unwanted ScheduledJobDefinition jobDetail = new ScheduledJobDefinition(); jobDetail.setId(PurgeExpiredFilesJob.class.getName()); jobDetail.setJobClass(PurgeExpiredFilesJob.class); - mySchedulerService.scheduleClusteredJob(DateUtils.MILLIS_PER_HOUR, jobDetail); + theSchedulerService.scheduleClusteredJob(DateUtils.MILLIS_PER_HOUR, jobDetail); } @Override diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/imprt/svc/BulkDataImportSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/imprt/svc/BulkDataImportSvcImpl.java index bc62472a703..0bebb4f459f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/imprt/svc/BulkDataImportSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/imprt/svc/BulkDataImportSvcImpl.java @@ -35,6 +35,7 @@ import ca.uhn.fhir.jpa.dao.data.IBulkImportJobFileDao; import ca.uhn.fhir.jpa.entity.BulkImportJobEntity; import ca.uhn.fhir.jpa.entity.BulkImportJobFileEntity; import ca.uhn.fhir.jpa.model.sched.HapiJob; +import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; @@ -50,11 +51,11 @@ import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Slice; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.support.TransactionTemplate; import javax.annotation.Nonnull; import javax.annotation.PostConstruct; -import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Objects; import java.util.Optional; @@ -63,7 +64,7 @@ import java.util.concurrent.Semaphore; import static ca.uhn.fhir.batch2.jobs.importpull.BulkImportPullConfig.BULK_IMPORT_JOB_NAME; -public class BulkDataImportSvcImpl implements IBulkDataImportSvc { +public class BulkDataImportSvcImpl implements IBulkDataImportSvc, IHasScheduledJobs { private static final Logger ourLog = LoggerFactory.getLogger(BulkDataImportSvcImpl.class); private final Semaphore myRunningJobSemaphore = new Semaphore(1); @Autowired @@ -74,9 +75,6 @@ public class BulkDataImportSvcImpl implements IBulkDataImportSvc { private PlatformTransactionManager myTxManager; private TransactionTemplate myTxTemplate; - @Autowired - private ISchedulerService mySchedulerService; - @Autowired private IJobCoordinator myJobCoordinator; @@ -86,14 +84,19 @@ public class BulkDataImportSvcImpl implements IBulkDataImportSvc { @PostConstruct public void start() { myTxTemplate = new TransactionTemplate(myTxManager); + } + + @Override + public void scheduleJobs(ISchedulerService theSchedulerService) { // This job should be local so that each node in the cluster can pick up jobs ScheduledJobDefinition jobDetail = new ScheduledJobDefinition(); jobDetail.setId(ActivationJob.class.getName()); jobDetail.setJobClass(ActivationJob.class); - mySchedulerService.scheduleLocalJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail); + theSchedulerService.scheduleLocalJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail); } + @Override @Transactional public String createNewJob(BulkImportJobJson theJobDescription, @Nonnull List theInitialFiles) { @@ -309,7 +312,6 @@ public class BulkDataImportSvcImpl implements IBulkDataImportSvc { } } - public static class ActivationJob implements HapiJob { @Autowired private IBulkDataImportSvc myTarget; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java index 50194e56407..011d200ad9a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java @@ -9,7 +9,6 @@ import ca.uhn.fhir.interceptor.api.IInterceptorService; import ca.uhn.fhir.interceptor.executor.InterceptorService; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; import ca.uhn.fhir.jpa.api.model.ExpungeOptions; import ca.uhn.fhir.jpa.api.svc.IIdHelperService; import ca.uhn.fhir.jpa.binary.interceptor.BinaryStorageInterceptor; @@ -46,6 +45,7 @@ import ca.uhn.fhir.jpa.dao.index.SearchParamWithInlineReferencesExtractor; import ca.uhn.fhir.jpa.dao.mdm.JpaMdmLinkImplFactory; import ca.uhn.fhir.jpa.dao.mdm.MdmLinkDaoJpaImpl; import ca.uhn.fhir.jpa.dao.tx.HapiTransactionService; +import ca.uhn.fhir.jpa.dao.validation.SearchParameterDaoValidator; import ca.uhn.fhir.jpa.delete.DeleteConflictFinderService; import ca.uhn.fhir.jpa.delete.DeleteConflictService; import ca.uhn.fhir.jpa.delete.ThreadSafeResourceDeleterSvc; @@ -132,11 +132,11 @@ import ca.uhn.fhir.jpa.term.api.ITermReindexingSvc; import ca.uhn.fhir.jpa.term.config.TermCodeSystemConfig; import ca.uhn.fhir.jpa.util.MemoryCacheService; import ca.uhn.fhir.jpa.validation.ResourceLoaderImpl; -import ca.uhn.fhir.jpa.dao.validation.SearchParameterDaoValidator; import ca.uhn.fhir.jpa.validation.ValidationSettings; import ca.uhn.fhir.mdm.dao.IMdmLinkDao; import ca.uhn.fhir.mdm.dao.IMdmLinkImplFactory; import ca.uhn.fhir.mdm.svc.MdmLinkExpandSvc; +import ca.uhn.fhir.model.api.IPrimitiveDatatype; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.api.server.storage.IDeleteExpungeJobSubmitter; import ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId; @@ -287,8 +287,8 @@ public class JpaConfig { @Bean(name = "myBinaryStorageInterceptor") @Lazy - public BinaryStorageInterceptor binaryStorageInterceptor(DaoConfig theDaoConfig) { - BinaryStorageInterceptor interceptor = new BinaryStorageInterceptor(); + public BinaryStorageInterceptor> binaryStorageInterceptor(DaoConfig theDaoConfig, FhirContext theCtx) { + BinaryStorageInterceptor> interceptor = new BinaryStorageInterceptor<>(theCtx); interceptor.setAllowAutoInflateBinaries(theDaoConfig.isAllowAutoInflateBinaries()); interceptor.setAutoInflateBinariesMaximumSize(theDaoConfig.getAutoInflateBinariesMaximumBytes()); return interceptor; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderConceptMapDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderConceptMapDstu3.java index e69de29bb2d..6d4426c36c2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderConceptMapDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderConceptMapDstu3.java @@ -0,0 +1,19 @@ +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2023 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/StaleSearchDeletingSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/StaleSearchDeletingSvcImpl.java index b8886c0d71e..6daed999f1b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/StaleSearchDeletingSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/StaleSearchDeletingSvcImpl.java @@ -22,6 +22,7 @@ package ca.uhn.fhir.jpa.search; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.model.sched.HapiJob; +import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition; import ca.uhn.fhir.jpa.search.cache.ISearchCacheSvc; @@ -30,8 +31,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.PostConstruct; - import static ca.uhn.fhir.jpa.search.cache.DatabaseSearchCacheSvcImpl.SEARCH_CLEANUP_JOB_INTERVAL_MILLIS; /** @@ -42,14 +41,12 @@ import static ca.uhn.fhir.jpa.search.cache.DatabaseSearchCacheSvcImpl.SEARCH_CLE // it in BaseConfig. This is so that we can override the definition // in Smile. // -public class StaleSearchDeletingSvcImpl implements IStaleSearchDeletingSvc { +public class StaleSearchDeletingSvcImpl implements IStaleSearchDeletingSvc, IHasScheduledJobs { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(StaleSearchDeletingSvcImpl.class); @Autowired private DaoConfig myDaoConfig; @Autowired private ISearchCacheSvc mySearchCacheSvc; - @Autowired - private ISchedulerService mySchedulerService; @Override @Transactional(propagation = Propagation.NEVER) @@ -57,12 +54,12 @@ public class StaleSearchDeletingSvcImpl implements IStaleSearchDeletingSvc { mySearchCacheSvc.pollForStaleSearchesAndDeleteThem(); } - @PostConstruct - public void scheduleJob() { + @Override + public void scheduleJobs(ISchedulerService theSchedulerService) { ScheduledJobDefinition jobDetail = new ScheduledJobDefinition(); jobDetail.setId(getClass().getName()); jobDetail.setJobClass(Job.class); - mySchedulerService.scheduleClusteredJob(SEARCH_CLEANUP_JOB_INTERVAL_MILLIS, jobDetail); + theSchedulerService.scheduleClusteredJob(SEARCH_CLEANUP_JOB_INTERVAL_MILLIS, jobDetail); } public static class Job implements HapiJob { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java index dc7c3e8ffbc..b8ad52ad179 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java @@ -21,8 +21,8 @@ package ca.uhn.fhir.jpa.search.reindex; */ import ca.uhn.fhir.batch2.model.JobInstanceStartRequest; -import ca.uhn.fhir.i18n.Msg; import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.i18n.Msg; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.dao.BaseHapiFhirDao; @@ -32,6 +32,7 @@ import ca.uhn.fhir.jpa.dao.data.IResourceTableDao; import ca.uhn.fhir.jpa.entity.ResourceReindexJobEntity; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.model.sched.HapiJob; +import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition; import ca.uhn.fhir.parser.DataFormatException; @@ -53,6 +54,7 @@ import org.springframework.data.domain.Slice; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.support.TransactionCallback; import org.springframework.transaction.support.TransactionTemplate; @@ -62,7 +64,6 @@ import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.PersistenceContextType; import javax.persistence.Query; -import org.springframework.transaction.annotation.Transactional; import java.util.Collection; import java.util.Date; import java.util.List; @@ -84,7 +85,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; * @deprecated Use the Batch2 {@link ca.uhn.fhir.batch2.api.IJobCoordinator#startInstance(JobInstanceStartRequest)} instead. */ @Deprecated -public class ResourceReindexingSvcImpl implements IResourceReindexingSvc { +public class ResourceReindexingSvcImpl implements IResourceReindexingSvc, IHasScheduledJobs { private static final Date BEGINNING_OF_TIME = new Date(0); private static final Logger ourLog = LoggerFactory.getLogger(ResourceReindexingSvcImpl.class); @@ -112,8 +113,6 @@ public class ResourceReindexingSvcImpl implements IResourceReindexingSvc { @Autowired private ISearchParamRegistry mySearchParamRegistry; @Autowired - private ISchedulerService mySchedulerService; - @Autowired private ResourceReindexer myResourceReindexer; @VisibleForTesting @@ -130,7 +129,6 @@ public class ResourceReindexingSvcImpl implements IResourceReindexingSvc { public void start() { myTxTemplate = new TransactionTemplate(myTxManager); initExecutor(); - scheduleJob(); } public void initExecutor() { @@ -145,12 +143,12 @@ public class ResourceReindexingSvcImpl implements IResourceReindexingSvc { ); } - - public void scheduleJob() { + @Override + public void scheduleJobs(ISchedulerService theSchedulerService) { ScheduledJobDefinition jobDetail = new ScheduledJobDefinition(); jobDetail.setId(getClass().getName()); jobDetail.setJobClass(Job.class); - mySchedulerService.scheduleClusteredJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail); + theSchedulerService.scheduleClusteredJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail); } @Override diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/CacheWarmingSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/CacheWarmingSvcImpl.java index 134fdd62a57..e8d5eb0a1f2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/CacheWarmingSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/CacheWarmingSvcImpl.java @@ -20,15 +20,16 @@ package ca.uhn.fhir.jpa.search.warm; * #L% */ -import ca.uhn.fhir.i18n.Msg; import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.RuntimeResourceDefinition; +import ca.uhn.fhir.i18n.Msg; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; import ca.uhn.fhir.jpa.api.model.WarmCacheEntry; import ca.uhn.fhir.jpa.model.sched.HapiJob; +import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition; import ca.uhn.fhir.jpa.searchparam.MatchUrlService; @@ -50,7 +51,7 @@ import java.util.Map; import java.util.Set; @Component -public class CacheWarmingSvcImpl implements ICacheWarmingSvc { +public class CacheWarmingSvcImpl implements ICacheWarmingSvc, IHasScheduledJobs { private static final Logger ourLog = LoggerFactory.getLogger(CacheWarmingSvcImpl.class); @Autowired @@ -62,8 +63,6 @@ public class CacheWarmingSvcImpl implements ICacheWarmingSvc { private DaoRegistry myDaoRegistry; @Autowired private MatchUrlService myMatchUrlService; - @Autowired - private ISchedulerService mySchedulerService; @Override public synchronized void performWarmingPass() { @@ -109,14 +108,14 @@ public class CacheWarmingSvcImpl implements ICacheWarmingSvc { @PostConstruct public void start() { initCacheMap(); - scheduleJob(); } - public void scheduleJob() { + @Override + public void scheduleJobs(ISchedulerService theSchedulerService) { ScheduledJobDefinition jobDetail = new ScheduledJobDefinition(); jobDetail.setId(getClass().getName()); jobDetail.setJobClass(Job.class); - mySchedulerService.scheduleClusteredJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail); + theSchedulerService.scheduleClusteredJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail); } public static class Job implements HapiJob { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermDeferredStorageSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermDeferredStorageSvcImpl.java index d246188f3b8..582bf435fc8 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermDeferredStorageSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermDeferredStorageSvcImpl.java @@ -35,6 +35,7 @@ import ca.uhn.fhir.jpa.entity.TermConcept; import ca.uhn.fhir.jpa.entity.TermConceptParentChildLink; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.model.sched.HapiJob; +import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition; import ca.uhn.fhir.jpa.term.api.ITermDeferredStorageSvc; @@ -58,7 +59,6 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.transaction.support.TransactionTemplate; -import javax.annotation.PostConstruct; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -73,7 +73,7 @@ import java.util.function.Supplier; import static ca.uhn.fhir.batch2.jobs.termcodesystem.TermCodeSystemJobConfig.TERM_CODE_SYSTEM_DELETE_JOB_NAME; import static ca.uhn.fhir.batch2.jobs.termcodesystem.TermCodeSystemJobConfig.TERM_CODE_SYSTEM_VERSION_DELETE_JOB_NAME; -public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc { +public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc, IHasScheduledJobs { private static final Logger ourLog = LoggerFactory.getLogger(TermDeferredStorageSvcImpl.class); private static final long SAVE_ALL_DEFERRED_WARN_MINUTES = 1; @@ -105,8 +105,6 @@ public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc { @Autowired private ITermConceptParentChildLinkDao myConceptParentChildLinkDao; @Autowired - private ISchedulerService mySchedulerService; - @Autowired private ITermVersionAdapterSvc myTerminologyVersionAdapterSvc; @Autowired @@ -282,9 +280,9 @@ public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc { Duration.of(SAVE_ALL_DEFERRED_ERROR_MINUTES, ChronoUnit.MINUTES)); } - // Don't include executing jobs here since there's no point in thrashing over and over - // in a busy wait while we wait for batch2 job processes to finish - while (!isStorageQueueEmpty(false)) { + // Don't include executing jobs here since there's no point in thrashing over and over + // in a busy wait while we wait for batch2 job processes to finish + while (!isStorageQueueEmpty(false)) { if (myAllowDeferredTasksTimeout) { if (timeoutManager.checkTimeout()) { ourLog.info(toString()); @@ -464,18 +462,6 @@ public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc { return !myDeferredConceptMaps.isEmpty(); } - @PostConstruct - public void scheduleJob() { - // TODO KHS what does this mean? - // Register scheduled job to save deferred concepts - // In the future it would be great to make this a cluster-aware task somehow - ScheduledJobDefinition jobDefinition = new ScheduledJobDefinition(); - jobDefinition.setId(Job.class.getName()); - jobDefinition.setJobClass(Job.class); - mySchedulerService.scheduleLocalJob(5000, jobDefinition); - - } - @VisibleForTesting void setTransactionManagerForUnitTest(PlatformTransactionManager theTxManager) { myTransactionMgr = theTxManager; @@ -496,8 +482,11 @@ public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc { void setCodeSystemVersionDaoForUnitTest(ITermCodeSystemVersionDao theCodeSystemVersionDao) { myCodeSystemVersionDao = theCodeSystemVersionDao; } + @Override - public void disallowDeferredTaskTimeout() { myAllowDeferredTasksTimeout = false; } + public void disallowDeferredTaskTimeout() { + myAllowDeferredTasksTimeout = false; + } @Override @VisibleForTesting @@ -515,6 +504,17 @@ public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc { myDeferredCodeSystemVersionsDeletions.add(theCodeSystemVersion); } + @Override + public void scheduleJobs(ISchedulerService theSchedulerService) { + // TODO KHS what does this mean? + // Register scheduled job to save deferred concepts + // In the future it would be great to make this a cluster-aware task somehow + ScheduledJobDefinition jobDefinition = new ScheduledJobDefinition(); + jobDefinition.setId(Job.class.getName()); + jobDefinition.setJobClass(Job.class); + theSchedulerService.scheduleLocalJob(5000, jobDefinition); + } + public static class Job implements HapiJob { @Autowired private ITermDeferredStorageSvc myTerminologySvc; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcImpl.java index c571aacf121..eb35ef43202 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcImpl.java @@ -65,6 +65,7 @@ import ca.uhn.fhir.jpa.model.dao.JpaPid; import ca.uhn.fhir.jpa.model.entity.ForcedId; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.model.sched.HapiJob; +import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition; import ca.uhn.fhir.jpa.model.util.JpaConstants; @@ -192,7 +193,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; import static org.apache.commons.lang3.StringUtils.lowerCase; import static org.apache.commons.lang3.StringUtils.startsWithIgnoreCase; -public class TermReadSvcImpl implements ITermReadSvc { +public class TermReadSvcImpl implements ITermReadSvc, IHasScheduledJobs { public static final int DEFAULT_FETCH_SIZE = 250; public static final int DEFAULT_MASS_INDEXER_OBJECT_LOADING_THREADS = 2; // doesn't seem to be much gain by using more threads than this value @@ -248,8 +249,6 @@ public class TermReadSvcImpl implements ITermReadSvc { private ITermValueSetConceptViewDao myTermValueSetConceptViewDao; @Autowired private ITermValueSetConceptViewOracleDao myTermValueSetConceptViewOracleDao; - @Autowired - private ISchedulerService mySchedulerService; @Autowired(required = false) private ITermDeferredStorageSvc myDeferredStorageSvc; @Autowired @@ -1887,16 +1886,16 @@ public class TermReadSvcImpl implements ITermReadSvc { RuleBasedTransactionAttribute rules = new RuleBasedTransactionAttribute(); rules.getRollbackRules().add(new NoRollbackRuleAttribute(ExpansionTooCostlyException.class)); myTxTemplate = new TransactionTemplate(myTransactionManager, rules); - scheduleJob(); } - public void scheduleJob() { + @Override + public void scheduleJobs(ISchedulerService theSchedulerService) { // Register scheduled job to pre-expand ValueSets // In the future it would be great to make this a cluster-aware task somehow ScheduledJobDefinition vsJobDefinition = new ScheduledJobDefinition(); vsJobDefinition.setId(getClass().getName()); vsJobDefinition.setJobClass(Job.class); - mySchedulerService.scheduleClusteredJob(10 * DateUtils.MILLIS_PER_MINUTE, vsJobDefinition); + theSchedulerService.scheduleClusteredJob(10 * DateUtils.MILLIS_PER_MINUTE, vsJobDefinition); } @Override diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReindexingSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReindexingSvcImpl.java index 60574891f8e..6ac01ad168e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReindexingSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReindexingSvcImpl.java @@ -24,6 +24,7 @@ import ca.uhn.fhir.jpa.dao.data.ITermConceptDao; import ca.uhn.fhir.jpa.dao.data.ITermConceptParentChildLinkDao; import ca.uhn.fhir.jpa.entity.TermConcept; import ca.uhn.fhir.jpa.model.sched.HapiJob; +import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition; import ca.uhn.fhir.jpa.term.api.ITermDeferredStorageSvc; @@ -45,13 +46,12 @@ import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.support.TransactionCallbackWithoutResult; import org.springframework.transaction.support.TransactionTemplate; -import javax.annotation.PostConstruct; import java.util.Collection; import java.util.List; import static org.apache.commons.lang3.StringUtils.isBlank; -public class TermReindexingSvcImpl implements ITermReindexingSvc { +public class TermReindexingSvcImpl implements ITermReindexingSvc, IHasScheduledJobs { private static final Logger ourLog = LoggerFactory.getLogger(TermReindexingSvcImpl.class); private static boolean ourForceSaveDeferredAlwaysForUnitTest; @Autowired @@ -64,8 +64,6 @@ public class TermReindexingSvcImpl implements ITermReindexingSvc { @Autowired private ITermDeferredStorageSvc myDeferredStorageSvc; @Autowired - private ISchedulerService mySchedulerService; - @Autowired private TermConceptDaoSvc myTermConceptDaoSvc; @Override @@ -147,15 +145,15 @@ public class TermReindexingSvcImpl implements ITermReindexingSvc { } - @PostConstruct - public void scheduleJob() { + @Override + public void scheduleJobs(ISchedulerService theSchedulerService) { // TODO KHS what does this mean? // Register scheduled job to save deferred concepts // In the future it would be great to make this a cluster-aware task somehow ScheduledJobDefinition jobDefinition = new ScheduledJobDefinition(); jobDefinition.setId(this.getClass().getName()); jobDefinition.setJobClass(Job.class); - mySchedulerService.scheduleLocalJob(DateUtils.MILLIS_PER_MINUTE, jobDefinition); + theSchedulerService.scheduleLocalJob(DateUtils.MILLIS_PER_MINUTE, jobDefinition); } public static class Job implements HapiJob { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ResourceCountCache.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ResourceCountCache.java index 652bb41d96c..d90d97ffc83 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ResourceCountCache.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ResourceCountCache.java @@ -22,6 +22,7 @@ package ca.uhn.fhir.jpa.util; import ca.uhn.fhir.i18n.Msg; import ca.uhn.fhir.jpa.model.sched.HapiJob; +import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; @@ -32,12 +33,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import javax.annotation.PostConstruct; import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.atomic.AtomicReference; -public class ResourceCountCache { +public class ResourceCountCache implements IHasScheduledJobs { private static final Logger ourLog = LoggerFactory.getLogger(ResourceCountCache.class); private static Long ourNowForUnitTest; @@ -45,8 +45,6 @@ public class ResourceCountCache { private volatile long myCacheMillis; private AtomicReference> myCapabilityStatement = new AtomicReference<>(); private long myLastFetched; - @Autowired - private ISchedulerService mySchedulerService; /** * Constructor @@ -92,12 +90,12 @@ public class ResourceCountCache { } } - @PostConstruct - public void scheduleJob() { + @Override + public void scheduleJobs(ISchedulerService theSchedulerService) { ScheduledJobDefinition jobDetail = new ScheduledJobDefinition(); jobDetail.setId(getClass().getName()); jobDetail.setJobClass(Job.class); - mySchedulerService.scheduleLocalJob(10 * DateUtils.MILLIS_PER_MINUTE, jobDetail); + theSchedulerService.scheduleLocalJob(10 * DateUtils.MILLIS_PER_MINUTE, jobDetail); } public static class Job implements HapiJob { diff --git a/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml b/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml index 5274011198b..8cc1f3fcef3 100644 --- a/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml +++ b/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-mdm/pom.xml b/hapi-fhir-jpaserver-mdm/pom.xml index c848e473cf3..de72733aa04 100644 --- a/hapi-fhir-jpaserver-mdm/pom.xml +++ b/hapi-fhir-jpaserver-mdm/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml index e533bee38d0..299598a902c 100644 --- a/hapi-fhir-jpaserver-model/pom.xml +++ b/hapi-fhir-jpaserver-model/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml index 9b32fd3d733..606c49aa5e8 100755 --- a/hapi-fhir-jpaserver-searchparam/pom.xml +++ b/hapi-fhir-jpaserver-searchparam/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceChangeListenerCacheRefresherImpl.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceChangeListenerCacheRefresherImpl.java index bc186fc5954..69db62961b9 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceChangeListenerCacheRefresherImpl.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/cache/ResourceChangeListenerCacheRefresherImpl.java @@ -21,6 +21,7 @@ package ca.uhn.fhir.jpa.cache; */ import ca.uhn.fhir.jpa.model.sched.HapiJob; +import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; @@ -31,9 +32,9 @@ import org.quartz.JobExecutionContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.event.ContextClosedEvent; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.context.event.EventListener; -import org.springframework.core.annotation.Order; import org.springframework.stereotype.Service; import java.util.ArrayList; @@ -50,7 +51,7 @@ import java.util.List; * if any entries in the new cache are different from the last time that cache was loaded. */ @Service -public class ResourceChangeListenerCacheRefresherImpl implements IResourceChangeListenerCacheRefresher { +public class ResourceChangeListenerCacheRefresherImpl implements IResourceChangeListenerCacheRefresher, IHasScheduledJobs { private static final Logger ourLog = LoggerFactory.getLogger(ResourceChangeListenerCacheRefresherImpl.class); /** @@ -58,20 +59,18 @@ public class ResourceChangeListenerCacheRefresherImpl implements IResourceChange */ static long LOCAL_REFRESH_INTERVAL_MS = 10 * DateUtils.MILLIS_PER_SECOND; - @Autowired - private ISchedulerService mySchedulerService; @Autowired private IResourceVersionSvc myResourceVersionSvc; @Autowired private ResourceChangeListenerRegistryImpl myResourceChangeListenerRegistry; + private boolean myStopping = false; - @EventListener(classes = {ContextRefreshedEvent.class}) - @Order - public void start() { + @Override + public void scheduleJobs(ISchedulerService theSchedulerService) { ScheduledJobDefinition jobDetail = new ScheduledJobDefinition(); jobDetail.setId(getClass().getName()); jobDetail.setJobClass(Job.class); - mySchedulerService.scheduleLocalJob(LOCAL_REFRESH_INTERVAL_MS, jobDetail); + theSchedulerService.scheduleLocalJob(LOCAL_REFRESH_INTERVAL_MS, jobDetail); } public static class Job implements HapiJob { @@ -106,11 +105,6 @@ public class ResourceChangeListenerCacheRefresherImpl implements IResourceChange return retval; } - @VisibleForTesting - public void setSchedulerService(ISchedulerService theSchedulerService) { - mySchedulerService = theSchedulerService; - } - @VisibleForTesting public void setResourceChangeListenerRegistry(ResourceChangeListenerRegistryImpl theResourceChangeListenerRegistry) { myResourceChangeListenerRegistry = theResourceChangeListenerRegistry; @@ -121,11 +115,26 @@ public class ResourceChangeListenerCacheRefresherImpl implements IResourceChange myResourceVersionSvc = theResourceVersionSvc; } + + @EventListener(ContextRefreshedEvent.class) + public void start() { + myStopping = false; + } + + @EventListener(ContextClosedEvent.class) + public void shutdown() { + myStopping = true; + } + + public boolean isStopping() { + return myStopping; + } + @Override public ResourceChangeResult refreshCacheAndNotifyListener(IResourceChangeListenerCache theCache) { ResourceChangeResult retVal = new ResourceChangeResult(); - if (mySchedulerService.isStopping()) { - ourLog.info("Scheduler service is stopping, aborting cache refresh"); + if (isStopping()) { + ourLog.info("Context is stopping, aborting cache refresh"); return retVal; } if (!myResourceChangeListenerRegistry.contains(theCache)) { diff --git a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/cache/ResourceChangeListenerRegistryImplTest.java b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/cache/ResourceChangeListenerRegistryImplTest.java index 1817dda2699..62d2d5fd920 100644 --- a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/cache/ResourceChangeListenerRegistryImplTest.java +++ b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/cache/ResourceChangeListenerRegistryImplTest.java @@ -49,8 +49,6 @@ class ResourceChangeListenerRegistryImplTest { @Autowired ResourceChangeListenerCacheFactory myResourceChangeListenerCacheFactory; @MockBean - private ISchedulerService mySchedulerService; - @MockBean private IResourceVersionSvc myResourceVersionSvc; @MockBean private ResourceChangeListenerCacheRefresherImpl myResourceChangeListenerCacheRefresher; diff --git a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParamRegistryImplTest.java b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParamRegistryImplTest.java index fe42ddeec06..39799424eeb 100644 --- a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParamRegistryImplTest.java +++ b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/registry/SearchParamRegistryImplTest.java @@ -92,8 +92,6 @@ public class SearchParamRegistryImplTest { @MockBean private IResourceVersionSvc myResourceVersionSvc; @MockBean - private ISchedulerService mySchedulerService; - @MockBean private ISearchParamProvider mySearchParamProvider; @MockBean private IInterceptorService myInterceptorBroadcaster; diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml index 11cfa322b81..6e7a7123e82 100644 --- a/hapi-fhir-jpaserver-subscription/pom.xml +++ b/hapi-fhir-jpaserver-subscription/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/match/registry/SubscriptionLoader.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/match/registry/SubscriptionLoader.java index 77ffe2dcfe6..35e06522741 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/match/registry/SubscriptionLoader.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/match/registry/SubscriptionLoader.java @@ -44,6 +44,9 @@ import org.hl7.fhir.r4.model.Subscription; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.event.ContextClosedEvent; +import org.springframework.context.event.ContextRefreshedEvent; +import org.springframework.context.event.EventListener; import javax.annotation.Nonnull; import javax.annotation.PostConstruct; @@ -68,8 +71,6 @@ public class SubscriptionLoader implements IResourceChangeListener { DaoRegistry myDaoRegistry; private Semaphore mySyncSubscriptionsSemaphore = new Semaphore(1); @Autowired - private ISchedulerService mySchedulerService; - @Autowired private SubscriptionActivatingSubscriber mySubscriptionActivatingInterceptor; @Autowired private ISearchParamRegistry mySearchParamRegistry; @@ -80,6 +81,7 @@ public class SubscriptionLoader implements IResourceChangeListener { private SearchParameterMap mySearchParameterMap; private SystemRequestDetails mySystemRequestDetails; + private boolean myStopping; /** * Constructor @@ -144,7 +146,7 @@ public class SubscriptionLoader implements IResourceChangeListener { } private int doSyncSubscriptions() { - if (mySchedulerService.isStopping()) { + if (isStopping()) { return 0; } @@ -165,6 +167,20 @@ public class SubscriptionLoader implements IResourceChangeListener { } } + @EventListener(ContextRefreshedEvent.class) + public void start() { + myStopping = false; + } + + @EventListener(ContextClosedEvent.class) + public void shutdown() { + myStopping = true; + } + + private boolean isStopping() { + return myStopping; + } + private IFhirResourceDao getSubscriptionDao() { return myDaoRegistry.getSubscriptionDao(); } diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/triggering/SubscriptionTriggeringSvcImpl.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/triggering/SubscriptionTriggeringSvcImpl.java index fd68290ada7..df8a15483c2 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/triggering/SubscriptionTriggeringSvcImpl.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/triggering/SubscriptionTriggeringSvcImpl.java @@ -30,9 +30,9 @@ import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; import ca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc; import ca.uhn.fhir.jpa.api.svc.ISearchSvc; import ca.uhn.fhir.jpa.model.sched.HapiJob; +import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition; -import ca.uhn.fhir.rest.api.server.SystemRequestDetails; import ca.uhn.fhir.jpa.searchparam.MatchUrlService; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.subscription.match.matcher.matching.IResourceModifiedConsumer; @@ -41,6 +41,7 @@ import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum; import ca.uhn.fhir.rest.annotation.IdParam; import ca.uhn.fhir.rest.api.CacheControlDirective; import ca.uhn.fhir.rest.api.server.IBundleProvider; +import ca.uhn.fhir.rest.api.server.SystemRequestDetails; import ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; @@ -86,7 +87,7 @@ import static org.apache.commons.lang3.ObjectUtils.defaultIfNull; import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.isNotBlank; -public class SubscriptionTriggeringSvcImpl implements ISubscriptionTriggeringSvc { +public class SubscriptionTriggeringSvcImpl implements ISubscriptionTriggeringSvc, IHasScheduledJobs { private static final Logger ourLog = LoggerFactory.getLogger(SubscriptionTriggeringSvcImpl.class); private static final int DEFAULT_MAX_SUBMIT = 10000; private final List myActiveJobs = new ArrayList<>(); @@ -104,8 +105,6 @@ public class SubscriptionTriggeringSvcImpl implements ISubscriptionTriggeringSvc private IResourceModifiedConsumer myResourceModifiedConsumer; private int myMaxSubmitPerPass = DEFAULT_MAX_SUBMIT; private ExecutorService myExecutorService; - @Autowired - private ISchedulerService mySchedulerService; @Autowired private ISearchSvc mySearchService; @@ -449,7 +448,6 @@ public class SubscriptionTriggeringSvcImpl implements ISubscriptionTriggeringSvc @PostConstruct public void start() { createExecutorService(); - scheduleJob(); } private void createExecutorService() { @@ -485,13 +483,14 @@ public class SubscriptionTriggeringSvcImpl implements ISubscriptionTriggeringSvc rejectedExecutionHandler); } - private void scheduleJob() { + @Override + public void scheduleJobs(ISchedulerService theSchedulerService) { ScheduledJobDefinition jobDetail = new ScheduledJobDefinition(); jobDetail.setId(getClass().getName()); jobDetail.setJobClass(Job.class); // Currently jobs ae kept in a local ArrayList so this should be a local job, and // it can fire frequently without adding load - mySchedulerService.scheduleLocalJob(5 * DateUtils.MILLIS_PER_SECOND, jobDetail); + theSchedulerService.scheduleLocalJob(5 * DateUtils.MILLIS_PER_SECOND, jobDetail); } public int getActiveJobCount() { diff --git a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/matcher/matching/DaoSubscriptionMatcherTest.java b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/matcher/matching/DaoSubscriptionMatcherTest.java index bfbd18d78e3..b61d8cce945 100644 --- a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/matcher/matching/DaoSubscriptionMatcherTest.java +++ b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/matcher/matching/DaoSubscriptionMatcherTest.java @@ -47,8 +47,6 @@ public class DaoSubscriptionMatcherTest { @MockBean private ISearchParamProvider mySearchParamProvider; @MockBean - private ISchedulerService mySchedulerService; - @MockBean private IInterceptorService myInterceptorService; @MockBean private DaoRegistry myDaoRegistry; diff --git a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/registry/SubscriptionLoaderTest.java b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/registry/SubscriptionLoaderTest.java index bd75fc29359..1a720a867b1 100644 --- a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/registry/SubscriptionLoaderTest.java +++ b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/registry/SubscriptionLoaderTest.java @@ -130,8 +130,6 @@ public class SubscriptionLoaderTest { .thenReturn(getSubscriptionList( Collections.singletonList(subscription) )); - when(mySchedulerSvc.isStopping()) - .thenReturn(false); when(mySubscriptionActivatingInterceptor.activateSubscriptionIfRequired(any(IBaseResource.class))) .thenReturn(false); diff --git a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/WebsocketConnectionValidatorTest.java b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/WebsocketConnectionValidatorTest.java index 6d94c5bcc07..3ffa3fa9334 100644 --- a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/WebsocketConnectionValidatorTest.java +++ b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/WebsocketConnectionValidatorTest.java @@ -63,8 +63,6 @@ public class WebsocketConnectionValidatorTest { @MockBean InMemoryResourceMatcher myInMemoryResourceMatcher; @MockBean - ISchedulerService mySchedulerService; - @MockBean SubscriptionRegistry mySubscriptionRegistry; @MockBean ISearchParamRegistry mySearchParamRegistry; diff --git a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/submit/interceptor/SubscriptionSubmitInterceptorLoaderTest.java b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/submit/interceptor/SubscriptionSubmitInterceptorLoaderTest.java index 2136837d37b..b752539106f 100644 --- a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/submit/interceptor/SubscriptionSubmitInterceptorLoaderTest.java +++ b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/submit/interceptor/SubscriptionSubmitInterceptorLoaderTest.java @@ -39,8 +39,6 @@ public class SubscriptionSubmitInterceptorLoaderTest { @MockBean private ISearchParamProvider mySearchParamProvider; @MockBean - private ISchedulerService mySchedulerService; - @MockBean private IInterceptorService myInterceptorService; @MockBean private IValidationSupport myValidationSupport; diff --git a/hapi-fhir-jpaserver-test-dstu2/pom.xml b/hapi-fhir-jpaserver-test-dstu2/pom.xml index 52bbc05019f..57b7d688afe 100644 --- a/hapi-fhir-jpaserver-test-dstu2/pom.xml +++ b/hapi-fhir-jpaserver-test-dstu2/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-dstu3/pom.xml b/hapi-fhir-jpaserver-test-dstu3/pom.xml index 525b8476c8a..c69e2475542 100644 --- a/hapi-fhir-jpaserver-test-dstu3/pom.xml +++ b/hapi-fhir-jpaserver-test-dstu3/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/SubscriptionTriggeringDstu3Test.java b/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/SubscriptionTriggeringDstu3Test.java index d38ff141350..15837e871c4 100644 --- a/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/SubscriptionTriggeringDstu3Test.java +++ b/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/SubscriptionTriggeringDstu3Test.java @@ -81,8 +81,6 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te @Autowired private ISubscriptionTriggeringSvc mySubscriptionTriggeringSvc; @Autowired - private ISchedulerService mySchedulerService; - @Autowired private IInterceptorService myInterceptorService; @AfterEach @@ -125,8 +123,6 @@ public class SubscriptionTriggeringDstu3Test extends BaseResourceProviderDstu3Te ourCreatedPatients.clear(); ourUpdatedPatients.clear(); ourContentTypes.clear(); - - mySchedulerService.logStatusForUnitTest(); } private Subscription createSubscription(String theCriteria, String thePayload, String theEndpoint) throws InterruptedException { diff --git a/hapi-fhir-jpaserver-test-r4/pom.xml b/hapi-fhir-jpaserver-test-r4/pom.xml index ac4a8290e74..dbc67429e1d 100644 --- a/hapi-fhir-jpaserver-test-r4/pom.xml +++ b/hapi-fhir-jpaserver-test-r4/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/BinaryStorageInterceptorR4Test.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/BinaryStorageInterceptorR4Test.java index d82749c8698..4a533d89c48 100644 --- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/BinaryStorageInterceptorR4Test.java +++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/BinaryStorageInterceptorR4Test.java @@ -30,6 +30,7 @@ import static org.hamcrest.Matchers.not; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.fail; public class BinaryStorageInterceptorR4Test extends BaseResourceProviderR4Test { @@ -60,8 +61,8 @@ public class BinaryStorageInterceptorR4Test extends BaseResourceProviderR4Test { super.after(); myStorageSvc.setMinimumBinarySize(0); myDaoConfig.setExpungeEnabled(new DaoConfig().isExpungeEnabled()); - myBinaryStorageInterceptor.setAutoInflateBinariesMaximumSize(new BinaryStorageInterceptor().getAutoInflateBinariesMaximumSize()); - myBinaryStorageInterceptor.setAllowAutoInflateBinaries(new BinaryStorageInterceptor().isAllowAutoInflateBinaries()); + myBinaryStorageInterceptor.setAutoInflateBinariesMaximumSize(new BinaryStorageInterceptor<>(myFhirContext).getAutoInflateBinariesMaximumSize()); + myBinaryStorageInterceptor.setAllowAutoInflateBinaries(new BinaryStorageInterceptor<>(myFhirContext).isAllowAutoInflateBinaries()); MemoryBinaryStorageSvcImpl binaryStorageSvc = (MemoryBinaryStorageSvcImpl) myBinaryStorageSvc; binaryStorageSvc.clear(); @@ -100,7 +101,7 @@ public class BinaryStorageInterceptorR4Test extends BaseResourceProviderR4Test { Binary binary = new Binary(); binary.setContentType("application/octet-stream"); binary.setData(SOME_BYTES); - DaoMethodOutcome outcome = myBinaryDao.create(binary); + DaoMethodOutcome outcome = myBinaryDao.create(binary, mySrd); // Make sure it was externalized IIdType id = outcome.getId().toUnqualifiedVersionless(); @@ -124,7 +125,7 @@ public class BinaryStorageInterceptorR4Test extends BaseResourceProviderR4Test { Binary binary = new Binary(); binary.setContentType("application/octet-stream"); binary.setData(SOME_BYTES); - DaoMethodOutcome outcome = myBinaryDao.create(binary); + DaoMethodOutcome outcome = myBinaryDao.create(binary, mySrd); // Make sure it was externalized IIdType id = outcome.getId().toUnqualifiedVersionless(); @@ -342,7 +343,7 @@ public class BinaryStorageInterceptorR4Test extends BaseResourceProviderR4Test { // Now read it back and make sure it was de-externalized Binary output = myBinaryDao.read(id, mySrd); assertEquals("application/octet-stream", output.getContentType()); - assertEquals(null, output.getData()); + assertNull(output.getData()); assertNotNull(output.getDataElement().getExtensionByUrl(HapiExtensions.EXT_EXTERNALIZED_BINARY_ID).getValue()); } diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImplTest.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImplTest.java index a4ecbbcb476..402dab49c00 100644 --- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImplTest.java +++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImplTest.java @@ -84,8 +84,6 @@ public class ResourceReindexingSvcImplTest extends BaseJpaTest { private ISearchParamRegistry mySearchParamRegistry; @Mock private TransactionStatus myTxStatus; - @Mock - private ISchedulerService mySchedulerService; @InjectMocks private final ResourceReindexer myResourceReindexer = new ResourceReindexer(ourFhirContext); @InjectMocks diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java index d6f8e7c0a52..1ded2805d7a 100644 --- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java +++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/stresstest/GiantTransactionPerfTest.java @@ -209,7 +209,6 @@ public class GiantTransactionPerfTest { myResourceVersionSvc = new MockResourceVersionSvc(); myResourceChangeListenerCacheRefresher = new ResourceChangeListenerCacheRefresherImpl(); - myResourceChangeListenerCacheRefresher.setSchedulerService(new MockSchedulerSvc()); myResourceChangeListenerCacheRefresher.setResourceVersionSvc(myResourceVersionSvc); when(myResourceChangeListenerCacheFactory.newResourceChangeListenerCache(any(), any(), any(), anyLong())).thenAnswer(t -> { diff --git a/hapi-fhir-jpaserver-test-r4b/pom.xml b/hapi-fhir-jpaserver-test-r4b/pom.xml index 34c3a12d31e..187d2b433f7 100644 --- a/hapi-fhir-jpaserver-test-r4b/pom.xml +++ b/hapi-fhir-jpaserver-test-r4b/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-r5/pom.xml b/hapi-fhir-jpaserver-test-r5/pom.xml index 1813c46c73c..6294395fc41 100644 --- a/hapi-fhir-jpaserver-test-r5/pom.xml +++ b/hapi-fhir-jpaserver-test-r5/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-utilities/pom.xml b/hapi-fhir-jpaserver-test-utilities/pom.xml index 5222c291443..4fe8f0b284f 100644 --- a/hapi-fhir-jpaserver-test-utilities/pom.xml +++ b/hapi-fhir-jpaserver-test-utilities/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml index a37660923fc..e8547c9e090 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml +++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/interceptor/AnalyticsInterceptor.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/interceptor/AnalyticsInterceptor.java index cf438c864da..44857fda6d8 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/interceptor/AnalyticsInterceptor.java +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/interceptor/AnalyticsInterceptor.java @@ -1,6 +1,7 @@ package ca.uhn.fhirtest.interceptor; import ca.uhn.fhir.jpa.model.sched.HapiJob; +import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition; import ca.uhn.fhir.rest.api.RestOperationTypeEnum; @@ -31,7 +32,7 @@ import java.util.UUID; import static org.apache.commons.lang3.StringUtils.defaultIfBlank; import static org.apache.commons.lang3.StringUtils.isBlank; -public class AnalyticsInterceptor extends InterceptorAdapter { +public class AnalyticsInterceptor extends InterceptorAdapter implements IHasScheduledJobs { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(AnalyticsInterceptor.class); private final LinkedList myEventBuffer = new LinkedList<>(); private String myAnalyticsTid; @@ -40,8 +41,6 @@ public class AnalyticsInterceptor extends InterceptorAdapter { private HttpClient myHttpClient; private long mySubmitPeriod = 60000; private int mySubmitThreshold = 1000; - @Autowired - private ISchedulerService mySchedulerService; /** * Constructor @@ -55,12 +54,12 @@ public class AnalyticsInterceptor extends InterceptorAdapter { } } - @PostConstruct - public void start() { + @Override + public void scheduleJobs(ISchedulerService theSchedulerService) { ScheduledJobDefinition jobDetail = new ScheduledJobDefinition(); jobDetail.setId(getClass().getName()); jobDetail.setJobClass(Job.class); - mySchedulerService.scheduleLocalJob(5000, jobDetail); + theSchedulerService.scheduleLocalJob(5000, jobDetail); } @PreDestroy diff --git a/hapi-fhir-server-mdm/pom.xml b/hapi-fhir-server-mdm/pom.xml index 69883ccfff6..53caa265a03 100644 --- a/hapi-fhir-server-mdm/pom.xml +++ b/hapi-fhir-server-mdm/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmQuerySearchParameters.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmQuerySearchParameters.java index 784c722ecb3..0cf1601d588 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmQuerySearchParameters.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmQuerySearchParameters.java @@ -2,7 +2,7 @@ package ca.uhn.fhir.mdm.api; /*- * #%L - * HAPI FHIR JPA Server - Master Data Management + * HAPI FHIR - Master Data Management * %% * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% diff --git a/hapi-fhir-server-openapi/pom.xml b/hapi-fhir-server-openapi/pom.xml index 337aad609cb..d8f2c9c56b5 100644 --- a/hapi-fhir-server-openapi/pom.xml +++ b/hapi-fhir-server-openapi/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml index a8607067bd8..48da5ad1efa 100644 --- a/hapi-fhir-server/pom.xml +++ b/hapi-fhir-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml index 44fdb741583..3eb92fc4276 100644 --- a/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml +++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml @@ -7,7 +7,7 @@ hapi-fhir-serviceloaders ca.uhn.hapi.fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml index 0b34a049951..0b7d1f09302 100644 --- a/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml +++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml @@ -7,7 +7,7 @@ hapi-fhir-serviceloaders ca.uhn.hapi.fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../pom.xml @@ -20,7 +20,7 @@ ca.uhn.hapi.fhir hapi-fhir-caching-api - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT com.github.ben-manes.caffeine diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml index dfca9158e94..d7813f6be22 100644 --- a/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml +++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml @@ -7,7 +7,7 @@ hapi-fhir-serviceloaders ca.uhn.hapi.fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml index d198f468a68..30149af72ce 100644 --- a/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml +++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml @@ -7,7 +7,7 @@ hapi-fhir ca.uhn.hapi.fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../../pom.xml diff --git a/hapi-fhir-serviceloaders/pom.xml b/hapi-fhir-serviceloaders/pom.xml index 66b64859d9b..52e592ba44d 100644 --- a/hapi-fhir-serviceloaders/pom.xml +++ b/hapi-fhir-serviceloaders/pom.xml @@ -5,7 +5,7 @@ hapi-fhir ca.uhn.hapi.fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml index 3cb46fad87e..d96bd97c72c 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml index 55680187213..22cb28b0a08 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT hapi-fhir-spring-boot-sample-client-apache diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml index 547ecdeb30e..8acd45819c3 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT hapi-fhir-spring-boot-sample-client-okhttp diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml index 8dea92ee263..13b6a6cd2ea 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT hapi-fhir-spring-boot-sample-server-jersey diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml index 2ccfcbbc335..e6cd051c4d4 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT hapi-fhir-spring-boot-samples diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml index 66c0cec158f..7427c62c325 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml index a60d5979626..32d53a32aa7 100644 --- a/hapi-fhir-spring-boot/pom.xml +++ b/hapi-fhir-spring-boot/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-sql-migrate/pom.xml b/hapi-fhir-sql-migrate/pom.xml index 906f2e718cb..e9b04c20c91 100644 --- a/hapi-fhir-sql-migrate/pom.xml +++ b/hapi-fhir-sql-migrate/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage-batch2-jobs/pom.xml b/hapi-fhir-storage-batch2-jobs/pom.xml index 44dc0a7bfe4..a5b946b5c4b 100644 --- a/hapi-fhir-storage-batch2-jobs/pom.xml +++ b/hapi-fhir-storage-batch2-jobs/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml 4.0.0 diff --git a/hapi-fhir-storage-batch2/pom.xml b/hapi-fhir-storage-batch2/pom.xml index 19bf9ea47cc..91c0f02e120 100644 --- a/hapi-fhir-storage-batch2/pom.xml +++ b/hapi-fhir-storage-batch2/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/maintenance/JobMaintenanceServiceImpl.java b/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/maintenance/JobMaintenanceServiceImpl.java index 6e8d01526dd..c553f6d7b3e 100644 --- a/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/maintenance/JobMaintenanceServiceImpl.java +++ b/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/maintenance/JobMaintenanceServiceImpl.java @@ -29,6 +29,7 @@ import ca.uhn.fhir.batch2.model.JobInstance; import ca.uhn.fhir.i18n.Msg; import ca.uhn.fhir.jpa.batch.log.Logs; import ca.uhn.fhir.jpa.model.sched.HapiJob; +import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition; import com.google.common.annotations.VisibleForTesting; @@ -39,7 +40,6 @@ import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import javax.annotation.Nonnull; -import javax.annotation.PostConstruct; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -75,7 +75,7 @@ import java.util.concurrent.TimeUnit; * exactly one chunk, then the maintenance task will be triggered earlier than scheduled by the step executor. *

*/ -public class JobMaintenanceServiceImpl implements IJobMaintenanceService { +public class JobMaintenanceServiceImpl implements IJobMaintenanceService, IHasScheduledJobs { private static final Logger ourLog = Logs.getBatchTroubleshootingLog(); public static final int INSTANCES_PER_PASS = 100; @@ -111,8 +111,8 @@ public class JobMaintenanceServiceImpl implements IJobMaintenanceService { myJobExecutorSvc = theExecutor; } - @PostConstruct - public void start() { + @Override + public void scheduleJobs(ISchedulerService theSchedulerService) { mySchedulerService.scheduleClusteredJob(DateUtils.MILLIS_PER_MINUTE, buildJobDefinition()); } diff --git a/hapi-fhir-storage-cr/pom.xml b/hapi-fhir-storage-cr/pom.xml index 1f142a07ea8..439a7e9bfd4 100644 --- a/hapi-fhir-storage-cr/pom.xml +++ b/hapi-fhir-storage-cr/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CodeCacheResourceChangeListener.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CodeCacheResourceChangeListener.java index 2df727d4aff..fe3f428d687 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CodeCacheResourceChangeListener.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CodeCacheResourceChangeListener.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CqlExceptionHandlingInterceptor.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CqlExceptionHandlingInterceptor.java index 7e926d7a8a7..ece96645b47 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CqlExceptionHandlingInterceptor.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CqlExceptionHandlingInterceptor.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CqlForkJoinWorkerThreadFactory.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CqlForkJoinWorkerThreadFactory.java index 4e304415270..3b53ec45231 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CqlForkJoinWorkerThreadFactory.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CqlForkJoinWorkerThreadFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirDal.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirDal.java index 1d2f988eb7e..491eaa5bae5 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirDal.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirDal.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirRetrieveProvider.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirRetrieveProvider.java index b9347c913ba..c7ad9e20dde 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirRetrieveProvider.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirRetrieveProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiLibrarySourceProvider.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiLibrarySourceProvider.java index 6f60cd5e1cf..18a555f307d 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiLibrarySourceProvider.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiLibrarySourceProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiTerminologyProvider.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiTerminologyProvider.java index 5dd050fd9f8..367b332890b 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiTerminologyProvider.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiTerminologyProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IDaoRegistryUser.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IDaoRegistryUser.java index 3b6029278e7..be299555977 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IDaoRegistryUser.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IDaoRegistryUser.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IDataProviderFactory.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IDataProviderFactory.java index 2dc79687dba..a14be2759fb 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IDataProviderFactory.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IDataProviderFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IFhirDalFactory.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IFhirDalFactory.java index 8a034caaa45..463c92a6fa3 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IFhirDalFactory.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IFhirDalFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ILibraryManagerFactory.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ILibraryManagerFactory.java index e5673f3c931..e4cc2be5dc9 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ILibraryManagerFactory.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ILibraryManagerFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ILibrarySourceProviderFactory.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ILibrarySourceProviderFactory.java index 5cb5be05a94..35af240e5ed 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ILibrarySourceProviderFactory.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ILibrarySourceProviderFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ITerminologyProviderFactory.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ITerminologyProviderFactory.java index f929b4bbd9b..feeef28ade0 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ITerminologyProviderFactory.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ITerminologyProviderFactory.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/PreExpandedValidationSupport.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/PreExpandedValidationSupport.java index e2d745401c6..f9a3a2638c8 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/PreExpandedValidationSupport.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/PreExpandedValidationSupport.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/Searches.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/Searches.java index 66fb711a97c..d3bb0d4acc4 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/Searches.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/Searches.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/SupplementalDataConstants.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/SupplementalDataConstants.java index b9c2419a988..0472ddf68bb 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/SupplementalDataConstants.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/SupplementalDataConstants.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/TypedBundleProvider.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/TypedBundleProvider.java index 9992ecf93e2..05bf8e09ec4 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/TypedBundleProvider.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/TypedBundleProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/BaseClinicalReasoningConfig.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/BaseClinicalReasoningConfig.java index 2c2e0178839..0f61dcfe9be 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/BaseClinicalReasoningConfig.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/BaseClinicalReasoningConfig.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.config; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrDstu3Config.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrDstu3Config.java index 5984efaecb7..a7309da726e 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrDstu3Config.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrDstu3Config.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.config; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrProperties.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrProperties.java index bfd01642ce9..49ffc3f61c4 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrProperties.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrProperties.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.config; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrR4Config.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrR4Config.java index cb2571200b9..7fe66c9695d 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrR4Config.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrR4Config.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.config; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/PreExpandedValidationSupportLoader.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/PreExpandedValidationSupportLoader.java index 88120054259..33589c7afe9 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/PreExpandedValidationSupportLoader.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/PreExpandedValidationSupportLoader.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.config; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/ISupplementalDataSearchParamUser.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/ISupplementalDataSearchParamUser.java index 0b68858ee8c..f3647f17ecc 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/ISupplementalDataSearchParamUser.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/ISupplementalDataSearchParamUser.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.dstu3; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/measure/MeasureOperationsProvider.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/measure/MeasureOperationsProvider.java index c0f52d1adc0..5ae3ee459b7 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/measure/MeasureOperationsProvider.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/measure/MeasureOperationsProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.dstu3.measure; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/measure/MeasureService.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/measure/MeasureService.java index 84d73f44d88..090d3f90b5b 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/measure/MeasureService.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/measure/MeasureService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.dstu3.measure; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/ISupplementalDataSearchParamUser.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/ISupplementalDataSearchParamUser.java index a7ae87080c0..e2d5296da6e 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/ISupplementalDataSearchParamUser.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/ISupplementalDataSearchParamUser.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.r4; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/measure/MeasureOperationsProvider.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/measure/MeasureOperationsProvider.java index b36eea145f7..880cd6ff75d 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/measure/MeasureOperationsProvider.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/measure/MeasureOperationsProvider.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.r4.measure; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/measure/MeasureService.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/measure/MeasureService.java index 60a7aaac5fc..21e86424f02 100644 --- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/measure/MeasureService.java +++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/measure/MeasureService.java @@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.r4.measure; * #%L * HAPI FHIR - Clinical Reasoning * %% - * Copyright (C) 2014 - 2022 Smile CDR, Inc. + * Copyright (C) 2014 - 2023 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/hapi-fhir-storage-mdm/pom.xml b/hapi-fhir-storage-mdm/pom.xml index 8e6642bc185..4f4187c7be9 100644 --- a/hapi-fhir-storage-mdm/pom.xml +++ b/hapi-fhir-storage-mdm/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml 4.0.0 diff --git a/hapi-fhir-storage-test-utilities/pom.xml b/hapi-fhir-storage-test-utilities/pom.xml index d204ce5cd98..bfa98843d88 100644 --- a/hapi-fhir-storage-test-utilities/pom.xml +++ b/hapi-fhir-storage-test-utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml 4.0.0 diff --git a/hapi-fhir-storage/pom.xml b/hapi-fhir-storage/pom.xml index 7e3abc2be73..252f4a7a6b4 100644 --- a/hapi-fhir-storage/pom.xml +++ b/hapi-fhir-storage/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/binary/interceptor/BinaryStorageInterceptor.java b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/binary/interceptor/BinaryStorageInterceptor.java index 3231aaaba55..cfe460f941f 100644 --- a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/binary/interceptor/BinaryStorageInterceptor.java +++ b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/binary/interceptor/BinaryStorageInterceptor.java @@ -20,20 +20,20 @@ package ca.uhn.fhir.jpa.binary.interceptor; * #L% */ -import ca.uhn.fhir.i18n.Msg; import ca.uhn.fhir.context.BaseRuntimeChildDefinition; import ca.uhn.fhir.context.BaseRuntimeElementDefinition; import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.i18n.Msg; import ca.uhn.fhir.interceptor.api.Hook; import ca.uhn.fhir.interceptor.api.Interceptor; import ca.uhn.fhir.interceptor.api.Pointcut; -import ca.uhn.fhir.jpa.binary.api.StoredDetails; import ca.uhn.fhir.jpa.binary.api.IBinaryStorageSvc; import ca.uhn.fhir.jpa.binary.api.IBinaryTarget; +import ca.uhn.fhir.jpa.binary.api.StoredDetails; import ca.uhn.fhir.jpa.binary.provider.BinaryAccessProvider; import ca.uhn.fhir.jpa.model.util.JpaConstants; -import ca.uhn.fhir.rest.api.server.storage.TransactionDetails; import ca.uhn.fhir.rest.api.server.IPreResourceShowDetails; +import ca.uhn.fhir.rest.api.server.storage.TransactionDetails; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.util.HapiExtensions; import ca.uhn.fhir.util.IModelVisitor2; @@ -49,7 +49,6 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import javax.annotation.Nonnull; -import javax.annotation.PostConstruct; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; @@ -65,20 +64,28 @@ import static ca.uhn.fhir.util.HapiExtensions.EXT_EXTERNALIZED_BINARY_ID; import static org.apache.commons.lang3.StringUtils.isNotBlank; @Interceptor -public class BinaryStorageInterceptor { +public class BinaryStorageInterceptor> { private static final Logger ourLog = LoggerFactory.getLogger(BinaryStorageInterceptor.class); @Autowired private IBinaryStorageSvc myBinaryStorageSvc; - @Autowired - private FhirContext myCtx; + private final FhirContext myCtx; @Autowired private BinaryAccessProvider myBinaryAccessProvider; - private Class> myBinaryType; + private Class myBinaryType; private String myDeferredListKey; private long myAutoInflateBinariesMaximumBytes = 10 * FileUtils.ONE_MB; private boolean myAllowAutoInflateBinaries = true; + public BinaryStorageInterceptor(FhirContext theCtx) { + myCtx = theCtx; + BaseRuntimeElementDefinition base64Binary = myCtx.getElementDefinition("base64Binary"); + assert base64Binary != null; + myBinaryType = (Class) base64Binary.getImplementingClass(); + myDeferredListKey = getClass().getName() + "_" + hashCode() + "_DEFERRED_LIST"; + + } + /** * Any externalized binaries will be rehydrated if their size is below this thhreshold when * reading the resource back. Default is 10MB. @@ -95,15 +102,6 @@ public class BinaryStorageInterceptor { myAutoInflateBinariesMaximumBytes = theAutoInflateBinariesMaximumBytes; } - @SuppressWarnings("unchecked") - @PostConstruct - public void start() { - BaseRuntimeElementDefinition base64Binary = myCtx.getElementDefinition("base64Binary"); - assert base64Binary != null; - myBinaryType = (Class>) base64Binary.getImplementingClass(); - myDeferredListKey = getClass().getName() + "_" + hashCode() + "_DEFERRED_LIST"; - } - @Hook(Pointcut.STORAGE_PRESTORAGE_EXPUNGE_RESOURCE) public void expungeResource(AtomicInteger theCounter, IBaseResource theResource) { @@ -144,7 +142,7 @@ public class BinaryStorageInterceptor { private void blockIllegalExternalBinaryIds(IBaseResource thePreviousResource, IBaseResource theResource) { Set existingBinaryIds = new HashSet<>(); if (thePreviousResource != null) { - List> base64fields = myCtx.newTerser().getAllPopulatedChildElementsOfType(thePreviousResource, myBinaryType); + List base64fields = myCtx.newTerser().getAllPopulatedChildElementsOfType(thePreviousResource, myBinaryType); for (IPrimitiveType nextBase64 : base64fields) { if (nextBase64 instanceof IBaseHasExtensions) { ((IBaseHasExtensions) nextBase64) @@ -160,7 +158,7 @@ public class BinaryStorageInterceptor { } } - List> base64fields = myCtx.newTerser().getAllPopulatedChildElementsOfType(theResource, myBinaryType); + List base64fields = myCtx.newTerser().getAllPopulatedChildElementsOfType(theResource, myBinaryType); for (IPrimitiveType nextBase64 : base64fields) { if (nextBase64 instanceof IBaseHasExtensions) { Optional hasExternalizedBinaryReference = ((IBaseHasExtensions) nextBase64) diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml index a8d67a05cc5..7cbe4f46fda 100644 --- a/hapi-fhir-structures-dstu2.1/pom.xml +++ b/hapi-fhir-structures-dstu2.1/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml index e5a8669cc1e..760656526a7 100644 --- a/hapi-fhir-structures-dstu2/pom.xml +++ b/hapi-fhir-structures-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml index c6f75df874e..b1e2115d3f4 100644 --- a/hapi-fhir-structures-dstu3/pom.xml +++ b/hapi-fhir-structures-dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml index 4ec3bbac385..837b9d0d2ba 100644 --- a/hapi-fhir-structures-hl7org-dstu2/pom.xml +++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml index f96e8aee90e..a2676874e03 100644 --- a/hapi-fhir-structures-r4/pom.xml +++ b/hapi-fhir-structures-r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r4b/pom.xml b/hapi-fhir-structures-r4b/pom.xml index b37e5e53845..cffd50fffa2 100644 --- a/hapi-fhir-structures-r4b/pom.xml +++ b/hapi-fhir-structures-r4b/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml index 699880d4ed2..042d8c204ca 100644 --- a/hapi-fhir-structures-r5/pom.xml +++ b/hapi-fhir-structures-r5/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml index 1dc21cab7f2..e905e2602c6 100644 --- a/hapi-fhir-test-utilities/pom.xml +++ b/hapi-fhir-test-utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml index 5274b01a886..7c06f031ae1 100644 --- a/hapi-fhir-testpage-overlay/pom.xml +++ b/hapi-fhir-testpage-overlay/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml index 626983dae4b..963e8620883 100644 --- a/hapi-fhir-validation-resources-dstu2.1/pom.xml +++ b/hapi-fhir-validation-resources-dstu2.1/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu2/pom.xml b/hapi-fhir-validation-resources-dstu2/pom.xml index b3d17c552dc..d0df4124769 100644 --- a/hapi-fhir-validation-resources-dstu2/pom.xml +++ b/hapi-fhir-validation-resources-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu3/pom.xml b/hapi-fhir-validation-resources-dstu3/pom.xml index 972cb850002..66c09309dc2 100644 --- a/hapi-fhir-validation-resources-dstu3/pom.xml +++ b/hapi-fhir-validation-resources-dstu3/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r4/pom.xml b/hapi-fhir-validation-resources-r4/pom.xml index e9e900ac7b7..03e436b1d11 100644 --- a/hapi-fhir-validation-resources-r4/pom.xml +++ b/hapi-fhir-validation-resources-r4/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r5/pom.xml b/hapi-fhir-validation-resources-r5/pom.xml index cc6e92574a3..b6b92e45934 100644 --- a/hapi-fhir-validation-resources-r5/pom.xml +++ b/hapi-fhir-validation-resources-r5/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml index 8c30ef149bb..eda3b8db2f8 100644 --- a/hapi-fhir-validation/pom.xml +++ b/hapi-fhir-validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml index fdfc473da9d..33e10c91231 100644 --- a/hapi-tinder-plugin/pom.xml +++ b/hapi-tinder-plugin/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../pom.xml diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml index dbaf68b8624..00eebd17849 100644 --- a/hapi-tinder-test/pom.xml +++ b/hapi-tinder-test/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 3055f8d3f88..f6beb3a72fd 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir pom - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT HAPI-FHIR An open-source implementation of the FHIR specification in Java. https://hapifhir.io @@ -2117,7 +2117,7 @@ ca.uhn.hapi.fhir hapi-fhir-checkstyle - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT
diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml index ec3d4bab29f..feb735f57c7 100644 --- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml +++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../../pom.xml diff --git a/tests/hapi-fhir-base-test-mindeps-client/pom.xml b/tests/hapi-fhir-base-test-mindeps-client/pom.xml index cbb312034e0..8b2a3f22137 100644 --- a/tests/hapi-fhir-base-test-mindeps-client/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../../pom.xml diff --git a/tests/hapi-fhir-base-test-mindeps-server/pom.xml b/tests/hapi-fhir-base-test-mindeps-server/pom.xml index 67e1c5682c1..94faaa5885f 100644 --- a/tests/hapi-fhir-base-test-mindeps-server/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.3.7-SNAPSHOT + 6.3.8-SNAPSHOT ../../pom.xml