The problem is that everytime I undeploy my webapp the connection with the MSSQL database is not closed and when I deploy the app again a new connection is created everytime. So the connections just stack up!!
While the app is running it behaves correctly and does not create addidional connections with the db.
I'm running Spring 1.1 in a Tomcat 5.0.25 and connecting to a MS SQL Server
I use ClassPathXmlApplicationContext to initate my db-class.
Here is my context-hibernate.xml:
any ideas?Code:<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="hinDAO" class="is.ogv.mnp.db.HinHibernateDAO"> <property name="sessionFactory"> <ref bean="hinSessionFactory"/> </property> </bean> <!--********************************************************************************************--> <bean id="hinDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName"> <value>net.sourceforge.jtds.jdbc.Driver</value> </property> <property name="url"> <value>jdbc:jtds:sqlserver://dev0:1433/mnp</value> </property> <property name="username"> <value>mnp</value> </property> <property name="password"> <value></value> </property> </bean> <!--********************************************************************************************--> <bean id="hinSessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean"> <property name="mappingResources"> <list> <value>HinObj.hbm.xml</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">net.sf.hibernate.dialect.SQLServerDialect</prop> <prop key="hibernate.show_sql">true</prop> </props> </property> <property name="dataSource"> <ref bean="hinDataSource"/> </property> </bean> </beans>
thanks


Reply With Quote
