sessionFactory本来就是hibernate的,spring的localsessionFactory不过是org.hibernate.SessionFactory接口的一个实现罢了.当然hibernate中也有很多该接口的实现,如org.hibernate.impl.SessionFactoryImpl等,都是可以产生session的.public interface SessionFactory extends Referenceable, Serializable { /**
 * Open a <tt>Session</tt> on the given connection.
 * <p>
 * Note that the second-level cache will be disabled if you
 * supply a JDBC connection. Hibernate will not be able to track
 * any statements you might have executed in the same transaction.
 * Consider implementing your own <tt>ConnectionProvider</tt>.
 *
 * @param connection a connection provided by the application.
 * @return Session
 */
public org.hibernate.classic.Session openSession(Connection connection); /**
 * Create database connection and open a <tt>Session</tt> on it, specifying an
 * interceptor.
 *
 * @param interceptor a session-scoped interceptor
 * @return Session
 * @throws HibernateException
 */
public org.hibernate.classic.Session openSession(Interceptor interceptor) throws HibernateException; /**
 * Open a <tt>Session</tt> on the given connection, specifying an interceptor.
 * <p>
 * Note that the second-level cache will be disabled if you
 * supply a JDBC connection. Hibernate will not be able to track
 * any statements you might have executed in the same transaction.
 * Consider implementing your own <tt>ConnectionProvider</tt>.
 *
 * @param connection a connection provided by the application.
 * @param interceptor a session-scoped interceptor
 * @return Session
 */
public org.hibernate.classic.Session openSession(Connection connection, Interceptor interceptor);
    . 
    .
    .
    .
    .
    .
}