Announcement Announcement Module
No announcement yet.
Multiple @serviceactivator annotations Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple @serviceactivator annotations


    I am trying to write a POJO capable of handling data of different types. I want to use the functions in this POJO to act as service activators for different messages on different channels.

    I am able to get this done using XML configuration where I create a single bean for this POJO and then use ref+method combination for multiple service activator elements with different input channels.

    However, if I try to do the same with annotations where the POJO is annotated as @MessageEndpoint and different functions annotated as @ServiceActivator(input-channel="channelA"), I get exception (org.springframework.expression.spel.SpelEvaluatio nException which says method cannot be found on the class) whenever a message is sent to any of the concerned channel.

    Everything works well if I have a single @ServiceActivator annotation within a given class.

    Is this type of configuration supported via annotations?

  • #2
    Are the annotated methods public?


    • #3
      Yes they are public.

      I forgot to mention the versions I am using

      Spring Framework - 3.0.5.RELEASE
      Spring Integration - 2.0.0.RELEASE


      • #4
        If possible, could you create an issue in JIRA and attach a failing unit test that is as simple as possible (just focused on this problem in isolation)?



        • #5
          Will do.

          In the mean time, I guess I should proceed with single @ServiceActivator annotations within a class for now.