1. Spring DataSource
2. DBCP DataSource
3. C3P0 DataSource
4. JNDI DataSource
1. Spring DataSource
2. DBCP DataSource
3. C3P0 DataSource
4. JNDI DataSource
2. DBCP DataSource
3. C3P0 DataSource
4. JNDI DataSource
1. Spring DataSource
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://127.0.0.1:3306/txazo" />
<property name="username" value="root" />
<property name="password" value="root" />
</bean>
2. DBCP DataSource
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://127.0.0.1:3306/txazo" />
<property name="username" value="root" />
<property name="password" value="root" />
</bean>
3. C3P0 DataSource
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="driverClass" value="com.mysql.jdbc.Driver" />
<property name="jdbcUrl" value="jdbc:mysql://127.0.0.1:3306/txazo" />
<property name="user" value="root" />
<property name="password" value="root" />
</bean>
4. JNDI DataSource
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:comp/env/jdbc/txazo" />
</bean>