Make jpaTm for nomulus tool use local credential (#515)

* Make jpaTm for nomulus tool use local credential

* Remove unused methods in RegistryToolEnvironment

* Fix order of annotations

* Remove unused method in PersistenceComponent

* Move the creation of credential to the module

* Move creadential creation to AuthModule

* Add a TODO
This commit is contained in:
Shicong Huang 2020-03-17 20:16:42 -04:00 committed by GitHub
parent e9610636e4
commit d01f1f7604
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 86 additions and 38 deletions

View file

@ -133,12 +133,12 @@ abstract class JpaTransactionManagerRule extends ExternalResource {
extraEntityClasses);
JpaTransactionManagerImpl txnManager = new JpaTransactionManagerImpl(emf, clock);
cachedTm = TransactionManagerFactory.jpaTm();
TransactionManagerFactory.setJpaTmForTesting(txnManager);
TransactionManagerFactory.setJpaTm(txnManager);
}
@Override
public void after() {
TransactionManagerFactory.setJpaTmForTesting(cachedTm);
TransactionManagerFactory.setJpaTm(cachedTm);
if (emf != null) {
emf.close();
emf = null;