Skip to content

Commit

Permalink
Todo files
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Harmel-Law committed Aug 11, 2014
1 parent c8bc8d4 commit 24b0d2b
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
29 changes: 29 additions & 0 deletions ASA-Snippets.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/** temporary */
DriverManagerDataSource ds = buildDataSourceFromConnectionDetailsMap(jdbcConnectionDetailMap);
JDBCConfigurationSource source = buildJdbcConfigSourceFromConnectionDetailsMap(ds, jdbcConnectionDetailMap);
FixedDelayPollingScheduler scheduler = new FixedDelayPollingScheduler(initialDelayMillis, delayMillis, ignoreDeletesFromSource);
DynamicConfiguration dynamicConfiguration = new DynamicConfiguration(source, scheduler);
/** temporary */

// DynamicConfiguration dynamicConfiguration = buildDynamicConfigFromConnectionDetailsMap(jdbcConnectionDetailMap, initialDelayMillis, delayMillis, ignoreDeletesFromSource);





// TODO: the additional parameters are passed into this in the map anyway
private DynamicConfiguration buildDynamicConfigFromConnectionDetailsMap(Map<String, String> jdbcConnectionDetailMap, int initialDelayMillis, int delayMillis, boolean ignoreDeletesFromSource) {
DriverManagerDataSource ds = buildDataSourceFromConnectionDetailsMap(jdbcConnectionDetailMap);
JDBCConfigurationSource source = buildJdbcConfigSourceFromConnectionDetailsMap(ds, jdbcConnectionDetailMap);
FixedDelayPollingScheduler scheduler = new FixedDelayPollingScheduler(initialDelayMillis, delayMillis, ignoreDeletesFromSource);
DynamicConfiguration dc = new DynamicConfiguration(source, scheduler);
return dc;
}

private JDBCConfigurationSource buildJdbcConfigSourceFromConnectionDetailsMap(DriverManagerDataSource ds, Map<String, String> jdbcConnectionDetailMap) {
JDBCConfigurationSource source = new JDBCConfigurationSource(ds,
jdbcConnectionDetailMap.get(JdbcContants.SQL_QUERY),
jdbcConnectionDetailMap.get(JdbcContants.KEY_COLUMN_NAME),
jdbcConnectionDetailMap.get(JdbcContants.VALUE_COLUMN_NAME));
return source;
}
16 changes: 16 additions & 0 deletions todo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
**********TODO*******

Get the spring property placeholder to support JDBC too - do it with duplicates - then move the common bits into the shared file
make the JDBC URl use URL semantics ("?abc=123&wed=576" etc)
Make all the "getStringProperty()" calls take a valid default rather than a repeat of the key
add extensive javadoc to the placeholderconfigurers
port the junit tests to spock
derby shutdown exceptions

*********TOO HARD************
make everything live in location/locations (jdbc et al)
do a single entry with "jdbc:..." - we need to be able to add/register a new Spring Resource implementation to do this


**********DONE****************
clean out the system.properties and evenMoreSystem.properties from src/main/resources

0 comments on commit 24b0d2b

Please sign in to comment.