connection pool with spring
<!-- demo connection pool definition --> <bean id="demoConnectionProxy" class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="targetSource" ref="demoConnectionPool"/> </bean> <!-- demo pooling service that holds objects in a configurable Jakarta Commons Pool --> <bean id="demoConnectionPool" class="org.springframework.aop.target.CommonsPoolTargetSource"> <property name="maxSize" value="20"/> <property name="targetBeanName" value="demoConnection"/> </bean> <!-- Demo connection bean --> <bean id="demoConnection" class="com.demo.DemoConnection" singleton="false"> <property name="gateway" value="10.1.1.xxx"/> <property name="port" value="yyyy"/> </bean>