Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.0
Once the user logs-in in to the application, then only it takes long time to load the page with data from database. Iam using an hibernate to populate the data from single table only. Other calls to database using hibernate after first call is faster. What can be done to load the hibernate configuration to perform better after login ?
Hibernate cnf. xml ->
<?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 name="java:comp/env/hibernate/SessionFactory">
<property name="connection.url">dbURL</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.username">userA</property>
<property name="connection.password"></property>
<property name="connection.autocommit">false</property>
<property name="connection.shutdown">true</property>
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
<property name="cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
<property name="hibernate.cglib.use_reflection_optimizer">false</property>
<mapping resource="ClassA.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Here is my ClassA.hbm.xml mapping file ->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping auto-import="true" package="packageA">
<class name="ClassA" table="tableA" lazy="false">
<generator class="native">
<param name="sequence">SEQA</param> </generator>
</id>
<property name="field1" column="field1"/>
<property name="field2" column="field2"/>
</class>
</hibernate-mapping>
Thanks.
Amit.