File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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%)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: thread count keeps rising not released
 
Similar Threads
Data deleted while getting data from table using hibernate.
runtime exception getting when i execute hibernate program
org.hibernate.exception.GenericJDBCException: Cannot open connection
using multiple datasources in hibernate app
What hibernate.hbm2ddl.auto value to use?