Have some option configure to get Data sources.

1. Data sources are defined by JDBC driver:

<bean id=”dataSource” class=”DriverManagerDataSource”>
<property name=”driverClassName” value=”jdbcDriver” />
<property name=”url” value=”url” />
<property name=”username” value=”user” />
<property name=”password” value=”pass” />
</bean>

Use DriverManagerDataSource class.

Returns a new connection every time that a connection is requested.

2. Data sources are gotten from pool connections:

– Data sources are looked up by JDNI.

Advertisements