Results 1 to 2 of 2

Thread: Spring Integration ServiceActivator Annotation

  1. #1
    Join Date
    Aug 2004
    Posts
    218

    Default Spring Integration ServiceActivator Annotation

    After tooling around with the XML and the annotation implementation for ServiceActivator, it seems like I have to use both in order to get a response sent to a replyQueue presumably because of the integrated poller. Is that the correct behavior or am I missing something in the annotation?

    I was hoping I could just get away with using the annotation something like:

    @ServiceActivator(inputChannel="fileRequests", outputChannel="replyChannel")

    Instead I have to do this and have it defined in the XML as well in order for the message to be sent to the replyChannel.

    Code:
    	<integration:service-activator
    		input-channel="fileRequests" ref="receiver" output-channel="replyChannel">
    		<integration:poller>
    			<integration:interval-trigger interval="10"
    				time-unit="SECONDS" />
    		</integration:poller>
    	</integration:service-activator>
    
    	<bean id="receiver" class="com.loutilities.jobs.FileDocumentService" />
    Thoughts?

    Thanks,
    Lou

  2. #2
    Join Date
    Dec 2009
    Posts
    6

    Default

    If you do not use xml at all, then you must include the following in your xml file.

    <int:annotation-config/>

    (were int is spring integration namespace.)

Posting Permissions

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