diff --git a/src/test/resources/org/springframework/samples/petclinic/AbstractClinicTests-context.xml b/src/test/resources/org/springframework/samples/petclinic/AbstractClinicTests-context.xml index af4c40bfc77312c6d5a2906dbc3c3295ab8bb438..a0bc4bd00d4d7ffeb0b82efa36e59f8576f825fc 100644 --- a/src/test/resources/org/springframework/samples/petclinic/AbstractClinicTests-context.xml +++ b/src/test/resources/org/springframework/samples/petclinic/AbstractClinicTests-context.xml @@ -16,16 +16,9 @@ <tx:annotation-driven/> - <!-- DataSource configuration for Apache Commons DBCP. --> - <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" - p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}" - p:username="${jdbc.username}" p:password="${jdbc.password}"/> - - <!-- Database initializer. If any of the script fails, the initialization stops. --> - <!-- As an alternative, for embedded databases see <jdbc:embedded-database/>. --> - <jdbc:initialize-database data-source="dataSource"> + <jdbc:embedded-database id="dataSource"> <jdbc:script location="${jdbc.initLocation}"/> <jdbc:script location="${jdbc.dataLocation}"/> - </jdbc:initialize-database> - + </jdbc:embedded-database> + </beans> diff --git a/src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-jpaCommon.xml b/src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-jpaCommon.xml index 33a2eb1a8d92b0603c939aeccb785ecdd4e72995..f5fbe563f5e31c93815e338622364ea7b353e4c3 100644 --- a/src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-jpaCommon.xml +++ b/src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-jpaCommon.xml @@ -14,17 +14,10 @@ <tx:annotation-driven /> - <!-- DataSource configuration for Apache Commons DBCP. --> - <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" - p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}" - p:username="${jdbc.username}" p:password="${jdbc.password}"/> - - <!-- Database initializer. If any of the script fails, the initialization stops. --> - <!-- As an alternative, for embedded databases see <jdbc:embedded-database/>. --> - <jdbc:initialize-database data-source="dataSource"> + <jdbc:embedded-database id="dataSource"> <jdbc:script location="${jdbc.initLocation}"/> <jdbc:script location="${jdbc.dataLocation}"/> - </jdbc:initialize-database> + </jdbc:embedded-database> <!-- Note: the specific "jpaAdapter" bean sits in adapter context file --> <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"