Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-3981

Spring 2.5.X refresh interval incompatibility

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • 1.7.0
    • None
    • class generator
    • None
    • Groovy 1.7.0, JDK 1.5, Spring 2.5.6, Win

    Description

      Version 1.7.0 corrupts Spring 2.5.X refresh interval behaviour. I include set of test proving that. If you run them with Groovy 1.6.5 (see comments containing Groovy 1.6.5, that are necessary to process before running with 1.6.5 - 1.7.0 introduces some changes breaking backward compatibility) all tests pass. With 1.7.0 two fails - one is described in another issue GROOVY-3980.

      This issue should concern with test: com.fg.scripting.groovy.SpringGroovyReloadSupportTest#testReloadLoadGroovyClass

      Note that before running tests, path in com.fg.scripting.groovy.AbstractGroovyTest#setUp must be modified to match your system.

      Spring configuration is so simple, that (I hope) cannot be wrong:

      <?xml version="1.0" encoding="utf-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:lang="http://www.springframework.org/schema/lang"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd">

      <bean id="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

      <lang:groovy id="mainGroovyClass"
      refresh-check-delay="0"
      script-source="file:${project.build.directory}/target/test-classes/com/fg/mock/MainGroovyClass.groovy"/>

      <lang:groovy id="referencingGroovyClass"
      refresh-check-delay="0"
      script-source="file:${project.build.directory}/target/test-classes/com/fg/mock/ReferencingGroovyClass.groovy">
      <lang:property name="mainGroovyClass" ref="mainGroovyClass"/>
      </lang:groovy>

      </beans>

      Bean refreshes to conform to actual source code occurs no more with Groovy 1.7.0.
      Regretfully I wasn't able to find out where problem lies, so no patch is included.

      Attachments

        1. lib_groovy.1.7.0-spring-3.0.0.zip
          28 kB
          Jan Novotný
        2. lib_groovy.1.7.0.zip
          28 kB
          Jan Novotný
        3. 3633_v17x_Patch.txt
          2 kB
          Roshan Dawrani
        4. v2_3633_v17x_Patch.txt
          0.4 kB
          Roshan Dawrani
        5. lib_groovy.1.7.0-spring-3.0.0-second-wait.zip
          27 kB
          Jan Novotný

        Issue Links

          Activity

            People

              roshandawrani Roshan Dawrani
              novoj Jan Novotný
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: