public class TransactionBeanStorage extends Object
This class 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.
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUsedEntityManagers() |
static void |
close() |
int |
decrementRefCounter()
Decrement the reference counter and return the layer.
|
void |
endTransactionScope()
End the TransactionScope with the given qualifier.
|
Map<javax.enterprise.context.spi.Contextual,TransactionBeanEntry> |
getActiveTransactionContext() |
static TransactionBeanStorage |
getInstance() |
Set<EntityManagerEntry> |
getUsedEntityManagerEntries() |
int |
incrementRefCounter()
Increment the ref counter and return the old value.
|
boolean |
isEmpty() |
static boolean |
isOpen() |
void |
startTransactionScope()
Start a new TransactionScope
|
void |
storeUsedEntityManager(EntityManagerEntry entityManagerEntry) |
public static TransactionBeanStorage getInstance()
public static void close()
public static boolean isOpen()
public int incrementRefCounter()
isEmpty().public int decrementRefCounter()
public boolean isEmpty()
true if we are the outermost interceptor over all qualifiers
and the TransactionBeanStorage is yet empty.public void startTransactionScope()
public void endTransactionScope()
public void storeUsedEntityManager(EntityManagerEntry entityManagerEntry)
public Set<EntityManagerEntry> getUsedEntityManagerEntries()
public void cleanUsedEntityManagers()
public Map<javax.enterprise.context.spi.Contextual,TransactionBeanEntry> getActiveTransactionContext()
Copyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.