To simplify working with the JCR, the module adds the SessionFactory interface.
为了简化与JCR的工作,模块增加了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,它要求一个进行工作的仓库和证书。
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实现。
All I have to do now is wire up my domain objects, which in this case, because they'll rely on Hibernate, require a SessionFactory type to work.
现在我需要做的就是连接我的域对象,在本示例中,因为它们依赖于Hibernate,需要一个SessionFactory类型进行工作。
With the data source and session factory set up, the next step is to wire in the DAO, in this case CustomerDAOImpl, to use the SessionFactory.
数据源和会话工厂设置好之后,下一步就是在DAO 中连接,在CustomerDAOImpl 示例中,要使用 SessionFactory。
SessionFactory hides the authentication details inside the implementation so that once configured, sessions with the same credentials can be easily retrieved.
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类型。
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 的引用。
As you can see in Listing 9, I've first created a factory-like bean in Spring; that is, my RaceDAOImpl type has a property named SessionFactory, which is of type SessionFactory.
如您在清单9中所看到的,我首先在Spring中创建了一个类似工厂的bean;也就是说,我的racedaoimpl类型有一个名为SessionFactory的属性,是SessionFactory类型。
As you can see in Listing 9, I've first created a factory-like bean in Spring; that is, my RaceDAOImpl type has a property named SessionFactory, which is of type SessionFactory.
如您在清单9中所看到的,我首先在Spring中创建了一个类似工厂的bean;也就是说,我的racedaoimpl类型有一个名为SessionFactory的属性,是SessionFactory类型。
应用推荐