[ 
https://issues.apache.org/jira/browse/CAMEL-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Philip Glebow updated CAMEL-4822:
---------------------------------

    Attachment: CAMEL-4822-patch.txt

Patch that implements the enhancement.
                
> 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
>            Priority: Minor
>              Labels: patch
>             Fix For: 2.9.1
>
>         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

        

Reply via email to