休眠默认连接池 [英] hibernate default connection pooling

查看:78
本文介绍了休眠默认连接池的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hibernate默认使用连接池吗?如果是这样,* connection.pool_size *的默认值是什么?
是否与* hibernate.connection.release_mode *冲突?是不是连接池的所有想法都不关闭连接?

解决方案

默认的hibernate连接池(不应该是用于生产中)的默认限制为1,因为它仅用于简单测试。然而,这可以通过hibernate.properties文件来配置,所以值得检查一下,看看它是否在你的项目中定义。



有问题的属性是:



hibernate.connection.pool_size



有关这方面的信息主要包含在此链接中:

http://docs.jboss.org/ hibernate / orm / 3.3 / reference / en / html / session-configuration.html



尽管这并不直接指定默认的连接池大小,但它在hibernate连接池的主题中,您可能需要的大部分信息都是您想要的。


Does Hibernate use connection pool by default? If so what is the default value for *connection.pool_size*? Doesn't it conflicts with *hibernate.connection.release_mode*? Isn't the all idea of connection pooling is not closing connections?

解决方案

The default hibernate connection pool (which shouldn't be used in production) has a default limit of 1, since it is meant to just be used for simple testing. However this is configurable through the hibernate.properties file, so it's worth checking to see if it's defined there in your project.

The property in question is:

hibernate.connection.pool_size

Information on this is largely contained in this link:

http://docs.jboss.org/hibernate/orm/3.3/reference/en/html/session-configuration.html

While this doesn't directly specify the default connection pool size, it does have most of the information you could want on the subject of connection pooling in hibernate.

这篇关于休眠默认连接池的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