Configuring a DataSource in SimpleJNDI

When storing data in a database, you are going to need to setup a javax.sql.DataSource object in the simple-jndi configuration. Here's a brief example: Place a file named ScrapingDS.properties next to your default.properties and containing the following content:

# your JDBC driver, must be in classpath
driver=oracle.jdbc.driver.OracleDriver

# username for db
user=sa

# password for that username
password=lollipop

# jdbc url to connect with
url=jdbc:oracle:thin:@yourdb.example.com:port:sid

# let simple-jndi know to make this an Object
type=javax.sql.DataSource

# optional, turn on pooling. 
# Commons DBCP, Pool and Collections must be in the classpath
#pool=true
Then in your default.properties, you can simply configure it with:
....
Xxx.store=Jdbc
Xxx.DS=ScrapingDS
....