Hi I'm getting alot of open connection counts, heres my code
<bean id="mySessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="annotatedClasses"> <list> <value>com.*****</value> <value> com.*****</value> <value> com.*****</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect"> org.hibernate.dialect.Oracle9Dialect</prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.jdbc.use_get_generated_keys">true</prop> </props> </property> </bean>
Query query = this.sessionFactory.getCurrentSession().createQuery) query.executeUpdate(); Why is Db connection is not getting closed. I believe getCurrentSession() auto closes connection after it executes, correct?
|