Results 1 to 3 of 3

Thread: Interceptors support

  1. #1
    Join Date
    Oct 2008
    Location
    Auxerre, France
    Posts
    16

    Question Interceptors support

    I work with the latest version of the trunk and it seem like only channel and message-bus tags now accept interceptors,
    for example to intercept the output message of a si-xml:xslt-transformer with is ouput-channel property on a file: outbound-channel-adapter we have to create an additional channels between them.

    Is there a conceptual reason to that matter of fact or did I missed something ?

  2. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,844

    Default

    Can you describe what you were doing previously with the interceptor (or better show the configuration/code)?

  3. #3
    Join Date
    Oct 2008
    Location
    Auxerre, France
    Posts
    16

    Default

    I'm a brand new SI user, I just compare the xsd and notice the disappearance of interceptors for the router and service-activator tags (and maybe others).

    example :
    Code:
    <si-xml:xslt-transformer 
        input-channel="inputChannel" 
        output-channel="outputChannel" 
        xsl-resource="${xslt.url}"
        result-transformer="xmlResultTransformer" />
    
    <beans:bean id="xmlResultTransformer"
    class="org.springframework.integration.xml.transformer.ResultToStringTransformer"/>
    
    <file:outbound-channel-adapter id="outputChannel" directory="${output.directory}"
    If we need to add an interceptor to get the result of the xslt-transformer we have to add it on a new channel :

    Code:
    <si-xml:xslt-transformer 
        input-channel="inputChannel" 
        output-channel="middleChannel" 
        xsl-resource="${xslt.url}"
        result-transformer="xmlResultTransformer" />
    
    <beans:bean id="xmlResultTransformer"
    class="org.springframework.integration.xml.transformer.ResultToStringTransformer"/>
    
    <channel id="middleChannel" >
        <interceptors>
            ...
        </interceptors>
    </channel>
    
    <file:outbound-channel-adapter id="outputChannel" channel="middleChannel"
     directory="${output.directory}"
    ...whereas we could add it directly on the xslt-transformer or the outbound-channel-adapter.

Posting Permissions

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