1. 21 Jan, 2016 26 commits
  2. 20 Jan, 2016 9 commits
    • Andy Wilkinson's avatar
      Handle multiple ContextRefreshedEvents in BackgroundPreinitializer · 6f8d4c77
      Andy Wilkinson authored
      The same initializer will receive multiple ContextRefreshedEvents
      when their is an application context hierarchy. This commit updates
      the initializer to correctly handle multiple ContextRefreshedEvents
      and only act upon the first that it receives.
      
      See gh-4871
      6f8d4c77
    • Andy Wilkinson's avatar
      Ensure that background preinit has completed before refresh returns · 992e90f4
      Andy Wilkinson authored
      This commit is a continuation of the changes made in b85b6082. It
      addresses an additional problem when testing applications where two
      contexts are refreshed in quick succession. In this scenario, it
      was possible, theoretically at least, for the first context’s background preinitialization to still be in progress and creating loggers when the
      second is refreshed and resets the logger context.
      
      This commit updates BackgroundPreinitializer so that, upon receipt of
      a ContextRefreshedEvent, it waits for preinitialization to have
      completed. In the scenario described above, this ensures that
      preinitialization has completed before the call to refresh() for the
      first context returns, thereby preventing it from running in parallel
      with the refresh of the second context.
      
      Closes gh-4871
      992e90f4
    • Stephane Nicoll's avatar
      Make HazelcastJpaDependencyAutoConfiguration public · 179467bd
      Stephane Nicoll authored
      If Both Hazelcast and Hibernate are available, Spring Boot takes the
      opinion that Hazelcast can be used for 2nd level caching and therefore
      need to start before Hibernate.
      
      Unfortunately, some users require Hibernate in some of their hazelcast
      use case so the link is actually reversed. One way for such user is to
      disable the auto-configuration that deals with this link. This class is
      now public so that users can locate them and exclude them if necessary.
      
      Closes gh-4960
      179467bd
    • Andy Wilkinson's avatar
      5e5542f0
    • Andy Wilkinson's avatar
      Perform background preinitialization after logging system setup · b85b6082
      Andy Wilkinson authored
      Previously, BackgroundPreinitializer would kick off preinitialization
      on a separate thread in response to an ApplicationStartedEvent. This
      work would then race with the logging system being set up in response
      to an ApplicationEnvironmentPreparedEvent. When Logback’s being used
      this race is problematic. As part of Logback’s setup,
      LoggerContext.stop() is called. This calls LoggerContext.reset() which
      can fail with a ConcurrentModificationException if another thread tries
      to create a Logger at the same time. This is a known bug in Logback [1].
      
      This commit updates BackgroundPreinitializer to respond to
      an ApplicationEnvironmentPreparedEvent and to order itself so that it’s
      called after LoggingApplicationListener has responded to the same event
      by initializing the logging system.
      
      Closes gh-4871
      
      [1] http://jira.qos.ch/browse/LOGBACK-397
      b85b6082
    • Andy Wilkinson's avatar
      Don’t check that a Gauge’s value is a Number until it’s being read · 00f45385
      Andy Wilkinson authored
      Spring Boot’s metrics require all values to be Numbers. A Dropwizard
      Gauge can have a non-Number value. Previously, to prevent this causing
      a problem, MetricRegistryMetricReader would check the value of a Gauge
      when it’s being added and ignore it if it had a non-Number value.
      Unfortunately, retrieving the value of a Gauge can take a non-trivial
      amount of time (hence CachedGauge) so this approach, while functional,
      could be improved.
      
      This commit updates the filtering to happen when a Metric is being
      retrieved from MetricRegistryMetricReader (via findOne or findAll)
      when its value is required anyway. At this point, any Gauge with a
      non-Number value is ignored.
      
      Closes gh-4874
      00f45385
    • Andy Wilkinson's avatar
      Merge branch 'gh-4976' · d7fbe9ef
      Andy Wilkinson authored
      d7fbe9ef
    • Andy Wilkinson's avatar
      Polish contribution · 2f24c186
      Andy Wilkinson authored
      2f24c186
    • mkwaczynski's avatar
      Include details in AuditEvent data in AuthenticationAuditListener · 3724db9e
      mkwaczynski authored
      Closes gh-4976
      3724db9e
  3. 19 Jan, 2016 5 commits
    • Andy Wilkinson's avatar
      Merge branch '1.2.x' · 1dd16669
      Andy Wilkinson authored
      1dd16669
    • Andy Wilkinson's avatar
      Make EmbeddedVelocityToolboxView work in servlet container deployments · 5ef69036
      Andy Wilkinson authored
      EmbeddedVelocityToolboxView is used with both embedded containers and
      when a Spring Boot application is deployed to a servlet container. It
      process the ServletContext to intercept calls to getResource so that it
      can load Velocity’s toolbox.xml file from within an executable jar.
      Previously, when it created the proxy, it didn’t specify the ClassLoader
      to use. This resulted in the proxy being created using the ClassLoader
      that loaded the Class that is being proxied. This fails when the
      application is deployed to a ServletContainer as the ClassLoader that
      loaded the ServletContext implementation is the container’s ClassLoader
      and it cannot see the classes that are specific to the web application.
      
      This commit updates EmbeddedVelocityToolboxView to specify the
      ClassLoader to use when creating the proxy. It specifies its own
      ClassLoader thereby ensuring that the proxy creation can load
      application-specific classes.
      
      Fixes gh-4967
      5ef69036
    • Stephane Nicoll's avatar
      Fix log message · 46470934
      Stephane Nicoll authored
      Closes gh-4969
      46470934
    • Stephane Nicoll's avatar
      Merge branch '1.2.x' · c57588ac
      Stephane Nicoll authored
      c57588ac
    • Stephane Nicoll's avatar
      Fix documentation of logging.path and logging.file · 2ceadd70
      Stephane Nicoll authored
      See gh-4969
      2ceadd70