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

Julian Cable updated CAMEL-4151:
--------------------------------

         Fix Version/s:     (was: 2.8.0)
           Description: 
 I couldn't find any reference to using this with spring DSL. I came up with 
this which seems to work:

        <bean id="myRepo" 
class="org.apache.camel.processor.idempotent.jdbc.JdbcMessageIdRepository">
                <constructor-arg index="0" ref="myJDBC"/>
                <constructor-arg index="1" value="foobar"/>
        </bean>

        <bean id="myJDBC" 
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
                <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
                <property name="url" value="${myJDBC.uri}" />
                <property name="username" value="${myJDBC.username}" />
                <property name="password" value="${myJDBC.password}" />
        </bean>

I think it would be better if the class had a default constructor and looked 
for properties.

Julian

  was:
When running several camels with an idempotent repository (based on
jdbc to mysql) I haven't found any documentation for the table-definition or 
for changing parameters (like table-name).

Getting through the sources, I tried out following definition on mysql that 
works for me:

CREATE TABLE IF NOT EXISTS `camel_messageprocessed` (
 `messageId` varchar(255) NOT NULL,
 `processorName` varchar(255) NOT NULL,
 PRIMARY KEY (`messageId`)
)

Please check this back.
 

           Environment: camels on any  (was: camels on win2k3, mysql(5.5.8) on 
win2k3)
    Remaining Estimate: 1h
     Original Estimate: 1h

> documentation for jdbc idempotent repository - use with spring DSL
> ------------------------------------------------------------------
>
>                 Key: CAMEL-4151
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4151
>             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: docuentation, idempotent, jdbc
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
>  I couldn't find any reference to using this with spring DSL. I came up with 
> this which seems to work:
>       <bean id="myRepo" 
> class="org.apache.camel.processor.idempotent.jdbc.JdbcMessageIdRepository">
>               <constructor-arg index="0" ref="myJDBC"/>
>               <constructor-arg index="1" value="foobar"/>
>       </bean>
>       <bean id="myJDBC" 
> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>               <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
>               <property name="url" value="${myJDBC.uri}" />
>               <property name="username" value="${myJDBC.username}" />
>               <property name="password" value="${myJDBC.password}" />
>       </bean>
> I think it would be better if the class had a default constructor and looked 
> for properties.
> Julian

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to