Class HibernateUtil


  • public class HibernateUtil
    extends java.lang.Object
    This class contains a single static utility method which returns a Hibernate session: HibernateUtil.getSession().

    The configuration for the session is read from settings.xml in the elements nested under settings/wayback/hibernate.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.hibernate.Session getSession()
      Get a hibernate session for communicating with the object store for the wayback indexer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getSession

        public static org.hibernate.Session getSession()
        Get a hibernate session for communicating with the object store for the wayback indexer. This method has the side effect of creating and initialising a SessionFactory object if there is no current open SessionFactory.
        Returns:
        the above mentioned hibernate session.