@Override protected void configurePersistence() {
    bindConstant().annotatedWith(Jpa.class).to(jpaUnit);

    bind(AmbariJpaPersistService.class).in(Singleton.class);
    bind(JpaPersistOptions.class).annotatedWith(Jpa.class).toInstance( JpaPersistOptions.builder().setAutoBeginWorkOnEntityManagerCreation(true).build());
    bind(PersistService.class).to(AmbariJpaPersistService.class);
    bind(UnitOfWork.class).to(AmbariJpaPersistService.class);
    bind(EntityManager.class).toProvider(AmbariJpaPersistService.class);
    bind(EntityManagerFactory.class).toProvider(JpaPersistService.EntityManagerFactoryProvider.class);

    transactionInterceptor = new AmbariJpaLocalTxnInterceptor();
    requestInjection(transactionInterceptor);

    MethodInterceptor sessionInterceptor = new AmbariLocalSessionInterceptor();
    requestInjection(sessionInterceptor);

    // Bind dynamic finders.
    for (Class<?> finder : dynamicFinders) {
      bindFinder(finder);
    }

    bindInterceptor(annotatedWith(RequiresSession.class), any(), sessionInterceptor);
    bindInterceptor(any(), annotatedWith(RequiresSession.class), sessionInterceptor);
  }
Copy of guice persist module for local modifications
ambari-server/src/main/java/com/google/inject/persist/jpa/AmbariJpaPersistModule.java