Class HibernateRunner


  • @ExperimentalApi
    @Internal
    public class HibernateRunner
    extends Object
    This class provides a way for background thread to run database related operations without using SAL TransactionTemplate
    • Constructor Detail

      • HibernateRunner

        public HibernateRunner()
    • Method Detail

      • runWithHibernateSession

        public static <T> T runWithHibernateSession​(Callable<T> delegate)
                                             throws Exception
        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