1. 16 Oct, 2015 7 commits
    • Spring Buildmaster's avatar
      Release version 1.2.7.RELEASE · 20ee7123
      Spring Buildmaster authored
      20ee7123
    • Andy Wilkinson's avatar
      Ignore parent contexts in message source auto-configuration · c236db04
      Andy Wilkinson authored
      This commit applies the changes made in 68b55ada to 1.2.x (it was
      originally only made in 1.0.x and master). It also adds some tests.
      
      Closes gh-3803
      c236db04
    • Andy Wilkinson's avatar
      Reinstate the use of shutdown hooks in the tests · 35a3f4a1
      Andy Wilkinson authored
      Commit adf2c44b was an attempt to prevent HSQLDB from throwing an
      exception when the JVM exits. This was achieved by disabling the
      application context’s shutdown hook in the tests. This had the unwanted
      side effect of causing tests’ application contexts not to be closed. The
      reported symptom was that @Destroy methods were no longer being invoked.
      We need a different solution to the problem.
      
      The exception was:
      
      Caused by: org.hsqldb.HsqlException: Database lock acquisition failure: attempt to connect while db opening /closing
          at org.hsqldb.error.Error.error(Unknown Source)
          at org.hsqldb.error.Error.error(Unknown Source)
          at org.hsqldb.error.Error.error(Unknown Source)
          at org.hsqldb.DatabaseManager.getDatabase(Unknown Source)
          at org.hsqldb.DatabaseManager.newSession(Unknown Source)
          ... 23 common frames omitted
      
      I originally thought this was due to a race between the application
      context’s shutdown hook and HSQLDB’s shutdown hook, however HSQLDB
      doesn’t use a shutdown hook. I believe that the problem is due to 
      an HSQLDB database being created with shutdown=true in its URL, similar
      to the problem described here [1]. This will shut down the database when
      the last connection to it is closed, however the shutdown will happen
      asynchronously. If the JVM then runs the application context’s shutdown
      hook, EmbeddedDatabaseFactory will attempt to connect to the database to
      execute the SHUTDOWN command. This executes synchronously but will race
      with the asynchronous shutdown that’s executing as a result of
      shutdown=true in the JDBC url and the last connection to the database
      being closed. 
      
      This commit reinstates the use of application context shutdown hooks in
      the tests, and updates the documentation to recommend that, if a user
      manually configures the URL for their embedded database, they do so 
      in such a way that the database doesn’t shutdown automatically, thereby
      allowing the shutdown to be driven by application context close.
      
      Closes gh-4208
      
      [1] http://sourceforge.net/p/hsqldb/bugs/1400/
      35a3f4a1
    • Phillip Webb's avatar
      Roll back to Groovy 2.4.4 · 1c46fd2a
      Phillip Webb authored
      See gh-4210
      1c46fd2a
    • Phillip Webb's avatar
      Revert "Increase PermGen for CLI integration tests" · b0d28735
      Phillip Webb authored
      This reverts commit 4c26b0c1.
      b0d28735
    • Phillip Webb's avatar
      Revert "Compile samples and integration tests with Java 8" · d84889b0
      Phillip Webb authored
      This reverts commit 09395f95.
      d84889b0
    • Phillip Webb's avatar
      Increase PermGen for CLI integration tests · 4c26b0c1
      Phillip Webb authored
      4c26b0c1
  2. 15 Oct, 2015 4 commits
  3. 14 Oct, 2015 4 commits
  4. 12 Oct, 2015 9 commits
  5. 09 Oct, 2015 7 commits
    • Phillip Webb's avatar
      Fix broken formatting · 70214da2
      Phillip Webb authored
      70214da2
    • Phillip Webb's avatar
      94736719
    • Phillip Webb's avatar
      Add custom Eclipse code formatter · b779e8e4
      Phillip Webb authored
      Update Eclipse settings to make use of a custom Spring formatter
      implementation. Using a custom formatter allows us to fix a couple of
      issues with the version that shipped with Eclipse Mars.1 (Eclipse bugs
      
      The custom formatter also means that it is possible to use Groovy
      Eclipse despite the fact that it has formatter regressions (see
      https://github.com/groovy/groovy-eclipse/issues/142).
      
      Fixes gh-4136
      b779e8e4
    • Andy Wilkinson's avatar
      Update tests to expect additional entry in test jar · 04c2bd9c
      Andy Wilkinson authored
      Closes gh-4124
      04c2bd9c
    • Andy Wilkinson's avatar
      Ensure that JarFileArchive unpacks entries to unique location · 888fa902
      Andy Wilkinson authored
      Previously, JarFileArchive would always unpack any entries marked for
      unpacking to ${java.io.tmpdir}/spring-boot-libs. This could cause
      problems if multiple Spring Boot applications were running on the same
      host:
      
      - If the apps are run as different users the first application would
        create the spring-boot-libs directory and the second and subsequent
        applications may not have write permissions to that directory
      - Multiple apps may overwrite each others unpacked libs. At best this
        will mean one copy of a jar is overwritten with another identical
        copy. At worst the jars may have different contents so that some of
        the contents of the original jar disappear unexpectedly.
      
      This commit updates JarFileArchive to use an application-specific
      location when unpacking libs. A directory beneath ${java.io.tmpdir} is
      still used but it's now named <jar-file-name>-spring-boot-libs-<uuid>.
      A loop, limited to 1000 attempts, is used to avoid problems caused by
      the uuid clashing.
      
      Closes gh-4124
      888fa902
    • Andy Wilkinson's avatar
      Use Java 8 on Travis as the samples now require it · f7d2bafb
      Andy Wilkinson authored
      Commit 09395f95 updated the samples to require Java 8. This commit
      updates the Travis configuration to build with Java 8.
      
      Closes gh-4133
      f7d2bafb
    • Andy Wilkinson's avatar
      Prevent closed context from being refreshed again by an HTTP request · 0069e41c
      Andy Wilkinson authored
      Prior to this commit, EmbeddedWebApplicationContext would perform its
      close processing and then stop the embedded container. This could
      lead to the closed context's dispatcher servlet handling an HTTP
      request and refreshing the context again. This opened up two
      possibilities that we need to avoid:
      
      1. Another HTTP request could be received by the dispatcher servlet
         while the context is still being refreshed. This could lead to the
         context being used before its refreshed. I believe this could be
         the cause of the current modification exception described in
         gh-3239 and SPR-13123.
      2. It can lead to a race during shutdown as the shutdown hook's
         attempt to close the context races with the refresh initiated by
         the HTTP request. This is possible as the shutdown hook bypasses
         the sychronization on startupShutdownMonitor that would normally
         prevent refresh and close from occurring in parallel. This race
         can lead to a deadlock as described in gh-4130
      
      Closes gh-4130
      0069e41c
  6. 08 Oct, 2015 5 commits
  7. 07 Oct, 2015 2 commits
  8. 06 Oct, 2015 2 commits