Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-2009

POJO-based implementation of the ReleaseStrategy must honor the method signature of the ReleaseStrategy interface.

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 2.0.3, 2.0.5
    • Fix Version/s: 2.0.6, 2.1 M1
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Mac OS X 10.6.8, Java 1.6.0_26

      Description

      Signature such as "public boolean canRelease(MessageGroup group)" is not supported. The only supported one is "public boolean canRelease(Collection<payload_type> messages)"

      Attempting to use a release strategy with the former signature will yield an IllegalStateException as in the following:

      Caused by: java.lang.IllegalStateException: Invalid method parameter for payload: was expecting collection.
      	at org.springframework.util.Assert.state(Assert.java:384)
      	at org.springframework.integration.util.MessagingMethodInvokerHelper$ParametersWrapper.getPayload(MessagingMethodInvokerHelper.java:645)
      

        Attachments

          Activity

            People

            • Assignee:
              oleg.zhurakousky@springsource.com Oleg Zhurakousky
              Reporter:
              kmsmith Kyle Smith
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: