网络 二级缓存;对象;配置
We should create a SessionFactory object only once when the application starts.
我们应该仅仅在应用程序启动的时候创建SessionFactory对象。
To simplify working with the JCR, the module adds the SessionFactory interface.
为了简化与JCR的工作,模块增加了SessionFactory接口。
We will make one more change to hibernate.cfg.xml that will make reusing SessionFactory easy.
我们将对 hibernate.cfg.xml 文件做一些修改,使重新使用 SessionFactory 更加得容易。
Finally, we perform regular Hibernate operations using the SessionFactory instance retrieved.
最后,我们使用获取的SessionFactory实例执行常规的Hibernate操作。
The default implementation of SessionFactory is JcrSessionFactory which requires a repository to work against, and the credentials.
SessionFactory的缺省实现是JcrSessionFactory,它要求一个进行工作的仓库和证书。