Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Why MessageTransformingHandler requries a reply?

  1. #11
    Join Date
    Feb 2011
    Posts
    6

    Default

    Yeah, I have used the chain. Not that you should care in any way, but I still do not agree with the approach.

    In you new docs you are suggesting a work around, are you not? I am talking about using service activator. For me service activator has a very distinct endpoint-like nature, while Filter and Transformation have a translator-like nature. The difference is small, but when I need transformation I would naturally try to use translator rather than endpoint.

    When I see configuration for service activator, I expect it to connect me to some messaging system, I guess. But yeah, maybe it is just me .

  2. #12
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    ... while Filter and Transformation have a translator-like nature...
    Not at all
    Please read the definition of Filter - http://www.eaipatterns.com/Filter.html
    It belongs to a Message Routing category (not the Message Transformation category). Filter is a guard. It has more security-like behavior and should never attempt to modify the message content.

    Service Activator on the other hand is up to the end user. http://www.eaipatterns.com/MessagingAdapter.html
    The pattern gives you an ability to provide access to whatever you call a service. It coud be as simple as a one line of java code and it could also be as complex as a Messaging Gateway that invokes another flow configured via Spring Integration. The bottom line it is entirely up to the end user how the service is implemented and how many task it performs (regardless of the separation of concern argument). So its not a workaround, but rather giving you a flexibility point.

    Message Transformers have a dedicated role and that is to transform the message from one representation to another not to destroy the message.

    When I see configuration for service activator, I expect it to connect me to some messaging system
    That is actually a Messaging Gateway's responsibility http://www.eaipatterns.com/MessagingGateway.html
    "How do you encapsulate access to the messaging system from the rest of the application"

    Hope that helps

  3. #13
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    One more quick point

    You can look at service-activator as a components that let's you do whatever it is you want where transformer is a specialized service-activator with predefined behavior.
    However if you don't like or agree with predefined behavior use service-activator. It is definitely not a workaround.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •