How to configure the DataSource tag in the Spring-Server.xml ? I have been trying to configure it, but actually i didn't find any useful reference about that : i was writing it this how :
<data-source class="org.apache.james.util.dbcp.JdbcDataSource" name="JamesDS">
<driver>oracle.jdbc.driver.OracleDriver</driver>
<dburl>jdbc:oracle:thin:@localhost:1522:test</dburl>
<user>James</user>
<password>123456</password>
</data-source>
You should configure
dataSource
as a bean, each line you wrote inside should be defined as aproperty
. An example:As you can see from the example, you can use different drivers - depends on the DB you're connecting to.
Another example:
IMPORTANT:
from Spring docs about
DriverManagerDataSource
:I recommend on reading the following good introduction to JDBC