Hibernate Configuration Small Treasure

Source: Internet
Author: User

Here is a parameter set in the XML configuration file, which isused under: <session-factory> tags
<property name= "" > Value </property>

The property commonly used parameters are as follows:
Connection.driver_class Database Connection Driver
Connection.url connection URL for the database
Connection.username Login Name
Connection.password Login Password
Dialect the dialect of the specified database create Create-drop update ...
Hbm2ddl.auto the creation mode of a database table
Showsql whether to display database statements executed
Hibernate.c3p0.max_size Connection Pool Maximum number of connections
Hibernate.c3p0.min_size Connection Pool minimum number of connections
Hibernate.c3p0.timeout gets the time-out of the connection, if more than this time, throws an exception, in milliseconds
hibernate.c3p0.max_statements Specifies the maximum number of statement objects in the connection pool to cache
Hibernate.c3p0.idle_test_period Check the connection pool for idle connections every few seconds, in seconds
Hibernate.c3p0.acquire_increment when the connection in the connection pool is exhausted, c3p0 the number of new connections obtained
Hibernate.c3p0.validate Verify that the connection is available every time

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.