Convenient support class for JPA-related tests. Offers the same contract as
AbstractTransactionalDataSourceSpringContextTests and equally good performance,
even when performing the instrumentation required by the JPA specification.
Exposes an EntityManagerFactory and a shared EntityManager.
Requires an EntityManagerFactory to be injected, plus the DataSource and
JpaTransactionManager through the superclass.
When using Xerces, make sure a post 2.0.2 version is available on the classpath
to avoid a critical
bug
that leads to StackOverflow. Maven users are likely to encounter this problem since
2.0.2 is used by default.
A workaround is to explicitly specify the Xerces version inside the Maven pom:
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.8.1</version>
</dependency>
author: Rod Johnson author: Rob Harrop since: 2.0 |