Hibernate4 configuration file Hibernate.cfg.xml configuration detailed

Source: Internet
Author: User

1 <?XML version= "1.0" encoding= "UTF-8"?>2 <!DOCTYPE hibernate-configuration Public3 "-//hibernate/hibernate Configuration DTD 3.0//en"4 "Http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">5 <hibernate-configuration>6 7 <session-factory>8     < Propertyname= "Connection.url">Jdbc:oracle:thin:@127.0.0.1:1521:orcl</ Property>9     < Propertyname= "Connection.username">Username</ Property>Ten     < Propertyname= "Connection.password">Password</ Property> One     <!--database JDBC Driver class name - A     < Propertyname= "Connection.driver_class">Oracle.jdbc.driver.OracleDriver</ Property> -     <!--Database dialect - -     < Propertyname= "dialect">Org.hibernate.dialect.Oracle10gDialect</ Property> the     <!--DDL Statement Auto-Build table - -     < Propertyname= "Hbm2ddl.auto">None</ Property> -     < Propertyname= "Show_sql">True</ Property> -     < Propertyname= "Format_sql">True</ Property> +      -     <!--Connection Pool Configuration - +     < Propertyname= "Hibernate.connection.provider_class"> A Org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider at     </ Property> -     <!--the minimum number of JDBC connections in the connection pool. Hibernate defaults to 1 - -     < Propertyname= "Hibernate.c3p0.min_size">5</ Property> -     <!--the maximum number of JDBC connections in the connection pool. Hibernate defaults to - -     < Propertyname= "Hibernate.c3p0.max_size">20</ Property> -     <!--When an idle connection (in seconds) is removed from the connection pool. Hibernate defaults to 0 and never expires - in     < Propertyname= "Hibernate.c3p0.timeout">300</ Property> -     <!--the number of pre-compiled statements that are cached. Used to improve performance. Hibernate defaults to 0 and cache is not available - to     < Propertyname= "Hibernate.c3p0.max_statements">100</ Property> +     <!--the idle time (in seconds) before a connection is automatically validated. Hibernate defaults to 0 - -     < Propertyname= "Hibernate.c3p0.idle_test_period">3000</ Property> the      *     <!--Registering an ORM mapping file - $     <Mappingclass= "com ..." />Panax Notoginseng      - </session-factory> the </hibernate-configuration>

Hibernate4 configuration file Hibernate.cfg.xml configuration detailed

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.