You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Christian Müller (Commented JIRA)" <ji...@apache.org> on 2011/12/30 00:21:31 UTC
[jira] [Commented] (CAMEL-4152) jdbc idempotent repository - table
creation
[ https://issues.apache.org/jira/browse/CAMEL-4152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13177453#comment-13177453 ]
Christian Müller commented on CAMEL-4152:
-----------------------------------------
It would be nice if somebody could have a look at r1225687.
With this patch our users have the possibility to define the table and column names of the JDBC message repository as well the data types without the need to subclass the existing implementation (of course, the JDBC driver must be able to convert the String/Timestamp values into the defined SQL types). It's done only by configuration.
The JdbcMessageIdRepository will also try to create the table, if it doesn't exist. In this case, it is logged on debug as (note: we use a different table name and a different SQL type for the createdAt column):
{noformat}
creating table for JdbcMessageIdRepository because it doesn't exists...
executing query 'CREATE TABLE CAMEL_IDEMPOTENT_REPOSITORY (processorName VARCHAR(255), messageId VARCHAR(100), createdAt DATETIME)'...
...
table created
{noformat}
otherwise we log:
{noformat}
table for JdbcMessageIdRepository already exists
{noformat}
Will update the WIKI documentation soon...
> jdbc idempotent repository - table creation
> -------------------------------------------
>
> Key: CAMEL-4152
> URL: https://issues.apache.org/jira/browse/CAMEL-4152
> Project: Camel
> Issue Type: Improvement
> Components: camel-sql
> Affects Versions: 2.7.1
> Environment: camels on any
> Reporter: Julian Cable
> Assignee: Christian Müller
> Labels: idempotent, jdbc
>
> It would be nice if the class caught the error if the table does not exist and tried to create it. If the create privilege is not available then a more informative exception can be raised to inform the user what needs creating.
> I also suggest the schema is changed so that the fields are lower case as different database engines handle case differently and use incompatible quoting for mixed case tables (Oracle, MySql and Postgres are all slightly different).
> Julian
--
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