Code example for SessionFactory

Methods: getCurrentSession

0
        sessionFactoryHolder.set(null);
    } 
 
 
    protected boolean isWithinExistingTransaction(InternalCompassSession session) throws CompassException {
        return ((SessionImplementor) sessionFactory.getCurrentSession()).isTransactionInProgress();
    } 
 
    protected InternalCompassTransaction doBeginTransaction(InternalCompassSession session) throws CompassException {
        HibernateSyncTransaction tr = new HibernateSyncTransaction(sessionFactory, commitBeforeCompletion, this);
        tr.begin(session);
        return tr;
    } 
 
    protected InternalCompassTransaction doContinueTransaction(InternalCompassSession session)
            throws CompassException { 
        HibernateSyncTransaction tr = new HibernateSyncTransaction(sessionFactory, commitBeforeCompletion, this);
        tr.join(session);
        return tr;
    } 
Experience pair programming with AI  Get Codota for Java