• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate Transactions  RSS feed

Ravikanth Reddy Bapathi
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am using hibernate in my web application.

I have made sure that when ever a session is open , it is also closed.

my config looks as below

<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost/newschema</property>
<property name="hibernate.connection.username">admin</property>
<property name="hibernate.connection.password">password</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="hibernate.connection.timeout">1800</property>
<property name="show_sql">true</property>
<property name="hibernate.jdbc.fetch_size">10</property>

<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="hibernate.cache.user_query_cache">false</property>
Mapping files
<mapping resource="off.hbm.xml" />
<mapping resource="users.hbm.xml" />

but when ever i make some inserts into database using hibernate

it is leaving connections open at the database end.

I am monitoring sessions in mysql.

most of the connections are in sleep mode.

when i stop the tomcat server they are getting deleted.

is it possible that these sessions/ connections get deleted when ever i close the session ?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!