Commit Graph

28 Commits

Author SHA1 Message Date
Juergen Hoeller
bbfc807b0c TransactionInterceptor avoids reflective method search for method identification
As of Spring 3.0.4, we were trying to expose the target method signature as transaction name. Unfortunately, the algorithm called the ClassUtils.getMostSpecificMethod helper method which performs a quite expensive reflective search. As of this commit, we're simply concatenating the target class name with the method name, accepting the use of the concrete target class (which is arguably more meaningful for monitoring anyway) even when the method implementation actually sits on a base class.

Issue: SPR-9802
2012-09-26 19:31:05 +02:00
Chris Beams
88913f2b23 Convert CRLF (dos) to LF (unix)
Prior to this change, roughly 5% (~300 out of 6000+) of files under the
source tree had CRLF line endings as opposed to the majority which have
LF endings.

This change normalizes these files to LF for consistency going forward.

Command used:

$ git ls-files | xargs file | grep CRLF | cut -d":" -f1 | xargs dos2unix

Issue: SPR-5608
2011-12-21 14:52:47 +01:00
Juergen Hoeller
0f75cebdff @Transactional qualifiers match against transaction manager definitions in parent contexts as well (SPR-7679) 2011-12-11 13:26:36 +00:00
Chris Beams
d122ecb42e Move AdviceMode from .config to .annotation package 2011-10-09 07:55:08 +00:00
Chris Beams
e0ad6500be Rename TransactionManagementConfigurer callback
Renamed TransactionManagementConfigurer#createTransactionManager()
to #annotationDrivenTransactionManager() to better reflect the fact
that the implemented method is optionally eligible for @Bean annotation.

See Javadoc for details.
2011-06-02 14:28:16 +00:00
Chris Beams
01e5120a26 Introduce @EnableTransactionManagement 2011-05-06 19:10:25 +00:00
Chris Beams
111fb71fe1 Remove "Feature" support introduced in 3.1 M1
Feature-related support such as @Feature, @FeatureConfiguration,
and FeatureSpecification types will be replaced by framework-provided
@Configuration classes and convenience annotations such as
@ComponentScan (already exists), @EnableAsync, @EnableScheduling,
@EnableTransactionManagement and others.

Issue: SPR-8012,SPR-8034,SPR-8039,SPR-8188,SPR-8206,SPR-8223,
SPR-8225,SPR-8226,SPR-8227
2011-05-06 19:03:52 +00:00
Chris Beams
b4fea47d5c Introduce FeatureSpecification support
Introduce FeatureSpecification interface and implementations

    FeatureSpecification objects decouple the configuration of
    spring container features from the concern of parsing XML
    namespaces, allowing for reuse in code-based configuration
    (see @Feature* annotations below).

    * ComponentScanSpec
    * TxAnnotationDriven
    * MvcAnnotationDriven
    * MvcDefaultServletHandler
    * MvcResources
    * MvcViewControllers

Refactor associated BeanDefinitionParsers to delegate to new impls above

    The following BeanDefinitionParser implementations now deal only
    with the concern of XML parsing.  Validation is handled by their
    corresponding FeatureSpecification object.  Bean definition creation
    and registration is handled by their corresponding
    FeatureSpecificationExecutor type.

    * ComponentScanBeanDefinitionParser
    * AnnotationDrivenBeanDefinitionParser (tx)
    * AnnotationDrivenBeanDefinitionParser (mvc)
    * DefaultServletHandlerBeanDefinitionParser
    * ResourcesBeanDefinitionParser
    * ViewControllerBeanDefinitionParser

Update AopNamespaceUtils to decouple from XML (DOM API)

    Methods necessary for executing TxAnnotationDriven specification
    (and eventually, the AspectJAutoProxy specification) have been
    added that accept boolean arguments for whether to proxy
    target classes and whether to expose the proxy via threadlocal.

    Methods that accepted and introspected DOM Element objects still
    exist but have been deprecated.

Introduce @FeatureConfiguration classes and @Feature methods

    Allow for creation and configuration of FeatureSpecification objects
    at the user level.  A companion for @Configuration classes allowing
    for completely code-driven configuration of the Spring container.

    See changes in ConfigurationClassPostProcessor for implementation
    details.

    See Feature*Tests for usage examples.

    FeatureTestSuite in .integration-tests is a JUnit test suite designed
    to aggregate all BDP and Feature* related tests for a convenient way
    to confirm that Feature-related changes don't break anything.
    Uncomment this test and execute from Eclipse / IDEA. Due to classpath
    issues, this cannot be compiled by Ant/Ivy at the command line.

