Announcement Announcement Module
Collapse
No announcement yet.
Interceptor not working on JMS channel Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 03:23 PM. Reason: forgot

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

    Comment


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

      Comment


      • #4
        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

        Comment


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

          Comment


          • #6
            Could you please post your configuration so we can review?

            Comment


            • #7
              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, 11:51 PM.

              Comment


              • #8
                Hello,

                Is there any more information on this?

                I also cannot get an Interceptor to fire on a jms integration channel. I even added a plain int:wire-tap connected to an int:logging-channel-adapter and nothing was logged. The message went down the channel, bypassing all interceptors, and went straight to the associated service-activator.

                I tried a few Spring Integration versions, but the Interceptors for jms backed channels weren't firing in any of them.
                2.1.0.RELEASE
                2.2.4.RELEASE
                3.0.0.M2

                I am trying to get at the JMS (ActiveMQ) message to do a transformation/conversion before it becomes a Generic Spring Integration Message.

                Has anyone found another way?

                Comment

                Working...
                X