1. 28 7月, 2012 2 次提交
    • S
      Support TransactionManagementConfigurer in the TCF · 2b7a6290
      Sam Brannen 提交于
      Currently the Spring TestContext Framework looks up a
      PlatformTransactionManager bean named "transactionManager". The exact
      name of the bean can be overridden via @TransactionConfiguration or
      @Transactional; however, the bean will always be looked up 'by name'.
      
      The TransactionManagementConfigurer interface that was introduced in
      Spring 3.1 provides a programmatic approach to specifying the
      PlatformTransactionManager bean to be used for annotation-driven
      transaction management, and that bean is not required to be named
      "transactionManager". However, as of Spring 3.1.2, using the
      TransactionManagementConfigurer on a @Configuration class has no effect
      on how the TestContext framework looks up the transaction manager.
      Consequently, if an explicit name or qualifier has not been specified,
      the bean must be named "transactionManager" in order for a transactional
      integration test to work.
      
      This commit addresses this issue by refactoring the
      TransactionalTestExecutionListener so that it looks up and delegates to
      a single TransactionManagementConfigurer as part of the algorithm for
      determining the transaction manager.
      
      Issue: SPR-9604
      2b7a6290
    • S
      Support single, unqualified tx manager in the TCF · f21fe33e
      Sam Brannen 提交于
      TransactionalTestExecutionListener currently requires that the
      PlatformTransactionManager bean be named "transactionManager" by
      default. Otherwise, the bean name can only be overridden via the
      transactionManager attribute of @TransactionConfiguration or the value
      attribute of @Transactional.
      
      However, if there is only a single PlatformTransactionManager in the
      test's ApplicationContext, then the requirement to specify the exact
      name of that bean (or to name it exactly "transactionManager") is often
      superfluous.
      
      This commit addresses this issue by refactoring the
      TransactionalTestExecutionListener so that it is comparable to the
      algorithm for determining the transaction manager used in
      TransactionAspectSupport for "production" code. Specifically, the TTEL
      now uses the following algorithm to retrieve the transaction manager.
      
       - look up by type and qualifier from @Transactional
       - else, look up by type and explicit name from
         @TransactionConfiguration
       - else, look up single bean by type
       - else, look up by type and default name from @TransactionConfiguration
      
      Issue: SPR-9645
      f21fe33e
  2. 26 5月, 2012 1 次提交
    • C
      Introduce BeanFactoryAnnotationUtils · a4b00c73
      Chris Beams 提交于
      Commit 096693c4 refactored and
      deprecated TransactionAspectUtils, moving its #qualifiedBeanOfType
      and related methods into BeanFactoryUtils. This created a package cycle
      between beans.factory and beans.factory.annotation due to use of the
      beans.factory.annotation.Qualifier annotation in these methods.
      
      This commit breaks the package cycle by introducing
      beans.factory.annotation.BeanFactoryAnnotationUtils and moving these
      @Qualifier-related methods to it. It is intentionally similar in name
      and style to the familiar BeanFactoryUtils class for purposes of
      discoverability.
      
      There are no backward-compatibilty concerns associated with this change
      as the cycle was introduced, caught and now fixed before a release.
      
      Issue: SPR-6847
      a4b00c73
  3. 20 5月, 2012 1 次提交
    • C
      Refactor and deprecate TransactionAspectUtils · 096693c4
      Chris Beams 提交于
      TransactionAspectUtils contains a number of methods useful in
      retrieving a bean by type+qualifier. These methods are functionally
      general-purpose save for the hard coding of PlatformTransactionManager
      class literals throughout.
      
      This commit generifies these methods and moves them into
      BeanFactoryUtils primarily in anticipation of their use by async method
      execution interceptors and aspects when performing lookups for qualified
      executor beans e.g. via @Async("qualifier").
      
      The public API of TransactionAspectUtils remains backward compatible;
      all methods within have been deprecated, and all calls to those methods
      throughout the framework refactored to use the new BeanFactoryUtils
      variants instead.
      096693c4
  4. 31 1月, 2012 1 次提交
    • C
      Rename modules {org.springframework.*=>spring-*} · 02a4473c
      Chris Beams 提交于
      This renaming more intuitively expresses the relationship between
      subprojects and the JAR artifacts they produce.
      
      Tracking history across these renames is possible, but it requires
      use of the --follow flag to `git log`, for example
      
          $ git log spring-aop/src/main/java/org/springframework/aop/Advisor.java
      
      will show history up until the renaming event, where
      
          $ git log --follow spring-aop/src/main/java/org/springframework/aop/Advisor.java
      
      will show history for all changes to the file, before and after the
      renaming.
      
      See http://chrisbeams.com/git-diff-across-renamed-directories
      02a4473c
  5. 10 10月, 2011 1 次提交
  6. 09 2月, 2011 1 次提交
  7. 13 3月, 2010 1 次提交
  8. 21 7月, 2009 1 次提交
  9. 19 5月, 2009 1 次提交
  10. 19 2月, 2009 1 次提交
  11. 27 10月, 2008 1 次提交