camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Cable (JIRA)" <>
Subject [jira] [Commented] (CAMEL-4151) documentation for jdbc idempotent repository - use with spring DSL
Date Mon, 27 Jun 2011 17:44:47 GMT


Julian Cable commented on CAMEL-4151:

I checked (a while since I used postgres, although it remains my favourite, especially for
geospatial work).

As long as you always omit quotes on fields and database names all is well. So no change needed.
However, when I see the statement:

  processorName VARCHAR(255),
  messageId VARCHAR(100),
  createdAt TIMESTAMP

I expect to get a table called MESSAGEPROCESSED whereas in postgres I get camel_messageprocessed.
I expect fields to be called processorName, messageId and createdAt whereas I actually get
processorname, messageid and createdat. So I want to change the create to:

  "processorName" VARCHAR(255),
  "messageId" VARCHAR(100),
  "createdAt" TIMESTAMP

But then the queries will fail. So its OK, we just need to do it as your documentation says,
I just find it confusing to have camel case on identifiers when the code relies on the case
being not significant. I guess that's my problem, not yours. :)



> documentation for jdbc idempotent repository - use with spring DSL
> ------------------------------------------------------------------
>                 Key: CAMEL-4151
>                 URL:
>             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:


View raw message