Uploaded image for project: 'Pentaho Data Integration - Kettle'
  1. Pentaho Data Integration - Kettle
  2. PDI-18996

IBM MQ: JmsConsumer/Producer steps don't close correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Severity: Urgent
    • Resolution: Unresolved
    • Affects Version/s: 9.0.0.5 GA
    • Fix Version/s: Backlog
    • Component/s: Step
    • Labels:
      None
    • Story Points:
      0
    • PDI Sub-component:
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • Steps to Reproduce:
      Hide

      Prerequisites:

      To have an IBM MQ instance with a queue configured

      Configure the maximum number of channel to 5 in the queue manager 

      Steps:

      1. Define a transformation that uses the JMS Consumer and the relative stream transformation
      2. Define a job that call the transformation in an infinity loop every 5 secs (configured in the start step of the job).

       

      After 5 loop the JMSConsumer goes in error during the connection phase

      Show
      Prerequisites: To have an IBM MQ instance with a queue configured Configure the maximum number of channel to 5 in the queue manager  Steps: Define a transformation that uses the JMS Consumer and the relative stream transformation Define a job that call the transformation in an infinity loop every 5 secs (configured in the start step of the job).   After 5 loop the JMSConsumer goes in error during the connection phase

      Description

      The system does not close the jms context correctly when we use IBM MQ.

      The problem is present into the class org.pentaho.di.trans.step.jms.JmsStreamSource, in the close method it calls

      @Override public void close() {    
      //don't call super.close().  need to wait for the receiveLoop to be done    
      if ( consumer != null && !closed.getAndSet( true ) ) {      
      consumer.close();      
      jmsDelegate.getJmsContext().close();    
      }  
      }
      

      but the method jmsDelegate.getJmsContext() creates a new context, so the old context won't be closed.

      In order to fix the problem this class has to save the context during the open and close it during the close.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            claudio.dangelo Claudio D'Angelo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: