Uploaded image for project: 'SwitchYard'
  1. SwitchYard
  2. SWITCHYARD-2422

Use dataSource instead of dataSourceRef in the SQL binding

    Details

      Description

      dataSource was added as a replacement for dataSourceRef in Camel 2.12. This change caused that dataSourceRef doesn't work on a producer/reference. Thought the bug is in Camel, SwitchYard should rather use dataSource because dataSourceRef is planned to be removed in future.

      You can simply reproduce the problem in the camel-sql-binding quickstart. Just add <sql:dataSourceRef>${datasourceName}</sql:dataSourceRef> to the bindings on references.

      Then you will end up with:

      Caught exception of type org.apache.camel.ResolveEndpointFailedException with message: Failed to resolve endpoint: sql://INSERT%20INTO%20greetings%20(receiver,sender,id)%20VALUES%20(%23,%23,%23)?dataSourceRef=java%3Ajboss%2FmyDS due to: Failed to resolve endpoint: sql://INSERT%20INTO%20greetings%20(receiver,sender,id)%20VALUES%20(%23,%23,%23)?dataSourceRef=java%3Ajboss%2FmyDS due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{dataSourceRef=java:jboss/myDS}]
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  trohovsky Tomas Rohovsky
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: