/ Published in: Java
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <!-- Use a Tomcat 5.5 JNDI datasource --> <property name="connection.datasource">java:comp/env/jdbc/Sampdb</property> <property name="show_sql">true</property> <property name="dialect">org.hibernate.dialect.MySQLDialect </property> <property name="current_session_context_class">thread</property> <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property> <mapping resource="tomcatJndi/Car.hbm.xml"/> <mapping resource="tomcatJndi/Driver.hbm.xml"/> </session-factory> </hibernate-configuration>