Package com.atlassian.bamboo.persistence
Class HibernateRunner
java.lang.Object
com.atlassian.bamboo.persistence.HibernateRunner
This class provides a way for background thread to run database related operations without using SAL TransactionTemplate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
runWithHibernateSession
(Callable<T> delegate) Set hibernate session into ThreadLocal and run the Callable
-
Constructor Details
-
HibernateRunner
public HibernateRunner()
-
-
Method Details
-
runWithHibernateSession
Set hibernate session into ThreadLocal and run the Callable- Parameters:
delegate
- the callable object to be run- Returns:
- return value of the callable object
- Throws:
Exception
-