|
Configuration
Listing 1. Specify JDBC properties—as well as the mapping file—in the configuration file (hibernate.cfg.xml) instead of the properties file. <?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/
hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">
oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">
jdbc:oracle:thin:@<host>:1521:<database></property>
<property name="hibernate.dialect">
org.hibernate.dialect.OracleDialect</property>
<property name="hibernate.connection.username">
oe</property>
<property name="hibernate.connection.password">
aarbor</property>
<mapping file="Catalog.hbm.xml"/>
</session-factory>
</hibernate-configuration>
|