Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
861 views
in Technique[技术] by (71.8m points)

hibernate default connection pooling

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...