Camel
  1. Camel
  2. CAMEL-4725

camel-sql - Add support for Callable statements

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.8.3
    • Fix Version/s: Future
    • Component/s: camel-sql
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      See Nabble for details.

        Issue Links

          Activity

          Hide
          Christian Müller added a comment -

          We need hsqldb 2.2.0+ to test callable statements

          Show
          Christian Müller added a comment - We need hsqldb 2.2.0+ to test callable statements
          Hide
          James Carman added a comment -

          You could also switch to H2. I have used that to do SPROC testing.

          Show
          James Carman added a comment - You could also switch to H2. I have used that to do SPROC testing.
          Hide
          Claus Ibsen added a comment -

          This would be cool.

          Show
          Claus Ibsen added a comment - This would be cool.
          Hide
          Claus Ibsen added a comment -

          Christian do you work on this?
          If not maybe someone from the community want to help work on this?

          Using stored procedures with IN / OUT and cursor types would be great. So far I think its only camel-mybatis that supports stored procedures "natively" with Camel.

          Show
          Claus Ibsen added a comment - Christian do you work on this? If not maybe someone from the community want to help work on this? Using stored procedures with IN / OUT and cursor types would be great. So far I think its only camel-mybatis that supports stored procedures "natively" with Camel.
          Hide
          Christian Müller added a comment -

          I unassigned the ticket because I cannot work on it at present. Feel free to grab the ticket if you (not only Claus ) want to work on it.

          Show
          Christian Müller added a comment - I unassigned the ticket because I cannot work on it at present. Feel free to grab the ticket if you (not only Claus ) want to work on it.
          Hide
          Diogenes Rettori added a comment -

          Can someone bring this back to life?

          Show
          Diogenes Rettori added a comment - Can someone bring this back to life?
          Hide
          Arno Noordover added a comment - - edited

          Does anybody have an idea how to implement this?
          When I compare it with the donkey-esb you need multiple parts:

          1. the object containing the data to be used in calling the stored procedure;
          2. a template call with bind-variables;
          3. mapping between bind-variables and the object which should contain some kind of EL.

          What part can be skipped?
          How can we map between object and variable in stored-proc?
          Is it readable maintainable when you need to call a complex stored-proc and need to build a complex route using the camel facilities?

          Show
          Arno Noordover added a comment - - edited Does anybody have an idea how to implement this? When I compare it with the donkey-esb you need multiple parts: the object containing the data to be used in calling the stored procedure; a template call with bind-variables; mapping between bind-variables and the object which should contain some kind of EL. What part can be skipped? How can we map between object and variable in stored-proc? Is it readable maintainable when you need to call a complex stored-proc and need to build a complex route using the camel facilities?
          Hide
          Arno Noordover added a comment -

          Would it be a good idea to create a wrapper around a spring jdbc class which can be used to call a stored procedure (http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jdbc/object/StoredProcedure.html). This wrapper could be instantiated with the string to be used for calling the stored-proc. Also a hashmap with the bind-variables as a key and a "simple" language to be executed for each variable as the value could be provided.
          The wrapper bean should have a method with the exchange as the input parameter. In this method you can use the simple language to set all the variables.

          For easy usage a userdefined namespace could be created as well.

          Show
          Arno Noordover added a comment - Would it be a good idea to create a wrapper around a spring jdbc class which can be used to call a stored procedure ( http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jdbc/object/StoredProcedure.html ). This wrapper could be instantiated with the string to be used for calling the stored-proc. Also a hashmap with the bind-variables as a key and a "simple" language to be executed for each variable as the value could be provided. The wrapper bean should have a method with the exchange as the input parameter. In this method you can use the simple language to set all the variables. For easy usage a userdefined namespace could be created as well.
          Hide
          Claus Ibsen added a comment -

          Yeah as camel-sql uses spring-jdbc, so it seems like a good idea to do that.

          You are surely welcome to dive into the code and attempt to implement this. We love contributions
          http://camel.apache.org/contributing.html

          And this ticket is a popular ticket so the community would like stored procedure support in this component.

          Show
          Claus Ibsen added a comment - Yeah as camel-sql uses spring-jdbc, so it seems like a good idea to do that. You are surely welcome to dive into the code and attempt to implement this. We love contributions http://camel.apache.org/contributing.html And this ticket is a popular ticket so the community would like stored procedure support in this component.
          Hide
          Brad Powell added a comment -

          The following bean is very close to this requested functionality:
          https://github.com/bapowell/camel-stored-procedure

          Show
          Brad Powell added a comment - The following bean is very close to this requested functionality: https://github.com/bapowell/camel-stored-procedure

            People

            • Assignee:
              Unassigned
              Reporter:
              Christian Müller
            • Votes:
              8 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated:

                Development