Home
last modified time | relevance | path

Searched refs:entityManager (Results 1 – 2 of 2) sorted by relevance

/external/guice/extensions/persist/src/com/google/inject/persist/jpa/
DJpaPersistService.java39 private final ThreadLocal<EntityManager> entityManager = new ThreadLocal<>(); field in JpaPersistService
57 EntityManager em = entityManager.get(); in get()
68 return entityManager.get() != null; in isWorking()
74 null == entityManager.get(), in begin()
78 entityManager.set(emFactory.createEntityManager()); in begin()
83 EntityManager em = entityManager.get(); in end()
93 entityManager.remove(); in end()
/external/guice/extensions/persist/test/com/google/inject/persist/jpa/
DJpaPersistServiceTest.java40 private final EntityManager entityManager = mock(EntityManager.class); field in JpaPersistServiceTest
46 when(factory.createEntityManager()).thenReturn(entityManager); in setUp()
54 doThrow(SimulatedException.class).when(entityManager).close(); in test_givenErrorOnEntityManagerClose_whenEndIsCalled_thenEntityManagerIsRemoved()