my dog learned polymorphism*
The moose likes Object Relational Mapping and the fly likes thread count keeps rising not released Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "thread count keeps rising not released" Watch "thread count keeps rising not released" New topic
Author

thread count keeps rising not released

sameer sood
Ranch Hand

Joined: Dec 05, 2007
Posts: 30
Hi
I am working with hibernate 3.2 and mysql 5
The problem is that when i end sessions in hibernate the thread related to it are not released, the task manager in windows shows a rising thread count and as my server has max of 154 threads limit (which is a MYSQl bug).
The limit can be changed but my question is that when i do session.close(0
why are not the threads released.

this is my cfg

<?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>
<property name="connection.url">
jdbc:mysql://localhost:3306/db_claim_tool
</property>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="connection.username">root</property>
<property name="connection.password">root</property>
<!-- Set AutoCommit to true -->
<property name="connection.autocommit">true</property>
<!-- SQL Dialect to use. Dialects are database specific -->
<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<!-- <property name="hibernate.show_sql">true</property> -->
<!-- Mapping files -->
<mapping
resource="com/ibm/claimtool/hibernate/ClaimHours.hbm.xml" />
<mapping resource="com/ibm/claimtool/hibernate/User.hbm.xml" />
<mapping
resource="com/ibm/claimtool/hibernate/ApplicationHours.hbm.xml" />
</session-factory>
</hibernate-configuration>

I am a new bee so please be patient


Sameer Sood
SCJP 1.5 (93%), SCWCD 1.5 (95%)
 
jQuery in Action, 2nd edition
 
subject: thread count keeps rising not released
 
Similar Threads
Data deleted while getting data from table using hibernate.
org.hibernate.exception.GenericJDBCException: Cannot open connection
What hibernate.hbm2ddl.auto value to use?
using multiple datasources in hibernate app
runtime exception getting when i execute hibernate program