[
https://issues.apache.org/jira/browse/CAMEL-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-4822.
--------------------------------
Resolution: Fixed
Fix Version/s: (was: 2.9.1)
2.9.0
Assignee: Claus Ibsen
Thanks for the patch.
I fixed CS, removed @author tag, and renamed the abstract class to use Jdbc
instead of JDBC.
> Enhance JdbcMessageIdRepository so that custom tables and SQL can be easily
> used
> --------------------------------------------------------------------------------
>
> Key: CAMEL-4822
> URL: https://issues.apache.org/jira/browse/CAMEL-4822
> Project: Camel
> Issue Type: Improvement
> Components: camel-sql
> Affects Versions: 2.8.3
> Reporter: Philip Glebow
> Assignee: Claus Ibsen
> Priority: Minor
> Labels: patch
> Fix For: 2.9.0
>
> Attachments: CAMEL-4822-patch.txt
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> The existing JdbcMessageIdRepository is tied to a particular table
> (CAMEL_MESSAGEPROCESSED) and includes an INSERT statement that is
> incompatible with MS SQL Server. The design of the class makes it difficult
> to change the table name and related SQL statements. In some environments,
> table names and structures are strictly controlled and it would be nice to be
> able to change these things easily. It would also be nice for this to work
> on a variety of databases, including MS SQL Server.
> I've submitted a patch that refactors the design of the class so that it can
> be easily extended. An abstract base class called
> AbstractJDBCIdempotentRepository has been introduced that takes care of the
> plumbing required to query, insert and delete. Classes that extend this
> abstract base class need only implement the query, insert, and delete
> operations. This makes it very easy to customize an idempotent repository
> for a particular environment.
> The existing JdbcMessageIdRepository has been changed to extend the
> AbstractJDBCIdempotentRepository and has retained the SQL statements present
> in the prior version. A patch is attached to this JIRA and the existing unit
> test passes after applying this patch.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira