Class DummyJpaTransactionManager
java.lang.Object
google.registry.persistence.transaction.DummyJpaTransactionManager
A dummy implementation for
JpaTransactionManager
which throws exception when any of its
method is invoked.
This is used to initialize the TransactionManagerFactory.tm()
when running unit tests,
because obviously we cannot connect to the actual Cloud SQL backend in a unit test.
If a unit test needs to access the Cloud SQL database, it must add
JpaTransactionManagerExtension
as a JUnit extension in the test class.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic JpaTransactionManager
create()
Constructs a dummyJpaTransactionManager
instance.
-
Constructor Details
-
DummyJpaTransactionManager
public DummyJpaTransactionManager()
-
-
Method Details
-
create
Constructs a dummyJpaTransactionManager
instance.
-