Uploaded image for project: 'Spring XD'
  1. Spring XD
  2. XD-3739

Incorrect refresh period for groovy scripts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.3 GA
    • Fix Version/s: 1.3.1
    • Component/s: Stream Module
    • Labels:
      None

      Description

      All modules that allow groovy implementations (filter, script, transform, router, tcpclient) allow automatic refresh of the script when it changes. In the XD documentation it is stated that this refresh occurs every minute eg for filter at http://docs.spring.io/spring-xd/docs/1.3.0.RELEASE/reference/html/#filter "The script is checked for updates every 60 seconds, so it may be replaced in a running system. "

      This set up can be seen in the spring xml for the modules - eg (again for filter)

      <filter input-channel="to.script" output-channel="output">
      	<int-groovy:script location="${script:filter.groovy}" script-variable-generator="variableGenerator" refresh-check-delay="60"/>
      </filter>
      

      However from the spring integration documentation http://docs.spring.io/spring-integration/docs/4.2.4.RELEASE/reference/html/messaging-endpoints-chapter.html#scripting-config
      it specifies that the refresh-check-delay parameter is actually in milliseconds - ie the above XD configuration would recheck the script every 60 milliseconds which may be a performance concern as it will be checking the lastmodified time of the script file.

      Ideally this parameter would be configurable - in our case we would usually eliminate the refresh check altogether (set to -1) as our scripts will not change (or if they did a redeploy of the module would pick it up)

        Attachments

          Activity

            People

            Assignee:
            grussell Gary Russell
            Reporter:
            david_geary David Geary
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: