Repository navigation
Conversation
There was a problem hiding this comment.
We need to document/WARN that using a shared JdbcTemplate should be used with care because it's fetchSize property will be set to 1.
There was a problem hiding this comment.
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':spring-integration-jdbc:testCompile'.
> Could not find group:com.oracle, module:ojdbc6, version:11.2.0.3.
Required by:
org.springframework.integration:spring-integration-jdbc:2.2.0.BUILD-SNAPSHOT
There was a problem hiding this comment.
Adding this worked...
maven { url 'https://code.lds.org/nexus/content/groups/main-repo' }
...but it's probably not Kosher
|
Now I'm getting... Only seems to happen when running from gradle... |
|
@garyrussell Should build now. Also, HSQL is now the default DB for testing. It looks like databases need to support Multiversion Concurrency Control (MVCC) when hitting the message store with multiple threads. Derby does not and does not show good performance. I will make the other changes later tonight. |
* Refactor Test Cases * Code Review Changes
|
Just pushed a new commit 268ebd0 which includes:
|
There was a problem hiding this comment.
As Gary said before we should document this jdbcTemplate limitation.
By the way there are another solution: JdbcOperations#execute(StatementCallback<T> action). And further we may use logic of applyStatementSettings manualy. In this case jdbcTemplate will free for shared usage as before. Similar solution is in org.springframework.batch.item.database.JdbcCursorItemReader
WDYT?
Of course, it may be changed in the 3.0, as you said in the JavaDocs, Gunnar
There was a problem hiding this comment.
I refactored this area a bit. I will set the fetch-size and max-rows property (to 1), only if the data-source is passed into the class and a fresh JDBC-template is instantiated. Otherwise I added documentation mentioning that this property is important when using Oracle for persistence and users should pass in a corresponding JdbcTemplate instance. However, I am not changing their passed in JdbcTemplate instance.
However, a warning-level message is now logged if the fetchSize is >1 (in afterPropertiesSet).
There was a problem hiding this comment.
The Timestamp type strips out any milliseconds and reduces the precision to seconds. If multiple messages arre inserted within the same second, they will be returned from the queue in an unordered fashion. Would it make sense to instead use milliseconds since epoch, e.g., a long value, for sorting purposes here?
There was a problem hiding this comment.
Good point. Fractional Time is actually supported in MySQL 5.6.4:
but since we aren't doing any time calculations, I agree and we should store the time in ms as a long value. For 3.0 we may consider using sequential ids.
|
I wonder if we should provide a SimpleQueryProvider that takes the two abstract queries as constructor arguments. That way, someone could simply wire up a with the appropriate queries for his DB rather than forcing him to implement a concrete class ?? |
|
Just these few minor comments; plus removing the "dead" tests to a different branch for now; and then I think we are good to go. |
For reference: https://jira.springsource.org/browse/INT-2674