Package net.sf.hibernate.engine

Examples of net.sf.hibernate.engine.SessionFactoryImplementor


   * @see Session#getSessionFactory
   * @see net.sf.hibernate.impl.SessionFactoryImpl
   * @see net.sf.hibernate.jca.JCASessionFactoryImpl
   */
  public static TransactionManager getJtaTransactionManager(SessionFactory sessionFactory, Session session) {
    SessionFactoryImplementor sessionFactoryImpl = null;
    if (sessionFactory instanceof SessionFactoryImplementor) {
      sessionFactoryImpl = ((SessionFactoryImplementor) sessionFactory);
    }
    else if (session != null) {
      SessionFactory internalFactory = session.getSessionFactory();
      if (internalFactory instanceof SessionFactoryImplementor) {
        sessionFactoryImpl = (SessionFactoryImplementor) internalFactory;
      }
    }
    return (sessionFactoryImpl != null ? sessionFactoryImpl.getTransactionManager() : null);
  }
View Full Code Here

TOP

Related Classes of net.sf.hibernate.engine.SessionFactoryImplementor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.