Reputation: 957
I have a Spring based application, deployed on the Tomcat server. What I need is to limit the maximum number of simultaneous connections to a database. This is data source section from my applicationContext.xml:
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="org.postgresql.Driver" />
<property name="url" value="..." />
<property name="username" value="..." />
<property name="password" value="..." />
</bean>
I would like to do it on the application level, not with server configuration.
Upvotes: 1
Views: 1601