|
||||||||||
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
@Typed 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.
Method Summary | |
---|---|
static TransactionBeanStorage |
activateNewStorage()
Creates a new storage for the current thread |
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()
|
String |
getActiveTransactionKey()
|
static TransactionBeanStorage |
getStorage()
|
static void |
resetStorage()
Removes the current storage |
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 |
Method Detail |
---|
public static TransactionBeanStorage getStorage()
public static TransactionBeanStorage activateNewStorage()
public static void resetStorage()
public void startTransactionScope(String transactionKey)
transactionKey
- public void endTransactionScope(String transactionKey)
transactionKey
- public String activateTransactionScope(String transactionKey)
startTransactionScope(String)
.
transactionKey
-
null
if non existspublic String getActiveTransactionKey()
public void endAllTransactionScopes()
public Map<javax.enterprise.context.spi.Contextual,TransactionBeanEntry> getActiveTransactionContext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |