Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Oct 12, 2011
  1. @cbeams
  2. @cbeams

    Update changelog re destroy method inference

    cbeams authored
    Issue: SPR-8751
  3. @cbeams

    Support destroy method inference

    cbeams authored
    Anywhere the value of a destroy method may be expressed, specifying
    the value "(inferred)" now indicates that the container should attempt
    to automatically discover a destroy method. This functionality is
    currently limited to detecting public, no-arg methods named 'close';
    this is particularly useful for commonly used types such as Hibernate
    SessionFactory most JDBC DataSource implementations, JMS connection
    factories, and so forth.
    This special value is captured as the constant
    AbstractBeanDefinition#INFER_METHOD, which in turn serves as the default
    value of the @Bean#destroyMethod attribute.
    For example in the following case
        public BasicDataSource dataSource() { ... }
    the container will automatically detect BasicDataSource#close and invoke
    it when the enclosing ApplicationContext is closed. This is exactly
    equivalent to
        public BasicDataSource dataSource() { ... }
    A user may override this inference-by-default convention simply by
    specifying a different method
        public MyBasicDataSource dataSource() { ... }
    or, in the case of a bean that has an otherwise inferrable 'close'
    method, but the user wishes to disable handling it entirely, an empty
    string may be specified
        public MyBasicDataSource dataSource() { ... }
    The special destroy method name "(inferred)" may also be specified in
    an XML context, e.g.
        <bean destroy-method="(inferred)">
        <beans default-destroy-method="(inferred)">
    Note that "(inferred)" is the default value for @Bean#destroyMethod,
    but NOT for the destroy-method and default-destroy-method attributes
    in the spring-beans XML schema.
    The principal reason for introducing this feature is to avoid forcing
    @Configuration class users to type destroyMethod="close" every time a
    closeable bean is configured. This kind of boilerplate is easily
    forgotten, and this simple convention means the right thing is done
    by default, while allowing the user full control over customization or
    disablement in special cases.
    Issue: SPR-8751
  4. @cbeams
Commits on Oct 11, 2011
  1. @sbrannen
  2. @sbrannen
  3. @sbrannen
  4. @jhoeller
  5. @jhoeller

    extended LocalSessionFactoryBean options for Hibernate 4; factored ou…

    jhoeller authored
    …t LocalSessionFactoryBuilder
  6. @cbeams

    Update changelog re @EnableAspectJAutoProxy

    cbeams authored
    Issue: SPR-8138
  7. @cbeams

    Introduce @EnableAspectJAutoProxy

    cbeams authored
    Issue: SPR-8138
  8. @cbeams
  9. @cbeams
  10. @cbeams
  11. @cbeams
  12. @jhoeller

    renamed mapKey/ValueTypeDescriptor methods back to getMapKey/ValueTyp…

    jhoeller authored
    …eDescriptor (for Spring 3.0.x compatibility)
  13. @jhoeller
  14. @jhoeller
  15. @jhoeller
  16. @sbrannen

    [SPR-8240] Added new "Mixing XML resources and @Configuration classes…

    sbrannen authored
    …" section to the testing chapter.
  17. @rstoyanchev

    SPR-8725 Change modifier in WebMvcConfigurationSupport methods from p…

    rstoyanchev authored
    …ackage private to public.
    Use of package private @Bean methods can cause issues if the class
    is extended and the sub-class is in a different package. This is 
    covered in detail in SPR-8756.
  18. @cbeams
  19. @cbeams

    Add repro test case for package-private @Bean issue

    cbeams authored
    Reproduces the issue described in SPR-8756 in addition to demonstrating
    the suggested workaround.
    Issue: SPR-8756, SPR-8725
  20. @jhoeller
  21. @jhoeller
  22. @jhoeller

    avoid hard JPA 2.0 dependency

    jhoeller authored
  23. @jhoeller

    removed Hibernate EntityManager 4.0 dependency since it is not needed…

    jhoeller authored
    … for compilation and not for standard runs of the test suite either
  24. @jhoeller
  25. @jhoeller


    jhoeller authored
  26. @jhoeller

    use internal Set for TransactionSynchronization objects in order to a…

    jhoeller authored
    …llow for equals/hashCode based replacement
  27. @jhoeller
  28. @jhoeller
  29. @jhoeller
  30. @jhoeller


    jhoeller authored
  31. @jhoeller
Something went wrong with that request. Please try again.