|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.extensions.cdi.jpa.impl.transaction.context.TransactionBeanStorage
@RequestScoped public class TransactionBeanStorage
This bean stores information about
@TransactionScoped
contextual instances, their CreationalContext
etc.
We use a RequestScoped bean because this way we don't need to take care about cleaning up any ThreadLocals ourselves. This also makes sure that we subsequently destroy any left over TransactionScoped beans (which should not happen, but who knows). We also don't need to do any fancy synchronization stuff since we are sure that we are always in the same Thread.
Constructor Summary | |
---|---|
TransactionBeanStorage()
|
Method Summary | |
---|---|
String |
activateTransactionScope(String transactionKey)
Activate the TransactionScope with the given qualifier. |
void |
endAllTransactionScopes()
This will destroy all stored transaction contexts. |
void |
endTransactionScope(String transactionKey)
End the TransactionScope with the given qualifier. |
Map<javax.enterprise.context.spi.Contextual,TransactionBeanEntry> |
getActiveTransactionContext()
|
void |
requestEnded()
At the end of the request we will destroy all beans still stored in the context. |
void |
startTransactionScope(String transactionKey)
Start the TransactionScope with the given qualifier |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransactionBeanStorage()
Method Detail |
---|
public void startTransactionScope(String transactionKey)
transactionKey
- public void endTransactionScope(String transactionKey)
transactionKey
- public String activateTransactionScope(String transactionKey)
startTransactionScope(String)
.
transactionKey
-
null
if non existspublic void endAllTransactionScopes()
public Map<javax.enterprise.context.spi.Contextual,TransactionBeanEntry> getActiveTransactionContext()
@PreDestroy public void requestEnded()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |