diff --git a/hapi-fhir-jpaserver-uhnfhirtest/.classpath b/hapi-fhir-jpaserver-uhnfhirtest/.classpath index c998deb489c..d3c5af89fef 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/.classpath +++ b/hapi-fhir-jpaserver-uhnfhirtest/.classpath @@ -6,7 +6,6 @@ - diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml index a06ba038432..968641f543c 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml +++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml @@ -9,6 +9,7 @@ hapi-fhir-jpaserver-uhnfhirtest + war HAPI FHIR - fhirtest.uhn.ca Deployable WAR @@ -215,5 +216,4 @@ hapi-fhir-jpaserver - war diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/TestRestfulServer.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/TestRestfulServer.java index deba44afdd1..bf4786fb6af 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/TestRestfulServer.java +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/TestRestfulServer.java @@ -55,15 +55,21 @@ public class TestRestfulServer extends RestfulServer { myAppCtx = ContextLoaderListener.getCurrentWebApplicationContext(); List beans; + JpaSystemProvider systemProvider; + IFhirSystemDao systemDao; switch (fhirVersionParam.trim().toUpperCase()) { case "DSTU": case "DSTU1": setFhirContext(FhirContext.forDstu1()); beans = myAppCtx.getBean("myResourceProvidersDstu1", List.class); + systemProvider = myAppCtx.getBean("mySystemProviderDstu1", JpaSystemProvider.class); + systemDao = myAppCtx.getBean("mySystemDaoDstu1", IFhirSystemDao.class); break; case "DEV": setFhirContext(FhirContext.forDev()); beans = myAppCtx.getBean("myResourceProvidersDev", List.class); + systemProvider = myAppCtx.getBean("mySystemProviderDev", JpaSystemProvider.class); + systemDao = myAppCtx.getBean("mySystemDaoDev", IFhirSystemDao.class); break; default: throw new ServletException("Unknown FHIR version specified in init-param[FhirVersion]: " + fhirVersionParam); @@ -76,10 +82,7 @@ public class TestRestfulServer extends RestfulServer { ourLog.info(" * Have resource provider for: {}", nextResourceProvider.getResourceType().getSimpleName()); } setResourceProviders(beans); - - IFhirSystemDao systemDao = myAppCtx.getBean(IFhirSystemDao.class); - JpaSystemProvider sp = new JpaSystemProvider(systemDao); - setPlainProviders(sp); + setPlainProviders(systemProvider); String implDesc = getInitParameter("ImplementationDescription"); diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/webapp/WEB-INF/hapi-fhir-server-config.xml b/hapi-fhir-jpaserver-uhnfhirtest/src/main/webapp/WEB-INF/hapi-fhir-server-config.xml index 83288cd6cd4..3922d51ebb8 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/webapp/WEB-INF/hapi-fhir-server-config.xml +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/webapp/WEB-INF/hapi-fhir-server-config.xml @@ -16,9 +16,6 @@ - - -