Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

What are the various advanced configuration techniques in Hibernate?
Advanced configuration techniques in Hibernate:
  * Using XML-based configuration : 
  <hibernate-configuration>
	<session-factory>
        <!-- properties -->
        <property name= "dialect">org.hibernate.dialect.MySQL5Dialect</property>
        <property name="connection.datasource">java:comp/env/jdbc/yourDatabase</property>
        <property name="show_sql">true</property>
        <property name="use_outer_join">true</property>
        <property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
        <property name="current_session_context_class">thread</property>


<!-- mappings -->
 	<mapping class="com.MyProject.model.User" />
</session-factory>
</hibernate-configuration>
  
  * JNDI-bound SessionFactory
  * Logging
  * Java Management Extensions (JMX)