仅供参考
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
          "-//Hibernate/Hibernate Configuration DTD 2.0//EN"
          "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>    <session-factory>        
        <property name="show_sql">true</property>                
  
        <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/gsms</property>
<property name="hibernate.connection.username">shiwt</property>
<property name="hibernate.connection.password"></property>
<property name="hibernate.dialect">net.sf.hibernate.dialect.MySQLDialect</property>

        
        <!--  Apache DBCP Connection Pool -->
        <!-- -->
        <property name="hibernate.dbcp.maxActive">100</property>
        <property name="hibernate.dbcp.whenExhaustedAction">1</property>
<property name="hibernate.dbcp.maxWait">120000</property>
<property name="hibernate.dbcp.maxIdle">10</property> <property name="hibernate.dbcp.ps.maxActive">10</property>
<property name="hibernate.dbcp.ps.whenExhaustedAction">1</property>        
<property name="hibernate.dbcp.ps.maxActive">120000</property>
<property name="hibernate.dbcp.ps.maxIdle">10</property>
     
      <!-- Others -->
      <property name="hibernate.jdbc.fetch_size">25</property>
      <property name="hibernate.jdbc.batch_size">5</property>
      <property name="hibernate.cache.provider_class">net.sf.hibernate.cache.EhCacheProvider</property>
     
     
<mapping resource="com/groupsms/po/Corp.hbm.xml"/>   

<!--
<mapping resource="sweater/hbnt/po/cat.hbm.xml"/>
<mapping resource="sweater/hbnt/po/dog.hbm.xml"/>

-->
    </session-factory></hibernate-configuration>