Class DummyJpaTransactionManager

java.lang.Object
google.registry.persistence.transaction.DummyJpaTransactionManager

public class DummyJpaTransactionManager extends Object
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.