Results 1 to 2 of 2

Thread: casting pollable error

Hybrid View

  1. #1
    Join Date
    Sep 2011
    Posts
    167

    Default casting pollable error

    Hi ,

    I am getting this error since in configuration i am using direct channel but while retrieving the value in the main file i am doing casting into pollable channel which is not correct ...


    java.lang.ClassCastException: org.springframework.integration.channel.DirectChan nel cannot be cast to org.springframework.integration.core.PollableChann el
    at com.apress.prospringintegration.test.main(test.jav a:67)

    so can u provide me the alternative to directly retrieve the value of the direct channel, so that I can avoid this error...!!!

  2. #2
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,037

    Default

    You don't "retrieve" messages from a DirectChannel, you subscribe to it and the message is delivered to you (it's a SubscribableChannel).

    See http://static.springsource.org/sprin...ingle/#channel
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

Posting Permissions

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