Topic
No replies
SystemAdmin
SystemAdmin
590 Posts
ACCEPTED ANSWER

Pinned topic DataSource and Connection pool with spring3 and Liberty

‏2012-12-05T07:35:11Z |
As migrating to Liberty profile, Application need to be use default Datasource and Connection pooling provided by liberty server.

As per my requirement our application will be provide all the data base properties like url, database name, password and other connection pool properties from application specific properties file and not to be hard coded into server.xml file.

Please let us know how to read properties file and create datasource and connection pooling using spring core and not Spring MVC.
Currently we are using Common DBCP but need to be use default Liberty connection pooling.
ex:
<bean id="dataSourceActual" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="${macys.database.driver}" />
<property name="url" value="${macys.database.url}" />
<property name="username" value="${macys.database.username}" />
<property name="password" value="${macys.database.password}" />
<property name="defaultTransactionIsolation" value="1" />
<property name="initialSize" value="${macys.database.pool.initialSize}" />
<property name="maxActive" value="${macys.database.pool.maxActive}" />
<property name="maxIdle" value="${macys.database.pool.maxIdle}" />
<property name="minIdle" value="${macys.database.pool.minIdle}" />
<property name="maxWait" value="${macys.database.pool.maxWait}" />
.................
</bean>
Technical:
Spring3.0.5
Liberty