- UID
- 303903
- 在线时间
- 小时
- 注册时间
- 2007-12-28
- 最后登录
- 1970-1-1
- 主题
- 帖子
- 性别
- 保密
|
What is a SessionFactory? Is it a thread-safe object? A. SessionFactory is Hibernate's concept of a single datastore and is threadsafe so that many threads can access it concurrently and request for sessions and immutable cache of compiled mappings for a single database. A SessionFactory is usually only built once at startup. SessionFactory should be wrapped in some kind of singleton so that it can be easily accessed in an application code. |
|