Hibernate sessionFactory相关xml设置
2013-06-19 20:08
169 查看
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
打开自动线程管理。
What does
The
Due to that setting, the context of a current unit of work is bound to the current Java thread that executes the application.
<property name="current_session_context_class">thread</property>
打开自动线程管理。
What does
sessionFactory.getCurrentSession()do? First, you can call it as many times and anywhere you like once you get hold of your
org.hibernate.SessionFactory.
The
getCurrentSession()method always returns the "current" unit of work. Remember that we switched the configuration option for this mechanism to "thread" in our
src/main/resources/hibernate.cfg.xml?
Due to that setting, the context of a current unit of work is bound to the current Java thread that executes the application.
相关文章推荐
- 关于XStream相关的常用方法;设置别名;忽略属性;设置xml字段属性
- IDEA中Tomcat相关——如无法访问localhost:8080欢迎页面,无法配置web.xml以及server.xml,设置download.xml下载目录无效等问题
- MyEclipse中解决对Spring配置文件XXX.XML不提示的相关设置
- Maven POM.xml 仓库设置相关
- android中的相关资源设置(XML)
- 如何设置xml中的product的读取值
- zend studio 9 字体,颜色,快捷键等相关设置
- NPOI 教程 - 3.2 打印相关设置
- 如何设置gen_server在退出时执行相关操作
- Ubuntu server 14.04设置图形化界面及相关配置
- web.xml中关于log4j的设置及范例说明
- XML相关标准
- mysql中自增auto_increment功能的相关设置及问题
- .net精简框架集(WinCE平台下),XML反序列化成功与否与时间相关
- 仿制新浪微博iOS客户端之二-项目基础搭建及相关设置
- php中对xml读取的相关函数的介绍一
- magento 相关xml功能的介绍
- 一个ios工程相关的配置小问题解决介绍,gdata xml解析相关
- android解决xml里设置高度跟代码里的设置高度不同
- 注册表修改相关设置