传智播客Hibernate视频教程学习笔记47

来源:互联网 发布:js input disabled 编辑:程序博客网 时间:2024/06/06 02:05

串讲Hibernate配置文件中的配置项

 

数据源配置

 ## JNDI Datasource

#hibernate.connection.datasource jdbc/test
#hibernate.connection.username db2
#hibernate.connection.password db2

 

Hibernate连接池连接数

hibernate.connection.pool_size 1

 

配置c3p0数据源

#hibernate.c3p0.max_size 2

#hibernate.c3p0.min_size 2
#hibernate.c3p0.timeout 5000
#hibernate.c3p0.max_statements 100
#hibernate.c3p0.idle_test_period 3000
#hibernate.c3p0.acquire_increment 2
#hibernate.c3p0.validate false

 

选择JTA或者JDBC

#hibernate.transaction.factory_class org.hibernate.transaction.JTATransactionFactory
#hibernate.transaction.factory_class org.hibernate.transaction.JDBCTransactionFactory

 

删除时候id回滚

#hibernate.use_identifer_rollback true

 

jdbc自动提交

#hibernate.connection.autocommit true

 

JDBC最大抓取量

#hibernate.jdbc.fetch_size 25

 

二进制数据流处理

hibernate.jdbc.use_streams_for_binary true

 

 

原创粉丝点击