Hibernate config connection pool size

前端 未结 1 1775
情书的邮戳
情书的邮戳 2020-12-14 19:34

why set 10 in hibernate config file for connection pooling ? size = 1 is built in size.why need to increase size ?



        
相关标签:
1条回答
  • 2020-12-14 19:36

    From the Hibernate API Docs.

    Hibernate's own connection pooling algorithm is, however, quite rudimentary. It is intended to help you get started and is not intended for use in a production system, or even for performance testing. You should use a third party pool for best performance and stability. Just replace the hibernate.connection.pool_size property with connection pool specific settings. This will turn off Hibernate's internal pool. For example, you might like to use c3p0.

    connection.pool_size indicates the maximum number of pooled connections. So it is better to keep it at a logical count. It depends on your application and DB how much it can handle. 10 is a reasonable count that will typically used as it is sufficient for most cases.

    0 讨论(0)
提交回复
热议问题