Common Hibernate Options (hibernate.cfg.xml)

May 20th, 2008

Below is a pretty standard configuration which appears to work quickly using an oracle database with a datasource defined in an oracle application server.  I will be refining this over the next week as I performance tune the “massive app”.

<property name=”hibernate.dialect”>org.hibernate.dialect.OracleDialect</property>
<property name=”connection.datasource”>jdbc/xxx</property>
<property name=”current_session_context_class”>thread</property>
<property name=”hibernate.transaction.factory_class”>org.hibernate.transaction.JDBCTransactionFactory</property>
<property name=”cache.provider_class”>org.hibernate.cache.NoCacheProvider</property>
<property name=”show_sql”>true</property>
<property name=”hbm2ddl.auto”>none</property>
<property name=”connection.pool_size”>5</property>
<property name=”hibernate.max_fetch_depth”>0</property>
<property name=”hibernate.use_reflection_optimizer”>true</property>
<property name=”use_outer_join”>false</property>

Leave a Reply

You must be logged in to post a comment.