摘要: Managing Hibernate resources: As we said, you will keep a single instance of a SessionFactory throughout the life of your application. The preferred way to do this is to wire a DataSource to the Loca... 阅读全文
posted @ 2007-11-09 22:35 IT Person 阅读(269) 评论(0) 推荐(0)
摘要: There is also a subinterface you can implement that is useful for retrieving multiple objects through a query. Suppose we want a method that retrieves all of our Person objects. To do this we would im... 阅读全文
posted @ 2007-11-09 22:33 IT Person 阅读(263) 评论(0) 推荐(0)
摘要: The complement to PreparedStatementCreator is PreparedStatementSetter. receive a PreparedStatement and are responsible for setting any of the parameters. Since many updates consist of creating a Prepa... 阅读全文
posted @ 2007-11-09 22:31 IT Person 阅读(260) 评论(0) 推荐(0)
摘要: the service objects are accessing the DAOs through interfaces.This has a couple of advantages. First, it makes your service objects easily testable since they are not coupled to a specific data access... 阅读全文
posted @ 2007-11-09 22:28 IT Person 阅读(251) 评论(0) 推荐(0)