Introduce @FeatureAnnotation meta-annotation and @ComponentScan impl

    @FeatureAnnotation provides an alternate mechanism for creating
    and executing FeatureSpecification objects.  See @ComponentScan
    and its corresponding ComponentScanAnnotationParser implementation
    for details.  See ComponentScanAnnotationIntegrationTests for usage
    examples

Introduce Default[Formatting]ConversionService implementations

    Allows for convenient instantiation of ConversionService objects
    containing defaults appropriate for most environments.  Replaces
    similar support originally in ConversionServiceFactory (which is now
    deprecated). This change was justified by the need to avoid use
    of FactoryBeans in @Configuration classes (such as
    FormattingConversionServiceFactoryBean). It is strongly preferred
    that users simply instantiate and configure the objects that underlie
    our FactoryBeans. In the case of the ConversionService types, the
    easiest way to do this is to create Default* subtypes. This also
    follows convention with the rest of the framework.

Minor updates to util classes

    All in service of changes above. See diffs for self-explanatory
    details.

    * BeanUtils
    * ObjectUtils
    * ReflectionUtils
2011-02-08 14:42:33 +00:00
Juergen Hoeller
99733aef2a introspect superclass when given a CGLIB proxy as target class (SPR-7448); use generic Class<?> in TransactionAttributeSource signature 2010-08-11 21:47:50 +00:00
Juergen Hoeller
4d56b89619 transaction names based on method id from most specific method (target class instead of interface; SPR-7317) 2010-06-28 19:47:13 +00:00
Juergen Hoeller
6c6004a93b @Transactional qualifier value matches against @Qualifier annotations on @Bean methods as well (SPR-7232) 2010-05-26 09:46:03 +00:00
Juergen Hoeller
5dc59aaa7b avoid Synchronization List preparations upfront if possible (SPR-6999) 2010-03-22 14:31:58 +00:00
Juergen Hoeller
f0bb45ae28 included qualifier value in debug log for each transaction (SPR-6811) 2010-02-09 14:57:17 +00:00
Juergen Hoeller
41ecbc6814 fixed WebSphereUowTransactionManager regression: correctly roll back in case of exception (SPR-6695) 2010-02-03 19:41:14 +00:00
Juergen Hoeller
df54c8613d TransactionInterceptor is able to serialize "transactionManagerBeanName" as well (SPR-6680) 2010-02-01 14:45:11 +00:00
Juergen Hoeller
3ac3a72e91 added test with custom repository annotation 2009-08-08 13:57:05 +00:00
Sam Brannen
620c9b1f96 [SPR-5895] Upgraded to EasyMock 2.5.1. 2009-07-03 09:32:15 +00:00
Sam Brannen
af56f6497c Updated regarding generics; fixed typos. 2009-05-25 09:04:05 +00:00
Juergen Hoeller
d34c4a2cf0 @Transactional supports qualifier value for choosing between multiple transaction managers 2009-05-08 23:13:43 +00:00
Juergen Hoeller
cea8f7f69e custom stereotype annotations can be meta-annotated with @Service, @Controller etc as well; @Scope and @Transactional are now supported as meta-annotations on custom annotations 2009-04-26 11:41:06 +00:00
Arjen Poutsma
665b284443 Added some leftover tests 2009-03-25 11:26:39 +00:00
Chris Beams
ea68d343fa eliminated svn:externals in favor of localized copies of shared artifacts 2008-12-18 21:27:18 +00:00
Chris Beams
579280d7bf Whitespace polishing: leading spaces->tabs; updated eclipse configuration to default to leading tabs for all bundles 2008-12-18 14:50:25 +00:00
Chris Beams
c5f8b4f7c6 moving unit tests from .testsuite -> .transaction 2008-12-17 20:10:34 +00:00
Chris Beams
cac2c52e60 moving unit tests from .testsuite -> .transaction
fixed externals issue with .portlet that caused build failure
2008-12-17 19:46:35 +00:00
Chris Beams
f2e9abf699 moved jca.* unit tests from .testsuite -> .transaction 2008-12-16 22:55:07 +00:00
Arjen Poutsma
39d5e191a6 Moved tests from testsuite to tx 2008-10-31 09:50:03 +00:00
Arjen Poutsma
846b848fd3 Initial import of tx bundle 2008-10-23 14:09:34 +00:00