October 2017
Intermediate to advanced
396 pages
10h 2m
English
The following open-sources technologies provide pooled data sources:
The following code configures DBCP's BasicDataSource.
The XML-based DBCP configuration is given as follows:
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="org.h2.Driver"/>
<property name="url" value="jdbc:h2:tcp://localhost/bankDB"/>
<property name="username" value="root"/>
<property name="password" value="root"/>
<property name="initialSize" value="5"/>
<property name="maxActive" value="10"/>
</bean>
The Java-based DBCP configuration is as follows:
@Bean public BasicDataSource dataSource() { BasicDataSource ...Read now
Unlock full access