public class JPAEntityManagerContext
extends java.lang.ThreadLocal<java.util.Deque<javax.persistence.EntityManager>>
Constructor and Description |
---|
JPAEntityManagerContext() |
Modifier and Type | Method and Description |
---|---|
javax.persistence.EntityManager |
em()
Get the default EntityManager for this thread.
|
java.util.Deque<javax.persistence.EntityManager> |
emStack(boolean threadLocalFallback)
Get the EntityManager stack.
|
java.util.Deque<javax.persistence.EntityManager> |
initialValue() |
void |
pop(boolean threadLocalFallback) |
void |
push(javax.persistence.EntityManager em,
boolean threadLocalFallback) |
void |
pushOrPopEm(javax.persistence.EntityManager em,
boolean threadLocalFallback)
Deprecated.
use push or pop methods
|
public java.util.Deque<javax.persistence.EntityManager> initialValue()
initialValue
in class java.lang.ThreadLocal<java.util.Deque<javax.persistence.EntityManager>>
public javax.persistence.EntityManager em()
java.lang.RuntimeException
- if no EntityManager is bound to the current Http.Context or the current Thread.public java.util.Deque<javax.persistence.EntityManager> emStack(boolean threadLocalFallback)
public void push(javax.persistence.EntityManager em, boolean threadLocalFallback)
public void pop(boolean threadLocalFallback)
@Deprecated public void pushOrPopEm(javax.persistence.EntityManager em, boolean threadLocalFallback)