Subject | FB connection pool in Spring/Hibernate |
---|---|
Author | Eugene Prokopiev |
Post date | 2004-11-22T08:46:40Z |
Hi,
Pooled connections to database are not closing after stopping spring
application.
My app-servlet.xml:
...
<bean id="dataSource" class="org.firebirdsql.pool.FBWrappingDataSource"
destroy-method="close">
<property name="database"><value>192.168.1.1:db</value></property>
<property name="userName"><value>sysdba</value></property>
<property name="password"><value>system</value></property>
<property name="maxPoolSize"><value>1</value></property>
<property name="minPoolSize"><value>1</value></property>
<property name="maxStatements"><value>10</value></property>
<property name="type"><value>TYPE4</value></property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
<property name="mappingDirectoryLocations">
<list>
<value>WEB-INF/classes/datamodel</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop
key="hibernate.dialect">net.sf.hibernate.dialect.FirebirdDialect</prop>
</props>
</property>
<property name="dataSource"> <ref bean="dataSource"/></property>
</bean>
...
Pooled connections to database are closing propertly if I use Hibernate
built-in connection pool:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
<property name="mappingDirectoryLocations">
<list>
<value>WEB-INF/classes/datamodel</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop
key="hibernate.dialect">net.sf.hibernate.dialect.FirebirdDialect</prop>
<prop
key="hibernate.connection.driver_class">org.firebirdsql.jdbc.FBDriver</prop>
<prop
key="hibernate.connection.url">jdbc:firebirdsql:192.168.1.1:db</prop>
<prop key="hibernate.connection.username">sysdba</prop>
<prop key="hibernate.connection.password">system</prop>
</props>
</property>
</bean>
How can I close pooled connections with Firebird connction pool?
--
Thanks,
Eugene Prokopiev
Pooled connections to database are not closing after stopping spring
application.
My app-servlet.xml:
...
<bean id="dataSource" class="org.firebirdsql.pool.FBWrappingDataSource"
destroy-method="close">
<property name="database"><value>192.168.1.1:db</value></property>
<property name="userName"><value>sysdba</value></property>
<property name="password"><value>system</value></property>
<property name="maxPoolSize"><value>1</value></property>
<property name="minPoolSize"><value>1</value></property>
<property name="maxStatements"><value>10</value></property>
<property name="type"><value>TYPE4</value></property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
<property name="mappingDirectoryLocations">
<list>
<value>WEB-INF/classes/datamodel</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop
key="hibernate.dialect">net.sf.hibernate.dialect.FirebirdDialect</prop>
</props>
</property>
<property name="dataSource"> <ref bean="dataSource"/></property>
</bean>
...
Pooled connections to database are closing propertly if I use Hibernate
built-in connection pool:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
<property name="mappingDirectoryLocations">
<list>
<value>WEB-INF/classes/datamodel</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop
key="hibernate.dialect">net.sf.hibernate.dialect.FirebirdDialect</prop>
<prop
key="hibernate.connection.driver_class">org.firebirdsql.jdbc.FBDriver</prop>
<prop
key="hibernate.connection.url">jdbc:firebirdsql:192.168.1.1:db</prop>
<prop key="hibernate.connection.username">sysdba</prop>
<prop key="hibernate.connection.password">system</prop>
</props>
</property>
</bean>
How can I close pooled connections with Firebird connction pool?
--
Thanks,
Eugene Prokopiev