Announcement Announcement Module
Collapse
No announcement yet.
MethodParameterMessageMapper example? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • MethodParameterMessageMapper example?

    In general, my application contains methods that take a number of parameters rather than using a single parameter object that encapsulates the required parameters. For example:

    public DetailedOrderInfo getDetailedOrderInfo(Param1 param1, Param2 param2, Param3 param3) {...}

    Looking at the javadoc for MethodParameterMessageMapper, it looks like this class might help me avoid manually creating a message and sending it on a given channel within my method body.

    Is there an example of using the MethodParameterMessageMapper available?

  • #2
    What version of Spring Integration are you using? We've added support for expression-language driven annotations in 2.0 (still in Milestone phase) so that you can do things like this:
    Code:
    public Account createAccount(@Payload("firstname") String f, @Payload("lastname") l, @Payload("address.city") String c) {...}
    @Header("foo") and @Headers are also available.

    Would that help?

    We're also working on a way to configure this approach in XML. Do you prefer that?

    Thanks,
    -Mark

    Comment


    • #3
      Timeline for 2.0?

      Mark,

      The expression-language driven annotations sure make things easy. Unfortunately though, I am constrained to 1.04 until you go final with 2.0. Can you speculate on what the anticipated time line might be?

      Comment


      • #4
        We're working on the final milestone now (M5), and then July will be "Release Candidate" month. Then, you can expect GA in August.

        Comment

        Working...
        X