Camel
  1. Camel
  2. CAMEL-1353

add support for the spring EL from Spring 3 to the languages supported in Camel

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.0
    • Component/s: camel-spring
    • Labels:
      None

      Description

      Spring 3 introduces a new EL which is kinda like EL but a spring implementation of it. We should probably add support for it as another language in camel

      1. spel.confluence
        3 kB
        Richard Kettelerij
      2. camel-spring-expression-20101104.zip
        28 kB
        Richard Kettelerij
      3. camel-core.patch
        4 kB
        Richard Kettelerij

        Issue Links

          Activity

          Hide
          Richard Kettelerij added a comment -

          Hi James,

          I've implemented this feature request. My contribution consists of two parts:

          1) a patch for camel-core to add the spel() language construct to the DSL and Spring configuration. See: http://github.com/rkettelerij/camel-spring-expression/blob/master/camel-core.patch

          2) a new language component called camel-spring-expression that adds Spring Expression Language support to Camel. See: http://github.com/rkettelerij/camel-spring-expression for code and docs. Test coverage is around 75%.

          I've implemented the language support in a separate module (like camel-mvel and camel-ognl) to have camel-spring be compatible with Spring 2.5. This way we can include it in Camel 2.6. When work on Camel 3.0 starts is probably better to transfer this code to the camel-spring module.

          The source code in the referenced GitHub repo is Apache 2.0 licensed. Let me know if it's up to your standards, then i'll put the documentation in Confluence.

          Show
          Richard Kettelerij added a comment - Hi James, I've implemented this feature request. My contribution consists of two parts: 1) a patch for camel-core to add the spel() language construct to the DSL and Spring configuration. See: http://github.com/rkettelerij/camel-spring-expression/blob/master/camel-core.patch 2) a new language component called camel-spring-expression that adds Spring Expression Language support to Camel. See: http://github.com/rkettelerij/camel-spring-expression for code and docs. Test coverage is around 75%. I've implemented the language support in a separate module (like camel-mvel and camel-ognl) to have camel-spring be compatible with Spring 2.5. This way we can include it in Camel 2.6. When work on Camel 3.0 starts is probably better to transfer this code to the camel-spring module. The source code in the referenced GitHub repo is Apache 2.0 licensed. Let me know if it's up to your standards, then i'll put the documentation in Confluence.
          Hide
          Claus Ibsen added a comment -

          Thanks Richard for the patch.

          I dont think its worth the trouble to get it in 2.x because it just complicates building as we then need to skip that component for Spring 2.x profile.

          Show
          Claus Ibsen added a comment - Thanks Richard for the patch. I dont think its worth the trouble to get it in 2.x because it just complicates building as we then need to skip that component for Spring 2.x profile.
          Hide
          Richard Kettelerij added a comment -

          I don't know how much work is required to change the Maven profile, but you have the option to include it in 2.6 if you like. However I'm fine with including the component in Camel 3.0. Integrating the code in camel-spring is trivial so that shouldn't be a problem.

          Shall I add the documentation to the wiki (annotated with "available as of 3.0") or should I hold off until work on 3.0 starts?

          Show
          Richard Kettelerij added a comment - I don't know how much work is required to change the Maven profile, but you have the option to include it in 2.6 if you like. However I'm fine with including the component in Camel 3.0. Integrating the code in camel-spring is trivial so that shouldn't be a problem. Shall I add the documentation to the wiki (annotated with "available as of 3.0") or should I hold off until work on 3.0 starts?
          Hide
          Claus Ibsen added a comment -

          I think we should wait until we got started with 3.0.

          If you got the documentation ready, then you can attach the text to this JIRA in the mean time.

          Show
          Claus Ibsen added a comment - I think we should wait until we got started with 3.0. If you got the documentation ready, then you can attach the text to this JIRA in the mean time.
          Hide
          Richard Kettelerij added a comment -

          Attached docs in wiki markup. Human readable docs are also on http://github.com/rkettelerij/camel-spring-expression

          Show
          Richard Kettelerij added a comment - Attached docs in wiki markup. Human readable docs are also on http://github.com/rkettelerij/camel-spring-expression
          Hide
          Willem Jiang added a comment -

          In Camel 2.x we have the spring-java-config module which can only be compile with spring 3.x.
          You can take a look if you like.
          As the patch has some change in camel-core code, it should be better to wait for we fork the camel 2.x branch.

          Show
          Willem Jiang added a comment - In Camel 2.x we have the spring-java-config module which can only be compile with spring 3.x. You can take a look if you like. As the patch has some change in camel-core code, it should be better to wait for we fork the camel 2.x branch.
          Hide
          Richard Kettelerij added a comment -

          Attaching the files from my GitHub repo and explicitly granting inclusion rights (since the ASF doesn't allow including files from other locations).

          Show
          Richard Kettelerij added a comment - Attaching the files from my GitHub repo and explicitly granting inclusion rights (since the ASF doesn't allow including files from other locations).
          Hide
          Claus Ibsen added a comment -

          Thanks Richard for donating. We will get it in Camel 3.0.

          However we could also get it into a separate camel-spring-el component on 2.x. But we should only do this is there is really a strong demand for this in 2.x.

          Show
          Claus Ibsen added a comment - Thanks Richard for donating. We will get it in Camel 3.0. However we could also get it into a separate camel-spring-el component on 2.x. But we should only do this is there is really a strong demand for this in 2.x.
          Hide
          Claus Ibsen added a comment -

          Richard you are welcome to work on a patch to include spel in camel-spring component.

          The name of the language in the XML should be: spel

          Likewise in the Java DSL, we can use .spel() as the method name.

          Show
          Claus Ibsen added a comment - Richard you are welcome to work on a patch to include spel in camel-spring component. The name of the language in the XML should be: spel Likewise in the Java DSL, we can use .spel() as the method name.
          Hide
          Claus Ibsen added a comment -

          trunk: 1069839.

          Thanks a lot to Richard for the patch and documentation.

          Show
          Claus Ibsen added a comment - trunk: 1069839. Thanks a lot to Richard for the patch and documentation.

            People

            • Assignee:
              Richard Kettelerij
              Reporter:
              james strachan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development