Hibernate version: 3.2.0.ga (via spring)
Name and version of the database you are using:MySQL 5.0
Hello,
I am trying to determine why the hibernate application i am using keeps getting heap space errors. I have used a mmeory profiling tool to tack down what is happening and the org.hibernate.persister.entity.SingleTableEntityPersister class seems to be the one that is taking up all the memory - seems the heap will just keep growing. I have disabled first and second level cache - and have tried using a Stateless Session for my objects but to no avail.
Code:
<property name="dialect">org.hibernate.dialect.MySQL5Dialect</property>
<property name="hibernate.c3p0.max_size">80</property>
<property name="hibernate.c3p0.min_size">20</property>
<property name="hibernate.c3p0.initial_pool_size">8</property>
<property name="hibernate.c3p0.min_pool_size">5</property>
<property name="hibernate.c3p0.max_pool_size">15</property>
<property name="hibernate.c3p0.timeout">1800</property>
<property name="hibernate.c3p0.max_statements">15</property>
<property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<property name="hibernate.cache.use_query_cache">false</property>
<!-- KEPT GETTING ERRORS BECAUSE SPRING CLOSES SESSION
<property name="hibernate.transaction.auto_close_session">true</property>
END ADD -->
<property name="hibernate.cache.use_second_level_cache">false</property> <!-- fails when enabled. bwilly Aug06 -->
<property name="current_session_context_class">thread</property>
CODE SAMPLE:
Code:
org.hibernate.impl.StatelessSessionImpl sess = (org.hibernate.impl.StatelessSessionImpl)this.getSessionFactory().openStatelessSession();
Criteria c = sess.createCriteria(ProjectImpl.class);
blah, blah....
Code:
Transaction tr = sess.beginTransaction();
List list = sess.list((CriteriaImpl)c);
tr.commit();
//this.getHibernateTemplate().getSessionFactory().evictQueries();
sess.close();
return list;
If i am disabling first and second level caches AND using a stateles session how is possible the application is retqainging these values in memory?