Package org.openbravo.dal.core
Class DalThreadHandler
- java.lang.Object
-
- org.openbravo.dal.core.ThreadHandler
-
- org.openbravo.dal.core.DalThreadHandler
-
public abstract class DalThreadHandler extends ThreadHandler
Encapsulates a thread so that when the thread returns the session/transaction is closed/committed/rolledback. It also ensures that the OBContext is removed from the thread. Note that cleaning up the thread is particularly important in webcontainer environments because webcontainers (tomcat) re-use thread instances for new requests (using a threadpool).- Author:
- mtaal
-
-
Constructor Summary
Constructors Constructor Description DalThreadHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doBefore()
void
doFinal(boolean errorOccured)
-
Methods inherited from class org.openbravo.dal.core.ThreadHandler
doAction, run
-
-
-
-
Method Detail
-
doBefore
public void doBefore()
- Specified by:
doBefore
in classThreadHandler
- See Also:
ThreadHandler.doBefore()
-
doFinal
public void doFinal(boolean errorOccured)
- Specified by:
doFinal
in classThreadHandler
- See Also:
ThreadHandler.doFinal(boolean)
-
-