Results 1 to 7 of 7

Thread: Interceptor not working on JMS channel

  1. #1
    Join Date
    Nov 2010
    Posts
    25

    Default Interceptor not working on JMS channel

    Spring Integration 2.0 GA

    We have an interceptor (to add header info), works on a channel, but not on a jms-channel?
    singleLMRecords is a JMS channel
    others (singleLMRecordsTemp) are not, and it goes to interceptor
    works (but not if we try this on a JMS channel)
    Code:
     
      <int:channel-interceptor pattern="batchLMRecords,
                                        singleLMRecords,
                                        singleLMRecordsTemp,
                                        killerEditSuccessRecords,
                                        loanRetrievedSuccessRecords,
                                        loanEditsCompleteRecords,
                                        transactionsRecords,
                                        transactionsRecordsTemp,
                                        transactionsCompletedRecords,
                                        houseKeepingRecords,
                                        houseKeepingCompletedRecords,
                                        processingCompleteRecords,
                                        processingCompleteRecordsTemp,
                                        stausUpdatedRecords" order="-1">
          <bean class="org.tgslc.lendermanifest.integration.interceptor.PerformanceMetricsInterceptor"/>
       </int:channel-interceptor>
    Last edited by rgupta12; Dec 17th, 2010 at 02:23 PM. Reason: forgot

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

    Default

    Thanks for pointing this out. I just created an issue so that you can track it:
    https://jira.springsource.org/browse/INT-1698

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

    Default

    This was just in time by the way. It looks like we should be able to get the fix in for 2.0.1.

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

    Default

    The issue is now resolved. We are planning to release 2.0.1 later today, so please upgrade and let us know (here or in the JIRA issue) if everything is working as expected.

    Thanks,
    Mark

  5. #5
    Join Date
    Nov 2010
    Posts
    25

    Default

    We are still seeing the problem (interceptor not working for JMS channel)
    We are currently using Spring Integration 2.0.1

  6. #6
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Could you please post your configuration so we can review?

  7. #7
    Join Date
    Mar 2010
    Location
    Tallinn, Estonia
    Posts
    25

    Default

    I have same issue in 2.2.0.M2.

    My configuration is

    Code:
    <jms:channel id="userInvitationChannel" queue="userQueue" selector="ACTION = 'INVITE'" transaction-manager="transactionManager" auto-startup="${userInvitationChannel.auto-startup}"
        concurrency="${jms.concurency}" acknowledge="transacted" message-converter="userInvitationMessageConverter" error-handler="jmsErrorHandler">
        <jms:interceptors>
          <beans:bean class="com.zeroturnaround.saas.integration.UserInvitationChannelLogger" />
        </jms:interceptors>
      </jms:channel>
    and

    Code:
    public class UserInvitationChannelLogger extends ChannelInterceptorAdapter {
      private final static Logger log = getLogger(UserInvitationChannelLogger.class);
    
      @Override
      public Message<?> postReceive(Message<?> message, MessageChannel channel) {
        logMessage();
    
        return super.postReceive(message, channel);
      }
    
      @Override
      public void postSend(Message<?> message, MessageChannel channel, boolean sent) {
        logMessage();
    
        super.postSend(message, channel, sent);
      }
    
      @Override
      public boolean preReceive(MessageChannel channel) {
        logMessage();
    
        return super.preReceive(channel);
      }
    
      @Override
      public Message<?> preSend(Message<?> message, MessageChannel channel) {
        logMessage();
    
        return super.preSend(message, channel);
      }
    
      private void logMessage() {
        System.out.println("Hello");
      }
    }
    logMessage() method is never called.
    Last edited by igor.bljahhin; Jun 12th, 2012 at 10:51 PM.

Posting Permissions

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