|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.spicefactory.pimento.context.RequestContext
public class RequestContext
The context for a single request. Primarily used internally by PhaseListener implementations
that manage transactions and the persistence context. Also provides access to the active
IoContext instance for classes that manage conversion from and to entity snapshots.
RequestContext instances will be associated with the thread of the request and can be retrieved with
the static getCurrentInstance method.
| Constructor Summary | |
|---|---|
RequestContext()
|
|
| Method Summary | |
|---|---|
static RequestContext |
getCurrentInstance()
Returns the RequestContext for the current thread. |
IoContext |
getIoContext()
Returns the IoContext for this request. |
Object |
getTransactionContext()
Returns the transaction context for this request. |
boolean |
isNewEntityManager()
Checks whether a new EntityManager was created by Pimento for this request. |
void |
setIoContext(IoContext ioContext)
Sets the IoContext for this request. |
void |
setNewEntityManager(boolean newEntityManager)
Specifies whether a new EntityManager was created by Pimento for this request. |
void |
setTransactionContext(Object tx)
Sets the transaction context for this request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RequestContext()
| Method Detail |
|---|
public static RequestContext getCurrentInstance()
public Object getTransactionContext()
public void setTransactionContext(Object tx)
tx - the transaction context for this requestpublic boolean isNewEntityManager()
public void setNewEntityManager(boolean newEntityManager)
newEntityManager - true if a new EntityManager was created by Pimento for this requestpublic IoContext getIoContext()
public void setIoContext(IoContext ioContext)
ioContext - the IoContext for this request
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||