Class TransactionLeakContextHandleFactory
java.lang.Object
org.jboss.as.ee.concurrent.handle.TransactionLeakContextHandleFactory
- All Implemented Interfaces:
ContextHandleFactory
A context handle factory which is responsible for preventing transaction leaks.
- Author:
- Eduardo Martins, Richard Opalka
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThe factory priority is used to define the order of handles when chained.getName()Retrieves the factory's name.Reads a handle from the specified input stream.saveContext(jakarta.enterprise.concurrent.ContextService contextService, Map<String, String> contextObjectProperties) Called by ManagedExecutorService in the same thread that submits a task to save the execution context of the submitting thread.voidwriteSetupContextHandle(SetupContextHandle contextHandle, ObjectOutputStream out) Writes the handle to the specified output stream.
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
TransactionLeakContextHandleFactory
public TransactionLeakContextHandleFactory()
-
-
Method Details
-
saveContext
public SetupContextHandle saveContext(jakarta.enterprise.concurrent.ContextService contextService, Map<String, String> contextObjectProperties) Description copied from interface:ContextHandleFactoryCalled by ManagedExecutorService in the same thread that submits a task to save the execution context of the submitting thread.- Specified by:
saveContextin interfaceContextHandleFactory- Parameters:
contextService- ContextService containing information on what context should be savedcontextObjectProperties- Additional properties specified for for a context object when the ContextService object was created.- Returns:
- A ContextHandle that will be passed to the setup method in the thread executing the task
-
getName
Description copied from interface:ContextHandleFactoryRetrieves the factory's name.- Specified by:
getNamein interfaceContextHandleFactory- Returns:
-
getChainPriority
public int getChainPriority()Description copied from interface:ContextHandleFactoryThe factory priority is used to define the order of handles when chained. The handle with the lowest priority is the first in the chain.- Specified by:
getChainPriorityin interfaceContextHandleFactory- Returns:
-
writeSetupContextHandle
public void writeSetupContextHandle(SetupContextHandle contextHandle, ObjectOutputStream out) throws IOException Description copied from interface:ContextHandleFactoryWrites the handle to the specified output stream.- Specified by:
writeSetupContextHandlein interfaceContextHandleFactory- Throws:
IOException
-
readSetupContextHandle
public SetupContextHandle readSetupContextHandle(ObjectInputStream in) throws IOException, ClassNotFoundException Description copied from interface:ContextHandleFactoryReads a handle from the specified input stream.- Specified by:
readSetupContextHandlein interfaceContextHandleFactory- Returns:
- Throws:
IOExceptionClassNotFoundException
-