dynamobi/adminws — Issue #20: [DWS-12] Factor out jdbc.properties and add defaults for localhost
Author: dynamobi-build
Created: 2011-12-30 01:06:51+00:00
State: open
Labels: Infrastructure

[reporter="ngoodman", created="Wed, 16 Jun 2010 12:49:45 -0700", resolved="Mon, 19 Jul 2010 16:43:40 -0700"]

Currently, database connection information is in two places:

jdbc.properties

security-beans.xml

Task:

Create a new datasource class (that we can swap in for org.springframework.jdbc.datasource.DriverManagerDataSource) that will use luciddb-jdbc.properties or defaults. End goal is that the connection information is in one spot.

Remove jdbc.properties

Add luciddb-jdbc-default.properties to OUR webapplication that contains the defaults (sa/sa/localhost/class)

Modify DBAccess.getConnection() to do the following

Check for resource on classpath (in another jar or Jetty's external classpath):

luciddb-jdbc.properties. If found, use this information (in both DBAccess.getConnection AND our spring datasource) when creating connections (getConnect just class/url but still use user/pass from Spring). If not found, use the values in luciddb-jdbc-default.properties