日期:2014-05-16 浏览次数:20926 次
<?xml version='1.0' encoding='GBK'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<?xml version='1.0' encoding='GBK'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"> <!--Hibernate self-manager connection pool--> <hibernate-configuration> <session-factory> <property name="show_sql">true</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="connection.url">jdbc:mysql://localhost:3306/nihongo?useUnicode=true</property> <property name="connection.username">root</property> <property name="connection.password">kevin</property> <mapping resource="cat/Cat.hbm.xml"/> </session-factory> </hibernate-configuration>
<Context path="/quickstart" docBase="quickstart" debug="0" > <Resource name="jdbc/MySql5" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/nihongo?useUnicode=true" username="root" password="kevin" maxActive="100" maxIdle="10" maxWait="-1"/></Context>
<?xml version='1.0' encoding='GBK'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"> <!--Hibernate use JNDI to access container's connection pool--> <hibernate-configuration> <session-factory> <property name="connection.datasource">java:comp/env/jdbc/MySql5</property> <property name="show_sql">true</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <mapping resource="cat/Cat.hbm.xml"/> </session-factory> </hibernate-configuration>
<!--Hibernate use container's connection pool--> <resource-ref> <description>DB Connection</description> <res-ref-name>jdbc/MySql5</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-au