mirror of
https://github.com/google/nomulus.git
synced 2025-07-20 01:35:59 +02:00
Use direct ofyTm reference when clearing cache in tool (#1287)
We shouldn't reference tm() at all before initializing the JPA transaction manager, since tm() looks at the database migration schedule when figuring out which transaction manager to use.
This commit is contained in:
parent
7cd2a9c565
commit
84cbd8f763
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@
|
|||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.ofyTm;
|
||||
import static google.registry.tools.Injector.injectReflectively;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
|
@ -244,7 +244,7 @@ final class RegistryCli implements AutoCloseable, CommandRunner {
|
|||
ObjectifyService.initOfy();
|
||||
// Make sure we start the command with a clean cache, so that any previous command won't
|
||||
// interfere with this one.
|
||||
tm().clearSessionCache();
|
||||
ofyTm().clearSessionCache();
|
||||
|
||||
// Enable Cloud SQL for command that needs remote API as they will very likely use
|
||||
// Cloud SQL after the database migration. Note that the DB password is stored in Datastore
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue