Touch up embedded containers blog post #5

Closed
wants to merge 80 commits into
from
Commits on Dec 13, 2012
  1. Fix typo in 3.2 migration guide

    sbrannen committed Dec 13, 2012
    - @WebApplicationContext --> @WebAppConfiguration
Commits on Dec 14, 2012
  1. Fix JavaDoc in MockRestServiceServer

    Craig Walls authored and rstoyanchev committed Dec 14, 2012
Commits on Dec 20, 2012
  1. Handle non-void write methods deterministically

    cbeams committed Dec 19, 2012
    This change resolves a specific issue with processing
    java.math.BigDecimal via ExtendedBeanInfo. BigDecimal has a particular
    constellation of #setScale methods that, prior to this change, had the
    potential to cause ExtendedBeanInfo to throw an IntrospectionException
    depending on the order in which the methods were processed.
    
    Because JDK 7 no longer returns deterministic results from
    Class#getDeclaredMethods, it became a genuine possibility - indeed a
    statistical certainty that the 'wrong' setScale method handling order
    happens sooner or later. Typically one could observe this failure once
    out of every four test runs.
    
    This commit introduces deterministic method ordering of all discovered
    non-void returning write methods in such a way that solves the problem
    for BigDecimal as well as for any other class having a similar method
    arrangement.
    
    Also:
    
     - Remove unnecessary cast
    
     - Pass no method information to PropertyDescriptor superclasses when
       invoking super(...). This ensures that any 'type mismatch'
       IntrospectionExceptions are handled locally in ExtendedBeanInfo and
       its Simple* PropertyDescriptor variants where we have full control.
    
    Issue: SPR-10111, SPR-9702
Commits on Dec 22, 2012
  1. Fix GenericConversionService search algorithm

    Phillip Webb
    Phillip Webb committed Dec 22, 2012
    Previously the algorithm used by GenericConversionService to find
    converters incorrectly searched for interfaces working up from the
    base class. This caused particular problems with custom List
    converters as as the Collection interface would be considered before
    the List interface giving CollectionToObjectConverter precedence
    over the custom converter.
    
    The updated algorithm restores the class search order to behave in the
    same way as Spring 3.1.
    
    Issue: SPR-10116
Commits on Dec 28, 2012
  1. Merge branch 'cleanup-3.2.x' into cleanup-master

    cbeams committed Dec 28, 2012
    * cleanup-3.2.x: (33 commits)
      Update Apache license headers for affected sources
      Ignore performance-sensitive tests by default
      Introduce 'spring-build-junit' subproject
      Replace EasyMock with Mockito in test sources
      Add @Override annotations to test sources
      Update test source and target JDK compatibility
      Update -Xlint compiler warning output
      Fix various compiler warnings in spring-context
      Fix "unnecessary @SuppressWarnings" warnings
      Fix [rawtypes] compiler warnings
      Fix [dep-ann] warnings with @Deprecated
      Fix [cast] compiler warnings
      Fix [serial] compiler warnings
      Fix [varargs] compiler warnings
      Fix warnings due to unused import statements
      Replace <code> with {@code} throughout Javadoc
      Fix various Javadoc warnings
      Replace space indentation with tabs
      Remove trailing whitespace in source files
      Various updates to support IDEA
      ...
    
    Conflicts:
    	gradle.properties
  2. Add @Override annotations to main sources

    cbeams committed Dec 28, 2012
    Issue: SPR-10130
  3. Update main source and target JDK compatibility

    cbeams committed Dec 28, 2012
    Update source and target compatibility from 1.5 to 1.6, meaning that
    @Override is now allowed on implementations of interface methods within
    main classes.
    
    Issue: SPR-10130
  4. Merge branch 'SPR-10130' into cleanup-master

    cbeams committed Dec 28, 2012
    * SPR-10130:
      Add @Override annotations to main sources
      Update main source and target JDK compatibility
  5. Merge branch 'cleanup-master' into master

    cbeams committed Dec 28, 2012
    * cleanup-master: (36 commits)
      Update Apache license headers for affected sources
      Add @Override annotations to main sources
      Update main source and target JDK compatibility
      Update Apache license headers for affected sources
      Ignore performance-sensitive tests by default
      Introduce 'spring-build-junit' subproject
      Replace EasyMock with Mockito in test sources
      Add @Override annotations to test sources
      Update test source and target JDK compatibility
      Update -Xlint compiler warning output
      Fix various compiler warnings in spring-context
      Fix "unnecessary @SuppressWarnings" warnings
      Fix [rawtypes] compiler warnings
      Fix [dep-ann] warnings with @Deprecated
      Fix [cast] compiler warnings
      Fix [serial] compiler warnings
      Fix [varargs] compiler warnings
      Fix warnings due to unused import statements
      Replace <code> with {@code} throughout Javadoc
      Fix various Javadoc warnings
      ...
  6. Merge branch '3.2.x' into master

    cbeams committed Dec 28, 2012
    * 3.2.x:
      Remove extra URL prefix in the MVC chapter
      Polish contributor guidelines
  7. Merge branch '3.2.x' into master

    cbeams committed Dec 28, 2012
    * 3.2.x:
      Add quartz scheduling test to TestGroup.PERFORMANCE
Commits on Dec 29, 2012
  1. Merge branch '3.2.x' into master

    cbeams committed Dec 29, 2012
    * 3.2.x:
      Add aop target source test to TestGroup.PERFORMANCE
Commits on Jan 2, 2013
  1. Revert "Merge branch 'SPR-10130' into cleanup-master"

    cbeams committed Jan 2, 2013
    This reverts commit 45fa508, reversing
    changes made to a312d90.
  2. Merge branch '3.2.x' into master

    cbeams committed Jan 2, 2013
    * 3.2.x:
      Exclude spring-build-src from maven publish
      Move spring-build-junit into spring-core
      Relocate MergePlugin package
      Develop a gradle plugin to add test dependencies
      Expose Gradle buildSrc for IDE support
      Fix [deprecation] compiler warnings
      Upgrade to xmlunit version 1.3
      Improve 'build' folder ignores
      Fix regression in static setter method support
      Fix SpEL JavaBean compliance for setters
    
    Conflicts:
    	spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java
Commits on Jan 3, 2013
  1. Merge branch '3.2.x' into master

    cbeams committed Jan 3, 2013
    * 3.2.x:
      Fix ClassCastException when setting media types
      Enable execution of TestNG tests in spring-test
      Polish support for topic branch-specific versions
      Segregate add'l long-running and performance tests
      Eliminate EBR dependencies and repository config
      Skip creation of IDEA metadata for spring-aspects
      Fix Eclipse compilation error in Gradle plugin
      Polish build.gradle
      Fix null parameterName issue in content negotiation
      Recursively add test dependencies
  2. Merge branch '3.2.x' into master

    cbeams committed Jan 3, 2013
    * 3.2.x:
      Use unmodified 'version' when not on a topic branch
Commits on Jan 16, 2013
Commits on Mar 4, 2013
  1. Merge branch '3.2.x' into master

    cbeams committed Mar 4, 2013
    Conflicts:
    	gradle.properties
    	spring-beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java
    	spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheManagerFactoryBean.java
    	spring-core/src/main/java/org/springframework/core/convert/support/StringToEnumConverterFactory.java
    	spring-core/src/main/java/org/springframework/core/env/ReadOnlySystemAttributesMap.java
    	spring-jdbc/src/main/java/org/springframework/jdbc/datasource/LazyConnectionDataSourceProxy.java
    	spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/AbstractLobHandler.java
    	spring-web/src/main/java/org/springframework/http/client/BufferingClientHttpRequestWrapper.java
    	spring-web/src/main/java/org/springframework/http/client/SimpleBufferingClientHttpRequest.java
    	spring-web/src/main/java/org/springframework/http/converter/BufferedImageHttpMessageConverter.java
    	spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java
Commits on Mar 10, 2013
  1. Document context hierarchy support in the TCF

    sbrannen committed Mar 10, 2013
    This commit adds examples to the Javadoc for @ContextHierarchy and
    updates the Javadoc for @ContextConfiguration accordingly.
    
    Issue: SPR-10357
  2. Document context hierarchy support in the TCF

    sbrannen committed Mar 10, 2013
    This commit polishes the Javadoc for @ContextHierarchy and
    @ContextConfiguration.
    
    Issue: SPR-10357
  3. Reformat the testing chapter

    sbrannen committed Mar 10, 2013
    This commit reformats the testing chapter (and adds minor polishing
    changes) in order to avoid massive merge diffs in upcoming commits.
    
    Issue: SPR-10357
  4. Make the methodParameter field of HandlerMethod final

    rstoyanchev committed Mar 10, 2013
    Previously the methodParameter array field was initialized lazily since
    it requires reflection. However, in practice the field is always used
    and there is not much benefit from the lazy initialization.
    
    In Spring Framework 3.2, the methodParameter field was copied when a
    new HandlerMethod instance (with the resolved bean) is created for
    performance reasons. That introduced a synchronization issue since
    the lazy initialization was not synchronized.
    
    Issue: SPR-10365
  5. Merge pull request #250 from dsyer/feature/crontest

    cbeams committed Mar 10, 2013
    Fix test for daylight savings glitch
Commits on Mar 11, 2013
  1. Document context hierarchy support in the TCF

    sbrannen committed Mar 11, 2013
    This commit updates the reference manual regarding the new support for
    @ContextHierarchy and hierarchy modes in @DirtiesContext.
    
    Issue: SPR-10357
  2. Add additional test for daylight savings glitch

    dsyer authored and sbrannen committed Mar 10, 2013
    The problem was that clocks go forward *at* 2am, so
    2am doesn't exist once a year. Users might be surprised
    that their cron trigger doesn't go off one night, but that
    is arguably correct (and what happens now). The test can be
    modified if we decide to change the trigger behaviour.
  3. Merge pull request #251 from dsyer/feature/crontest

    sbrannen committed Mar 11, 2013
    # By Dave Syer
    * dsyer-feature/crontest:
      Add additional test for daylight savings glitch
  4. Fix issue with restoring included attributes

    rstoyanchev committed Mar 11, 2013
    Before this change the DispatcherServlet restored modified and also
    removed added attributes but did not restore removed attributes.
    
    Issue: SPR-10360
Commits on Mar 13, 2013
  1. Compare Kind references before checking log levels

    dharkness authored and Phillip Webb committed Mar 13, 2013
    Assuming reference comparisons are much quicker than checking
    likely-nested logger levels, perform the former first.
    
    Also, since the reference can match only one of the instances,
    use "else if" to short-circuit the search.
  2. Merge pull request #252 from dharkness/patch-1

    Phillip Webb
    Phillip Webb committed Mar 13, 2013
    # By David Harkness
    * patch-1:
      Compare Kind references before checking log levels
  3. Minor refinements along the way of researching static CGLIB callbacks

    jhoeller authored and unknown committed Mar 13, 2013
    Specifically, our CallbackFilter doesn't hold an implicit reference to the containing ConfigurationClassEnhancer class anymore.
    
    Issue: SPR-10307
  4. Added "beforeExistingAdvisors" flag to AbstractAdvisingBeanPostProcessor

    jhoeller authored and unknown committed Mar 13, 2013
    Just AsyncAnnotationBeanPostProcessor switches "beforeExistingAdvisors" to "true" by default. So effectively, MethodValidation/PersistenceExceptionTranslationPostProcessor apply after existing advisors by default again, fixing the 3.1->3.2 regression.
    
    Issue: SPR-10309
  5. Extracted buildRequestAttributes template method from FrameworkServlet

    jhoeller committed Mar 13, 2013
    Also, RequestBindingInterceptor now obtains HttpServletRequest from locally passed-in request handle and delegates to buildRequestAttributes as well now.
    
    Issue: SPR-10342
  6. Polishing

    jhoeller committed Mar 13, 2013
  7. Remove Tiles 3 configuration method

    rstoyanchev committed Mar 13, 2013
    Issue: SPR-10361
  8. Final preparations for 3.2.2

    jhoeller committed Mar 13, 2013
  9. Document @Bean 'lite' mode vs @Configuration

    Phillip Webb
    Phillip Webb committed Mar 13, 2013
    Rework the reference documentation to better distinguish the differences
    between @Bean methods used in @Comonent vs @Configuration classes. The
    'Using the @Bean annotation' section now only covers concepts applicable
    when using @Bean methods in @Configuration _or_ @Component classes.
    Information only applicable to @Configuration classes has been moved to
    a new  'Using the @Configuration annotation' section.
    
    An additional sidebar section attempts to explain the differences
    between the two approaches.
    
    Issue: SPR-9425
  10. Hide 'doc' changes from jdiff reports

    Phillip Webb
    Phillip Webb committed Mar 13, 2013
  11. Merge branch '3.2.x'

    Phillip Webb
    Phillip Webb committed Mar 13, 2013
    * 3.2.x: (28 commits)
      Hide 'doc' changes from jdiff reports
      Document @Bean 'lite' mode vs @Configuration
      Final preparations for 3.2.2
      Remove Tiles 3 configuration method
      Polishing
      Extracted buildRequestAttributes template method from FrameworkServlet
      Added "beforeExistingAdvisors" flag to AbstractAdvisingBeanPostProcessor
      Minor refinements along the way of researching static CGLIB callbacks
      Compare Kind references before checking log levels
      Polish Javadoc in RequestAttributes
      Fix copy-n-paste errors in NativeWebRequest
      Fix issue with restoring included attributes
      Add additional test for daylight savings glitch
      Document context hierarchy support in the TCF
      Fix test for daylight savings glitch
      Make the methodParameter field of HandlerMethod final
      Disable AsyncTests in spring-test-mvc
      Reformat the testing chapter
      Document context hierarchy support in the TCF
      Document context hierarchy support in the TCF
      ...
Commits on Mar 19, 2013
  1. Removed JMS 1.0.2 support

    jhoeller committed Mar 19, 2013
  2. Removed JAX-RPC support

    jhoeller committed Mar 19, 2013
  3. General JPA 2.0+ requirement; upgraded build and tests to EclipseLink…

    jhoeller committed Mar 19, 2013
    … 2.4, OpenJPA 2.2, Hibernate 3.6
  4. Spring's EhCache setup builds on EhCache 2.1+ now

    jhoeller committed Mar 19, 2013
    Specifically, EhCacheFactoryBean extends CacheConfiguration now and therefore inherits all configuration properties of the underlying EhCache version. This reduces the need for catching up with new EhCache properties on our side.
    
    Issue: SPR-8258
Commits on Mar 20, 2013
  1. Revised WebServiceFeature handling: requiring JAX-WS 2.1+, including …

    jhoeller committed Mar 20, 2013
    …support for JAX-WS 2.2 service-level features now
  2. Upgraded all Servlet API mocks to Servlet 3.0 (with a little bit of S…

    jhoeller committed Mar 20, 2013
    …ervlet 3.1 support in MockHttpServletResponse)
Commits on Mar 21, 2013
  1. Assigned cache manager name in order to avoid EhCache assertion failu…

    jhoeller committed Mar 21, 2013
    …re in case of multiple tests executed on the same VM
Commits on Mar 27, 2013
  1. Support for embedded servlet containers

    Phillip Webb
    Phillip Webb committed Mar 26, 2013
    Develop new EmbeddedWebApplicationContext (along with XML and
    @Configuration variants) that creates and controls an embedded servlet
    container. Unlike the traditional approach where a ContextLoaderListener
    bootstraps Spring and creates a new WebApplicationContext, embedded
    support expects that the EmbeddedWebApplicationContext will be created
    directly.
    
    The EmbeddedWebApplicationContext will become aware of a ServletContext
    once the embedded container has been started. This will happen early,
    allowing regular beans to call the getServletContext() method or
    implement ServletContextAware.
    
    The EmbeddedServletContainerFactory and EmbeddedServletContainer
    interfaces provide a simple abstraction for creating, starting and
    stopping the container. Any embedded container that supports Servlet
    3.0+ initialization can be adapted. Implementations for Tomcat and
    Jetty are provided.
    
    The FrameworkServlet (and hence the DispatcherServlet subclass) is
    now ApplicationContextAware. This allows FrameworkServlets to be
    defined and used as Spring beans within the
    EmbeddedWebApplicationContext.
    
    Issue: SPR-10381
  2. Blog post and example (not to be pushed)

    Phillip Webb
    Phillip Webb committed Mar 27, 2013