To simplify working with the JCR, the module adds the SessionFactory interface.
为了简化与JCR的工作,模块增加了SessionFactory接口。
We should create a SessionFactory object only once when the application starts.
我们应该仅仅在应用程序启动的时候创建SessionFactory对象。
Finally, we perform regular Hibernate operations using the SessionFactory instance retrieved.
最后,我们使用获取的SessionFactory实例执行常规的Hibernate操作。
We will make one more change to hibernate.cfg.xml that will make reusing SessionFactory easy.
我们将对hibernate.cfg.xml 文件做一些修改,使重新使用 SessionFactory更加得容易。
In the Spring framework, resources such as a JDBC DataSource or a Hibernate SessionFactory can be realized as beans in an application context.
在Spring框架中,像JDBCDataSource或HibernateSessionFactory这样的资源,在应用程序上下文中可以用bean实现。
SessionFactory hides the authentication details inside the implementation so that once configured, sessions with the same credentials can be easily retrieved.
SessionFactory隐藏了实现内部的认证细节,因此一旦配置完成,使用同一证书的会话可以很容易的被检索出来。
Other than the abstract property, the bean definition simply points out that I want an instance of GenericDaoHibernateImpl and that it needs a reference to a SessionFactory.
除了抽象特性之外,该bean定义只指出我想要GenericDaoHibernateImpl的实例以及该实例需要对 SessionFactory 的引用。
Thus far, I've created a builder class that properly configures a ShardedSessionFactory, which really is just an implementation of Hibernate's ubiquitous SessionFactory type.
到目前为止,我已经创建一个可以合理配置ShardedSessionFactory的生成器类,其实就是实现Hibernate无处不在的SessionFactory类型。
Thus far, I've created a builder class that properly configures a ShardedSessionFactory, which really is just an implementation of Hibernate's ubiquitous SessionFactory type.
到目前为止,我已经创建一个可以合理配置ShardedSessionFactory的生成器类,其实就是实现Hibernate无处不在的SessionFactory类型。
应用推荐