Commit Graph

1174 Commits

Author SHA1 Message Date
Costin Leau 861e481755 revise cache API
+ update failing test
2011-05-17 17:09:49 +00:00
Costin Leau 3699a037a5 revise cache API
+ add missing files (remember to check "show unversioned files")
2011-05-17 16:58:15 +00:00
Costin Leau 0b917e3f9c revise cache API
- eliminate unneeded methods
+ introduced value wrapper (name still to be decided) to avoid cache race conditions
+ improved name consistency
2011-05-17 16:50:00 +00:00
Costin Leau 700a02b094 SPR-8334
+ commit missing configs
2011-05-13 16:09:33 +00:00
Costin Leau cc519e7c6d SPR-8334
+ commit missing configs
2011-05-13 15:59:22 +00:00
Costin Leau a986d758e7 SPR-
+ remove duplicate class
2011-05-13 15:37:10 +00:00
Chris Beams 2afeb08e3c Fix @Autowired+@PostConstruct+@Configuration issue
A subtle issue existed with the way we relied on isCurrentlyInCreation
to determine whether a @Bean method is being called by the container
or by user code.  This worked in most cases, but in the particular
scenario laid out by SPR-8080, this approach was no longer sufficient.

This change introduces a ThreadLocal that contains the factory method
currently being invoked by the container, such that enhanced @Bean
methods can check against it to see if they are being called by the
container or not.  If so, that is the cue that the user-defined @Bean
method implementation should be invoked in order to actually create
the bean for the first time.  If not, then the cached instance of
the already-created bean should be looked up and returned.

See ConfigurationClassPostConstructAndAutowiringTests for
reproduction cases and more detail.

Issue: SPR-8080
2011-05-12 12:28:13 +00:00
Chris Beams 57206db152 Refine ignored @PropertySource log warning
If the enclosing environment does not implement ConfigurableEnvironment,
then @PropertySource annotations are ignored because there is no way to
add them to the Environment. Now checking first to see if there are any
@PropertySource annotations present before issuing the warning.

Issue: SPR-8314
2011-05-12 12:27:14 +00:00
Chris Beams c8bc54e0cc Introduce @PropertySource
Allows a convenient mechanism for contributing a PropertySource to the
enclosing Spring Environment. See @PropertySource Javadoc for
complete details and PropertySourceAnnotationTests for examples.

Issue: SPR-8314
2011-05-11 13:28:33 +00:00
Chris Beams 404f798048 Support 'required properties' precondition
Users may now call #setRequiredProperties(String...) against the
Environment (via its ConfigurablePropertyResolver interface) in order
to indicate which properties must be present.

Environment#validateRequiredProperties() is invoked by
AbstractApplicationContext during the refresh() lifecycle to perform
the actual check and a MissingRequiredPropertiesException is thrown
if the precondition is not satisfied.

Issue: SPR-8323
2011-05-11 07:36:04 +00:00
Chris Beams 693204aef8 Polish @Configuration Javadoc
Add note that nested @Configuration classes must be static.
2011-05-11 06:08:40 +00:00
Chris Beams 52bef0b7b0 Allow static modifier on @Bean methods
Declaring @Bean methods as 'static' is now permitted, whereas previously
it raised an exception at @Configuration class validation time.

A static @Bean method can be called by the container without requiring
the instantiation of its declaring @Configuration class. This is
particularly useful when dealing with BeanFactoryPostProcessor beans,
as they can interfere with the standard post-processing lifecycle
necessary to handle @Autowired, @Inject, @Value, @PostConstruct and
other annotations.

static @Bean methods cannot recieve CGLIB enhancement for scoping and
AOP concerns. This is acceptable in BFPP cases as they rarely if ever
need it, and should not in typical cases ever be called by another
@Bean method.  Once invoked by the container, the resulting bean will
be cached as usual, but multiple invocations of the static @Bean method
will result in creation of multiple instances of the bean.

static @Bean methods may not, for obvious reasons, refer to normal
instance @Bean methods, but again this is not likely a concern for BFPP
types. In the rare case that they do need a bean reference, parameter
injection into the static @Bean method is technically an option, but
should be avoided as it will potentially cause premature instantiation
of more beans that the user may have intended.

Note particularly that a WARN-level log message is now issued for any
non-static @Bean method with a return type assignable to BFPP.  This
serves as a strong recommendation to users that they always mark BFPP
@Bean methods as static.

See @Bean Javadoc for complete details.

Issue: SPR-8257, SPR-8269
2011-05-10 11:55:41 +00:00
Chris Beams 859185d086 Test interaction of @ComponentScan and @Import 2011-05-10 11:54:37 +00:00
Chris Beams d0c31ad84c Allow recursive use of @ComponentScan
Prior to this change, @ComponentScan annotations were only processed at
the first level of depth.  Now, the set of bean definitions resulting
from each declaration of @ComponentScan is checked for configuration
classes that declare @ComponentScan, and recursion is performed as
necessary.

Cycles between @ComponentScan declarations are detected as well. See
CircularComponentScanException.

Issue: SPR-8307
2011-05-08 13:49:35 +00:00
Chris Beams c2b030a50d Polish @EnableScheduling Javadoc 2011-05-08 13:48:02 +00:00
Chris Beams 7e398f101c Rename AsyncConfigurer#get{+Async}Executor 2011-05-07 09:32:03 +00:00
Chris Beams 358cbf4301 Polish @EnableScheduling Javadoc 2011-05-07 09:31:13 +00:00
Chris Beams d9a89529f0 Introduce @EnableScheduling 2011-05-06 19:09:24 +00:00
Chris Beams de50789cb6 Introduce @EnableAsync
Introduce @EnableAsync#order

AsyncAnnotationBeanPostProcessor's 'order' property is now mutable;
@EnableAsync's 'order()' attribute allows for setting it, but must
have a default value, thus uses the new Ordered#NOT_ORDERED
constant - a reserved negative number very unlikely to be otherwise
used that may be interpreted as 'not ordered', useful in annotation
defaulting scenarios where null is not an option.

Introduce first working cut of AsyncConfiguration

Remove AsyncCapability
2011-05-06 19:08:53 +00:00
Chris Beams cf0fc278bb Introduce @Role
As a mechanism for setting the 'role' hint on BeanDefinitions created
via component-scanning or @Bean methods.
2011-05-06 19:08:10 +00:00
Chris Beams 7b999c676f Introduce ReflectionUtils#getUniqueDeclaredMethods
This change is in support of certain polymorphism cases in
@Configuration class inheritance hierarchies.  Consider the following
scenario:

@Configuration
public abstract class AbstractConfig {
    public abstract Object bean();
}

@Configuration
public class ConcreteConfig {
    @Override
    @Bean
    public BeanPostProcessor bean() { ... }
}

ConcreteConfig overrides AbstractConfig's #bean() method with a
covariant return type, in this case returning an object of type
BeanPostProcessor.  It is critically important that the container
is able to detect the return type of ConcreteConfig#bean() in order
to instantiate the BPP at the right point in the lifecycle.

Prior to this change, the container could not do this.
AbstractAutowireCapableBeanFactory#getTypeForFactoryMethod called
ReflectionUtils#getAllDeclaredMethods, which returned Method objects
for both the Object and BeanPostProcessor signatures of the #bean()
method.  This confused the implementation sufficiently as not to
choose a type for the factory method at all.  This means that the
BPP never gets detected as a BPP.

The new method being introduced here, #getUniqueDeclaredMethods, takes
covariant return types into account, and filters out duplicates,
favoring the most specific / narrow return type.

Additionally, it filters out any CGLIB 'rewritten' methods, which
is important in the case of @Configuration classes, which are
enhanced by CGLIB.  See the implementation for further details.
2011-05-06 19:07:25 +00:00
Chris Beams 2bc3527f76 Consolidate annotation processing constants
Consolidating internal bean name and aspect class name constats within
AnnotationConfigUtils to allow access from both the context.config
and context.annotation packages without creating a relationship between
the two of them (they are unrelated leaf nodes in the packaging
currently).

The .transaction module does not have a similar utils class and already
has a relationship from transaction.config -> transaction.annotation,
so placing the constants in .annotation.TransactionManagementCapability
to be referenced by .config.AnnotationDrivenBeanDefinitionParser
2011-05-06 19:06:37 +00:00
Chris Beams 9a271ce6c9 Introduce ImportSelector interface
Allows @Enable* a layer of indirection for deciding which @Configuration
class(es) to @Import.

The @Import annotation may now accept @Configuration class literals
and/or ImportSelector class literals.
2011-05-06 19:06:02 +00:00
Chris Beams cdb01cbd37 Introduce ImportAware interface
@Configuration classes may implement ImportAware in order to be injected
with the AnnotationMetadata of their @Import'ing class.

Includes the introduction of a new PriorityOrdered
ImportAwareBeanPostProcessor that handles injection of the
importing class metadata.
2011-05-06 19:05:42 +00:00
Chris Beams 89005a5b70 Process all meta and local @Import declarations
Includes the introduction of AnnotationUtils#findAllAnnotationAttributes
to support iterating through all annotations declared on a given type
and interrogating each for the presence of a meta-annotation. See tests
for details.
2011-05-06 19:05:15 +00:00
Chris Beams 856da7edb9 Provide dedicated @ComponentScan processing
@ComponentScan is now checked for explicitly and handled immediately
when parsing @Configuration classes.
2011-05-06 19:04:35 +00:00
Chris Beams cd4fb665d9 Delegate ComponentScanBDP environment to scanner
Enables @Profile filtering within ComponentScanBeanDefinitionParser
2011-05-06 19:04:11 +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 0a790c143f Rename ConfigurationClassMethod => BeanMethod 2011-05-06 19:01:56 +00:00
Chris Beams f683f781c5 Revert deprecation of BDRU#registerWithGeneratedName
The overloading necessary to preserve the new signature as well as
the old causes ambiguities leading to deprecation warnings in some
caller scenarios.
2011-05-06 19:01:35 +00:00
Chris Beams 84a63b6d4b Prevent empty calls to ACAC #register and #scan 2011-05-06 19:01:11 +00:00
Chris Beams d2faef44fa Add comment on DisposableBean use in @Configuration
Issue: SPR-7901
2011-05-06 19:00:55 +00:00
Chris Beams d3678caa37 Polish Javadoc 2011-05-06 19:00:38 +00:00
Chris Beams f30b7e3125 Fix generics and serialization warnings 2011-05-06 19:00:14 +00:00
Chris Beams c51c340881 Update MockEnvironment / MockPropertySource types
Reflecting signature changes in getProperty() methods
2011-05-06 18:57:41 +00:00
Costin Leau 5206f5bc9a SPR-8238
+ add NPE test
2011-04-21 08:07:12 +00:00
Costin Leau e1d19d6c24 SPR-8238
+ add handling for null arguments to prevent NPE in default key generation
2011-04-21 08:00:42 +00:00
Micha Kiener 8adb9a88d0 SPR-6416, adding basic conversation object tests, improving the access time of the conversation object 2011-04-12 19:51:50 +00:00
Micha Kiener 3244e0a644 SPR-6416, adding repository timeout setting tests 2011-04-12 18:11:18 +00:00
Micha Kiener 8098ced387 SPR-6416, adding conversation manager test 2011-04-12 16:02:46 +00:00
Micha Kiener 58b779355b SPR-6416, reshaping removal of hierarchical conversations and adding repository test 2011-04-12 14:53:09 +00:00
Micha Kiener f812cd748e SPR-6416, initial commit for the conversation management 2011-04-12 13:21:18 +00:00
Sam Brannen 070b7b6afe polishing 2011-04-04 22:05:49 +00:00
Chris Beams 74f1e0e9d0 Touch up ApplicationContextInitializer Javadoc 2011-04-04 14:57:51 +00:00
Chris Beams 4f7bdbd3de Make ConfigurationClassBeanDefinitionReader public
Issue: SPR-8200
2011-04-04 14:14:17 +00:00
Rossen Stoyanchev 3f11fbafaa Predictable index position for BindingResult keys and parameter annotation convenience methods in MethodParameter 2011-03-31 14:16:37 +00:00
Sam Brannen 8568250e77 [SPR-8089] Added TODOs. 2011-03-28 19:01:33 +00:00
Sam Brannen 45c6eb1d62 [SPR-8089] re-ignoring JMX tests that require the presence of jmxremote_optional.jar. 2011-03-28 18:38:34 +00:00
Sam Brannen 309fa92199 [SPR-8089] re-ignoring JMX tests that require the presence of jmxremote_optional.jar. 2011-03-28 18:26:30 +00:00
Sam Brannen adfcc929fb [SPR-8091] developer notes 2011-03-28 18:09:14 +00:00
Costin Leau 5c3ceb8ef0 SPR-7971
+ add target object to KeyGenerator
2011-03-28 18:09:04 +00:00
Sam Brannen 71d70a6e06 [SPR-8089] cleaning up ignored and broken JMX tests; suppressing warnings; using generics where feasible; documented the jmxremote_optional.jar requirement in AbstractMBeanServerTests. 2011-03-28 17:57:01 +00:00
Costin Leau a3a0e5165c SPR-8007
+ add more logging
2011-03-28 12:10:26 +00:00
Costin Leau eb4b68ffda SPR-8007
SPR-7832
+ expose the invocation params through the cache root object
+ update javadocs
2011-03-28 11:36:05 +00:00
Chris Beams f4e1cde33b Eliminate warnings in .validation package
Issue: SPR-8062
2011-03-18 06:47:12 +00:00
Chris Beams 150838bfc1 Remove TODOs related to profile logging
Issue: SPR-8031, SPR-7508, SPR-8057
2011-03-15 12:57:43 +00:00
Chris Beams d471266d44 @Feature methods accept @Value-annotated params
Previously errors were being raised when trying to inject @Value
annotated paramaters such as:

@Feature
public FeatureSpec feature(@Value("#{environment['foo']}") String foo) {
    return new FeatureSpec(foo);
}

This is not so much because dependency resolution of @Value-annotated
types was failing, but rather because the 'early bean reference'
proxying mechanism was throwing an exception if any final type was
detected as a parameter. This is of course because final types are
non-subclassable by CGLIB.  On review, however, it's obvious that
certain final types must be allowed for injection.  @Value injection
is an obvious one, but the rarer case of a Spring bean of type String
or int is another.

The explicit guard against final types as parameters to @Feature methods
has been removed. Final types are still checked for, however, and if
found, no proxing is attempted.  The dependency is immediately resolved
against the current BeanFactory and injected into the @Feature method.

This means that @Value injection, @Qualifier injection, etc all work
as expected, but does mean that premature bean instantiation may occur
if a user unwittingly injects non-String, non-primitive final bean types
as @Feature method parameters.

Issue: SPR-7974
2011-03-15 07:09:49 +00:00
Chris Beams 43676bd660 Deregister @Configuration CGLIB callbacks
CGLIB-enhanced @Configuration subclasses now implement DisposableBean
such that Enhancer.registerStaticCallbacks(subclass, null) is invoked
on container shutdown. This ensures that garbage collection can work
properly and avoids memory consumption issues for applications that
create and destroy many application contexts within the same JVM.

Issue: SPR-7901
2011-03-14 09:20:19 +00:00
Chris Beams 76ce418556 Fix context:property-placeholder XSD type hierarchy
context:property-placeholder extends 'propertyPlaceholder' type
defintion once again.  This relationship was inadvertently removed in
3.1 M1, and the effect was that XML tooling would raise errors on
use of attributes like 'location'.

The updated schema has also been published to

    http://www.springframework.org/schema/context/spring-context-3.1.xsd

Issue: SPR-8037
2011-03-13 19:12:50 +00:00
Chris Beams 4cdb04ab25 Process @ImportResource with current ResourceLoader
Issue: SPR-7973
2011-03-12 12:24:38 +00:00
Chris Beams 704b229cc7 Test injection of Environment on @Feature methods
Issue: SPR-7975
2011-03-12 12:24:20 +00:00
Chris Beams 5cfbed8881 Test injection of special types on @Feature methods
Prove that injection of special container types such as ResourceLoader,
BeanFactory, etc already works with the current implementation of
@Feature methods.

Issue: SPR-7975
2011-03-11 12:40:51 +00:00
Chris Beams 5de35e8f92 Polishing 2011-03-10 14:08:58 +00:00
Costin Leau c3a635196b SPR-8015
+ update default key generator strategy to improve compatibility for implicit declaration on one arg method
+ updated docs
2011-03-06 17:13:24 +00:00
Costin Leau a4aca64007 + fix bug that prevented internal expression cache from being used 2011-03-06 17:06:28 +00:00
Costin Leau 5daad3e081 SPR-8006
+ fix contains/get race-condition of caches (by adding an extra cache call)
2011-03-06 12:27:46 +00:00
Costin Leau a20dd8095e + update copyright headers 2011-03-06 11:53:12 +00:00
Costin Leau fad2f2ca30 SPR-8006
SPR-8023
- remove unneeded method
2011-03-06 11:43:25 +00:00
Costin Leau 523a83ca28 SPR-8008
SPR-8023
+ fix bug in Ehcache cache that considered expired entries for key checks
2011-03-06 11:36:36 +00:00
Juergen Hoeller 716aa6974c fixed scheduling tests 2011-02-10 23:04:40 +00:00
Juergen Hoeller 0d70e08ac3 exceptions thrown by @Scheduled methods will be propagated to a registered ErrorHandler (SPR-7723) 2011-02-10 22:50:16 +00:00
Juergen Hoeller 03190950d1 polishing 2011-02-10 22:19:10 +00:00
Chris Beams 6bfead259e Further compensation for STS version mismatch
Current STS version of Spring (3.0.5) does not contain
the BeanUtils.instantiateClass(Class<?>, Class<T>) signature
that was added in 3.1.0, therefore NoSuchMethodErrors are
being thrown when STS classloads and delegates to
3.1.0 NamespaceHandler and BeanDefinitionParser implementations
on the user project classpath.

In this case, it's AbstractSpecificationBeanDefinitionParser
doing the calling to the unknown new method.  In this specific
example, reverting back to the old single-arg signature is actually
not a problem, because it does accept Class<T> and returns an
instance of type T, which was the desired behavior in the first
place.

The newer signature remains in order to accommodate callers
who do not know the generic type of the Class to be instantiated
(i.e. Class<?>), but do know the type that it should be assignable
to -- this becomes the second argument Class<T>, and an instance
of type T is returned (if indeed it is assignable to the specified
type; otherwise IllegalArgumentException.
2011-02-10 17:59:26 +00:00
Juergen Hoeller ce761d3fe8 renamed AbstractPropertyPlaceholderConfigurer to PlaceholderConfigurerSupport 2011-02-10 02:01:02 +00:00
Juergen Hoeller 47c9278e32 renamed AbstractPropertyPlaceholderConfigurer to PlaceholderConfigurerSupport 2011-02-10 01:55:11 +00:00
Juergen Hoeller 93304b5ff2 removed ConversionService/TypeConverter convenience methods in order to restore 3.0's SPI (for backwards compatibility with implementers) 2011-02-10 01:36:57 +00:00
Chris Beams b7d7fa7b7e Further compensations for STS; binary compat fixes
Defensively catch NoSuchMethodError when calling BDPD.getEnvironment()
and supply a DefaultEnvironment if not available.

Replace the single-arg constructor for BDPD and deprecate, preserving
binary compat particularly for Spring Integration who instantiates
this class directly, which is unusual.
2011-02-10 00:30:30 +00:00
Chris Beams 9cc125531b Fix STS compatibility issues; other improvements
Revert changes to ParserContext, ReaderContext, and XmlReaderContext

    These changes cause cross-version incompatibilities at tooling time
    -- for instance, an STS version that ships with Spring 3.0.5
    classloads the ParserContext defined in that version, whereas it
    classloads NamespaceHandlers and BeanDefinitionParsers (by default)
    from the user application classpath, which may be building against
    3.1.0. If so, the changes introduced to these types in 3.1.0 are
    incompatible with expectations in the 3.0.5 world and cause all
    manner of problems.  In this case, it was NoSuchMethodError due to
    the newly-added XmlReaderContext.getProblemReporter() method; also
    IncompatibleClassChangeError due to the introduction of the
    ComponentRegistrar interface on ParserContext.

    Each of these problems have been mitigated, though the solutions
    are not ideal. The method mentioned has been removed, and instead
    the problemReporter field is now accessed reflectively.
    ParserContext now no longer implements ComponentRegistrar, and
    rather a ComponentRegistrarAdapter class has been introduced that
    passes method calls through to a ParserContext delegate.

Introduce AbstractSpecificationBeanDefinitionParser

    AbstractSpecificationBeanDefinitionParser has been introduced in
    order to improve the programming model for BeanDefinitionParsers
    that have been refactored to the new FeatureSpecification model.
    This new base class and it's template method implementation of
    parse/doParse ensure that common concerns like (1) adapting a
    ParserContext into a SpecificationContext, (2) setting source and
    source name on the specification, and (3) actually executing the
    specification are all managed by the base class.  The subclass
    implementation of doParse need only actually parse XML, populate
    and return the FeatureSpecification object.  This change removed
    the many duplicate 'createSpecificationContext' methods that had
    been lingering.

Minor improvement to BeanDefinitionReaderUtils API

    Introduced new BeanDefinitionReaderUtils#registerWithGeneratedName
    variant that accepts BeanDefinition as opposed to
    AbstractBeanDefinition, as BeanDefinition is all that is actually
    necessary to satisfy the needs of the method implementation. The
    latter variant accepting AbstractBeanDefinition has been deprecated
    but remains intact and delegates to the new variant in order to
    maintain binary compatibility.
2011-02-09 16:44:26 +00:00
Arjen Poutsma 91debc3a35 Fixing compilation error with javac. 2011-02-09 09:39:29 +00:00
Chris Beams c58b63a982 Revert signature change in BDRU.registerWithGeneratedName
This change broke binary compatibility as evidenced by running
the greenhouse test suite and finding that Spring Integration's
AbstractConsumerEndpointParser.parseInternal fails with
NoSuchMethodError when trying to invoke.
2011-02-09 06:57:24 +00:00
Chris Beams b1756e2f17 Sync pom.xml deps with ivy.xml changes since 3.0.5 2011-02-09 06:56:53 +00:00
Chris Beams 2f7c2230f0 Include license.txt and notice.txt in module JARs 2011-02-09 06:56:40 +00:00
Chris Beams 906b50ef51 Add FeatureMethodErrorTests
Capture common mistakes with @Feature method declarations and ensure
that useful error messages are produced.
2011-02-09 06:54:02 +00:00
Sam Brannen e7c2713fd4 polishing JavaDoc 2011-02-08 22:08:38 +00:00
Chris Beams 2d76dde611 Rename ExecutorContext => SpecificationContext 2011-02-08 19:08:41 +00:00
Chris Beams c5063004eb Rename spring.{profile}.active => {profiles}
Same for spring.profiles.default
2011-02-08 19:07:46 +00:00
Chris Beams a2bc381ade Extract ProblemCollector interface 2011-02-08 19:07:03 +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
Chris Beams b04987ccc3 Make ObjectUtils.addObjectToArray() generic 2011-02-08 13:01:29 +00:00
Costin Leau fb57316afa renamed EhcacheCacheManager to EhCacheCacheManager 2011-02-07 17:45:29 +00:00
Costin Leau ca2dbc1c59 renamed EhcacheCacheManager to EhCacheCacheManager 2011-02-07 17:44:41 +00:00
Costin Leau 4da39b48f7 moved cache abstraction from context.support to context 2011-02-07 17:41:25 +00:00
Keith Donald fbb1fa33a1 added support for Instant and MutableDateTime binding to JodaTime formatting system; allow for use of @DateTimeFormat on any ReadableInstant field 2011-02-04 20:17:52 +00:00
Keith Donald ff7f3aebea reordered interface operations for clarity 2011-02-04 18:20:05 +00:00
Keith Donald 7d1104e442 SPR-7875 2011-02-04 18:17:30 +00:00
Costin Leau 44b5df0db1 SPR-7887
+ add javadoc on JBoss LTW for usage on JBoss 6.0
2011-02-01 10:19:23 +00:00
Costin Leau f191be56d1 SPR-4331
LTW for WebSphere
2011-02-01 10:17:42 +00:00
Rossen Stoyanchev abff2b959b SPR-7912 Add tests for FormattingConversionServiceFactoryBean, update reference docs, and remove mvc:formatters 2011-01-27 11:26:19 +00:00
Rossen Stoyanchev 149348c907 SPR-7912 Introduce FormatterRegistrar interface and FormattingConversionServiceFactoryBean enhancements. 2011-01-26 22:20:49 +00:00
Rossen Stoyanchev f26b499cbd SPR-7732, SPR-6506, SPR-7191 MVC Namespace improvements to the annotation-driven element - custom message converters, formatters, and message codes resolver. 2011-01-25 17:49:57 +00:00
Juergen Hoeller d3d7634574 added tests with error in BindingResult (SPR-7809) 2011-01-18 21:39:08 +00:00
Keith Donald 5d6840e877 array autogrow on set e.g. array[0]=foo 2011-01-07 17:28:18 +00:00
Chris Beams a7293d2961 Introduce ApplicationContextInitializer interface
Designed primarily for use in conjunction with web applications
to provide a convenient mechanism for configuring the container
programmatically.

ApplicationContextInitializer implementations are specified through the
new "contextInitializerClasses" servlet context parameter, then detected
and invoked by ContextLoader in its customizeContext() method.

In any case, the semantics of ApplicationContextInitializer's
initialize(ConfigurableApplicationContext) method require that
invocation occur *prior* to refreshing the application context.

ACI implementations may also implement Ordered/PriorityOrdered and
ContextLoader will sort instances appropriately prior to invocation.

Specifically, this new support provides a straightforward way to
programmatically access the container's Environment for the purpose
of adding, removing or otherwise manipulating PropertySource objects.

See Javadoc for further details.

Also note that ApplicationContextInitializer semantics overlap to
some degree with Servlet 3.0's notion of ServletContainerInitializer
classes. As Spring 3.1 development progresses, we'll likely see
these two come together and further influence one another.
2011-01-07 09:57:57 +00:00
Keith Donald 0fb631348e switched to better encapsulated convert(Object, TypeDescriptor) where possible 2011-01-07 05:57:25 +00:00
Keith Donald 4c9731d572 added forNestedType(MethodParameter) for resolution of nested parameter types for collection, array, and map parameter types 2011-01-06 21:59:34 +00:00
Sam Brannen 61cfb96d95 Changed slf4j.jcl dependency from 1.5.6 to 1.5.3 for consistency with build.versions. 2011-01-06 20:05:22 +00:00
Keith Donald c6c782df59 forNestedType usage clarification 2011-01-06 18:33:50 +00:00
Keith Donald 7ec5f1694b temp added ignore on 2 new failing tests until time to investigate 2011-01-06 12:00:51 +00:00
Keith Donald 86f1179606 temp added ignore on 2 new failing tests until time to investigate 2011-01-06 11:41:30 +00:00
Chris Beams 15ac99f59c Introduce and integrate JndiPropertySource
DefaultWebEnvironment automatically adds a JndiPropertySource if
a "jndiPropertySourceEnabled" property is detected in any of the
other other default property sources.
2011-01-06 07:43:29 +00:00
Chris Beams 9420bdc246 Document createEnvironment() methods
in AbstractApplicationContext and SpringContextResourceAdapter
2011-01-05 22:25:42 +00:00
Chris Beams 7f8ede1407 Remove dead code
* removed registerStandardBeanFactoryPostProcessors() methods
* removed commented-out test from PropertyResourceConfigurerTests
2011-01-05 22:24:55 +00:00
Chris Beams 431eaf6df8 Refactor PropertyPlaceholderConfigurer hierarchy
PropertySourcesPlaceholderConfigurer accommodates recent changes in
Environment and PropertySource APIs, e.g. no longer assuming enumerability
of property names.

PSPC reuses as much functionality as possible from
AbstractPropertyPlaceholderConfigurer, but overrides
postProcessBeanFactory() and defines its own variation on
processProperties() in order to accept a PropertyResolver rather than
a PropertySource.

AbstractPropertyPlaceholderConfigurer introduces doProcessProperties()
method to encapsulate that which is actually common, such as the
visiting of each bean definition once a StringValueResolver has been
created in the subclass.
2011-01-05 22:24:37 +00:00
Chris Beams 2b99cf6d29 Refactor Environment and PropertySource
* Environment now extends PropertyResolver
* Environment no longer exposes resolver and sources
* PropertySource is String,Object instead of String,String
* PropertySource no longer assumes enumerability of property names
* Introduced EnumerablePropertySource for those that do have enumerable property names
2011-01-05 22:24:14 +00:00
Juergen Hoeller 3fe2d037ed fixed AbstractBindingResult to avoid NPE in "hashCode()" if target is null (SPR-7682) 2011-01-05 19:42:35 +00:00
Keith Donald fe386f1c10 spr7816 2011-01-05 06:23:04 +00:00
Keith Donald 39e0c29d19 TypeDescriptor cleanup and general polishing; fixed a number of bugs related to TypeDescriptor usage in client code across beans and spel packages 2011-01-05 05:49:33 +00:00
Chris Beams 5e6912302a Introduce "Aware" superinterface
All existing *Aware interfaces have been refactored to extend this
new marker interface, serving two purposes:

    * Easy access to a type hierarchy that can answer the question
      "What *Aware interfaces are available?", without requiring
      text-based searches. Also clearly excludes false positives like
      TargetClassAware and ParamAware, which while similarly named,
      are not semantically similar to traditional *Aware interfaces
      in Spring.

    * Minor potential performance improvements in
      AbstractAutowireCapableBeanFactory and
      ApplicationContextAwareProcessor. Both have blocks of sequential
      instanceof checks in order to invoke any *Aware interface callback
      methods. For a bean that implements none of these interfaces,
      the whole sequence can be avoided by guarding first with
          if (bean instanceof Aware) {
              ...
          }

Implementors of custom *Aware-style interfaces (and presumably
the BeanPostProcessors that handle them), are encouraged to refactor to
extending this interface for consistency with the framework as well as
the points above.
2011-01-03 10:13:57 +00:00
Chris Beams b3ff9be78f M1 cut of environment, profiles and property work (SPR-7508)
Decomposed Environment interface into PropertySources, PropertyResolver
objects

    Environment interface and implementations are still present, but
    simpler.

    PropertySources container aggregates PropertySource objects;
    PropertyResolver provides search, conversion, placeholder
    replacement. Single implementation for now is
    PropertySourcesPlaceholderResolver

Renamed EnvironmentAwarePropertyPlaceholderConfigurer to
PropertySourcesPlaceholderConfigurer

    <context:property-placeholder/> now registers PSPC by default, else
    PPC if systemPropertiesMode* settings are involved

Refined configuration and behavior of default profiles

    See Environment interface Javadoc for details

Added Portlet implementations of relevant interfaces:

    * DefaultPortletEnvironment
    * PortletConfigPropertySource, PortletContextPropertySource
    * Integrated each appropriately throughout Portlet app contexts

Added protected 'createEnvironment()' method to AbstractApplicationContext

    Subclasses can override at will to supply a custom Environment
    implementation.  In practice throughout the framework, this is how
    Web- and Portlet-related ApplicationContexts override use of the
    DefaultEnvironment and swap in DefaultWebEnvironment or
    DefaultPortletEnvironment as appropriate.

Introduced "stub-and-replace" behavior for Servlet- and Portlet-based
PropertySource implementations

    Allows for early registration and ordering of the stub, then
    replacement with actual backing object at refresh() time.

    Added AbstractApplicationContext.initPropertySources() method to
    support stub-and-replace behavior. Called from within existing
    prepareRefresh() method so as to avoid impact with
    ApplicationContext implementations that copy and modify AAC's
    refresh() method (e.g.: Spring DM).

    Added methods to WebApplicationContextUtils and
    PortletApplicationContextUtils to support stub-and-replace behavior

Added comprehensive Javadoc for all new or modified types and members

Added XSD documentation for all new or modified elements and attributes

    Including nested <beans>, <beans profile="..."/>, and changes for
    certain attributes type from xsd:IDREF to xsd:string

Improved fix for detecting non-file based Resources in
PropertiesLoaderSupport (SPR-7547, SPR-7552)

    Technically unrelated to environment work, but grouped in with
    this changeset for convenience.

Deprecated (removed) context:property-placeholder
'system-properties-mode' attribute from spring-context-3.1.xsd

    Functionality is preserved for those using schemas up to and including
    spring-context-3.0.  For 3.1, system-properties-mode is no longer
    supported as it conflicts with the idea of managing a set of property
    sources within the context's Environment object. See Javadoc in
    PropertyPlaceholderConfigurer, AbstractPropertyPlaceholderConfigurer
    and PropertySourcesPlaceholderConfigurer for details.

Introduced CollectionUtils.toArray(Enumeration<E>, A[])

Work items remaining for 3.1 M2:

    Consider repackaging PropertySource* types; eliminate internal use
    of SystemPropertyUtils and deprecate

    Further work on composition of Environment interface; consider
    repurposing existing PlaceholderResolver interface to obviate need
    for resolve[Required]Placeholder() methods currently in Environment.

    Ensure configurability of placeholder prefix, suffix, and value
    separator when working against an AbstractPropertyResolver

    Add JNDI-based Environment / PropertySource implementatinos

    Consider support for @Profile at the @Bean level

    Provide consistent logging for the entire property resolution
    lifecycle; consider issuing all such messages against a dedicated
    logger with a single category.

    Add reference documentation to cover the featureset.
2011-01-03 09:04:34 +00:00
Sam Brannen b130a36af7 [SPR-7850][SPR-7851] Upgraded to JUnit 4.8.1 and TestNG 5.12.1; added changelog entries for 3.1.0.M1. 2010-12-30 08:00:58 +00:00
Chris Beams 9f5fd3afcf Normalize indentation of Apache license URL
In accordance with recommendations at
http://www.apache.org/licenses/LICENSE-2.0.html.

A number of classes had strayed from this format, now all
are the same.
2010-12-22 21:40:19 +00:00
Chris Beams b3e36a335d Eliminate reserved 'default' profile (SPR-7778)
There is no longer a reserved default profile named 'default'. Rather,
users must explicitly specify a default profile or profiles via

    ConfigurableEnvironment.setDefaultProfiles(String...)
        - or -
    spring.profile.default="pD1,pD2"

Per above, the setDefaultProfile(String) method now accepts a variable
number of profile names (one or more).  This is symmetrical with the
existing setActiveProfiles(String...) method.

A typical scenario might involve setting both a default profile as a
servlet context property in web.xml and then setting an active profile
when deploying to production.
2010-12-08 07:59:25 +00:00
Chris Beams e693d9fa58 Polish JavaDoc 2010-12-08 07:58:47 +00:00
Chris Beams b50abc67de Add Hamcrest 1.1 as test-time dependency for .context
Provides a richer set of Matcher implementations than JUnit's hamcrest
package.
2010-12-07 06:56:55 +00:00
Chris Beams e0c5ced695 Use dot notation rather than camel case for profile props (SPR-7508)
Before this change, the following properties could be used to manipulate
Spring profile behavior:

    -DspringProfiles=p1,p2
    -DdefaultSpringProfile=pD

These properties have been renamed to follow usual Java conventions for
property naming:

    -Dspring.profile.active=p1,p2
    -Dspring.profile.default=pD
2010-12-05 20:14:26 +00:00
Chris Beams 5062dc31af Support default profile (SPR-7508, SPR-7778)
'default' is now a reserved profile name, indicating
that any beans defined within that profile will be registered
unless another profile or profiles have been activated.

Examples below are expressed in XML, but apply equally when
using the @Profile annotation.

EXAMPLE 1:

        <beans>
            <beans profile="default">
                <bean id="foo" class="com.acme.EmbeddedFooImpl"/>
            </beans>
            <beans profile="production">
                <bean id="foo" class="com.acme.ProdFooImpl"/>
            </beans>
        </beans>

    In the case above, the EmbeddedFooImpl 'foo' bean will be
    registered if:
        a) no profile is active
        b) the 'default' profile has explicitly been made active

    The ProdFooImpl 'foo' bean will be registered if the 'production'
    profile is active.

EXAMPLE 2:

        <beans profile="default,xyz">
            <bean id="foo" class="java.lang.String"/>
        </beans>

    Bean 'foo' will be registered if any of the following are true:
        a) no profile is active
        b) 'xyz' profile is active
        c) 'default' profile has explicitly been made active
        d) both (b) and (c) are true

Note that the default profile is not to be confused with specifying no
profile at all.  When the default profile is specified, beans are
registered only if no other profiles are active; whereas when no profile
is specified, bean definitions are always registered regardless of which
profiles are active.

The default profile may be configured programmatically:

    environmnent.setDefaultProfile("embedded");

or declaratively through any registered PropertySource, e.g. system properties:

    -DdefaultSpringProfile=embedded

Assuming either of the above, example 1 could be rewritten as follows:

        <beans>
            <beans profile="embedded">
                <bean id="foo" class="com.acme.EmbeddedFooImpl"/>
            </beans>
            <beans profile="production">
                <bean id="foo" class="com.acme.ProdFooImpl"/>
            </beans>
        </beans>

It is unlikely that use of the default profile will make sense in
conjunction with a statically specified 'springProfiles' property.
For example, if 'springProfiles' is specified as a web.xml context
param, that profile will always be active for that application,
negating the possibility of default profile bean definitions ever
being registered.

The default profile is most useful for ensuring that a valid set of
bean definitions will always be registered without forcing users
to explictly specify active profiles.  In the embedded vs. production
examples above, it is assumed that the application JVM will be started
with -DspringProfiles=production when the application is in fact in
a production environment.  Otherwise, the embedded/default profile bean
definitions will always be registered.
2010-12-01 09:01:58 +00:00
Chris Beams c8b4915891 Remove obsolete ConfigurationClassPostProcessor.getOrder() 2010-12-01 08:36:12 +00:00
Chris Beams 4214bc0735 Minor post-merge cleanup 2010-10-25 19:54:01 +00:00
Chris Beams f480333d31 Merge 3.1.0 development branch into trunk
Branch in question is 'env' branch from git://git.springsource.org/sandbox/cbeams.git; merged into
git-svn repository with:

    git merge -s recursive -Xtheirs --no-commit env

No merge conflicts, but did need to

    git rm spring-build

prior to committing.

With this change, Spring 3.1.0 development is now happening on SVN
trunk. Further commits to the 3.0.x line will happen in an as-yet
uncreated SVN branch.  3.1.0 snapshots will be available
per the usual nightly CI build from trunk.
2010-10-25 19:48:20 +00:00
Juergen Hoeller b0ea2b13d2 polishing 2010-10-20 21:15:22 +00:00
Ramnivas Laddad 92298469bf Fixed configuration of AnnotationAsyncExecutionAspect (was incorrectly under the same name as that for transaction management aspect) 2010-10-17 22:33:30 +00:00
Juergen Hoeller 8c9b64c948 added mode="proxy"/"aspectj" and proxy-target-class options to task namespace; switched to concise names for async aspects 2010-10-15 20:50:23 +00:00
Juergen Hoeller 1f1577e33e fixed @Value injection to correctly cache temporary null results for non-singleton beans (SPR-7614) 2010-10-14 19:49:29 +00:00
Juergen Hoeller 1933b648c3 fixed @Value injection to correctly cache temporary null results for non-singleton beans (SPR-7614) 2010-10-14 19:40:36 +00:00
Juergen Hoeller ae3cfff380 fixed JodaTimeContextHolder to use a non-inheritable ThreadLocal and expose a reset method (SPR-7441); use of remove() even when being called with a null argument 2010-10-11 18:55:21 +00:00
Juergen Hoeller 722778c74a SpEL MapAccessor consistently rejects "target.key" style access to Maps if no such key is found (SPR-7614) 2010-10-10 20:22:15 +00:00
Juergen Hoeller d78eda8aeb polishing 2010-10-10 18:31:43 +00:00
Juergen Hoeller 061063257a optimized @Bean error messages (SPR-7628, SPR-7629) 2010-10-10 18:31:03 +00:00
Juergen Hoeller b7b2a25953 fixed ApplicationContext event processing for repeated invocations to non-singleton listener beans (SPR-7563) 2010-10-01 22:16:21 +00:00
Juergen Hoeller 5f2d88f74a polishing 2010-09-09 09:04:40 +00:00
Chris Beams 6f69b7b752 Allow class-relative resource loading in GenericXmlApplicationContext (SPR-7530)
Before:

    - new GenericXmlApplicationContext("com/acme/path/to/resource.xml");

    - GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
      ctx.load("com/acme/path/to/resource.xml");
      ctx.refresh();

After:

    - The above remain supported, as well as new class-relative variants

    - import com.acme.path.to.Foo;
      new GenericXmlApplicationContext(Foo.class, "resource.xml");

    - import com.acme.path.to.Foo;
      GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
      ctx.load(Foo.class, "resource.xml");
      ctx.refresh();

These changes are generally aligned with signatures long available in
ClassPathXmlApplicationContext. As GenericXmlApplicationContext is
intended to be a more flexible successor to CPXAC (and FSXAC), it's
important that all the same conveniences are available.
2010-09-08 15:30:48 +00:00
Juergen Hoeller 479b4c1b84 added bean type to post-processing log statement (SPR-7524) 2010-09-06 20:06:48 +00:00
Juergen Hoeller 05a3f3ad8d avoid failures in case of manually registered null instance (SPR-7523) 2010-09-06 19:47:16 +00:00
Juergen Hoeller 3f68ccadd9 polishing 2010-09-01 18:41:10 +00:00
Juergen Hoeller e56cfb8173 consistent use of JDK 1.5's ThreadLocal.remove() over ThreadLocal.set(null), preventing leaks (SPR-7441) 2010-09-01 17:17:25 +00:00
Chris Beams b72cca5403 Fix memory leak in serializable bean factory management (SPR-7502)
GenericApplicationContext and AbstractRefreshableApplicationContext
implementations now call DefaultListableBeanFactory.setSerializationId()
only upon successful refresh() instead of on instantiation of the
context, as was previously the case with GAC.

DLBF.setSerializationId() adds the beanFactory to the *static*
DLBF.serializableFactories map, and while calling close() on the
application context removes entries from that map, it does so only if
the context is currently active (i.e. refresh() has been called).

Also, cancelRefresh() has been overridden in GAC just as it has been
in ARAC to accomodate the possibility of a BeansException being thrown.
In this case, the beanFactory serializationId will be nulled out and
the beanFactory removed from the serializableFactories map.

The SerializableBeanFactoryMemoryLeakTests test case provides full
coverage of these scenarios.
2010-08-27 10:53:20 +00:00
Ben Hale 7730e76c06 Publishing license and notice files 2010-08-23 13:17:31 +00:00
Arjen Poutsma dbfa049e1e Prepping for 3.0.5 2010-08-19 11:04:04 +00:00
Juergen Hoeller ee04046ed7 polishing 2010-08-15 23:04:19 +00:00
Juergen Hoeller 3cf22a0255 lazy creation of MessageFormats 2010-08-15 23:04:02 +00:00
David Syer 5109501d16 SPR-7463: switched to instance variable 2010-08-14 11:09:42 +00:00
Juergen Hoeller 8a23ce917a Spring's constructor resolution consistently finds non-public multi-arg constructors (SPR-7453) 2010-08-11 19:24:30 +00:00
Juergen Hoeller faad0f4bb1 AutodetectCapableMBeanInfoAssembler signature consistently refers to Class<?> (SPR-7405) 2010-07-29 20:29:32 +00:00
Juergen Hoeller 3e0003a1a0 TaskExecutorFactoryBean (as used by task:executor) exposes full ThreadPoolTaskExecutor type (SPR-7403) 2010-07-28 17:39:03 +00:00
Juergen Hoeller f04febaf2d fixed @PathVariable regression in combination with ConversionService usage on DataBinder 2010-07-26 20:14:57 +00:00
Juergen Hoeller 7304c09021 Spring field error arguments include actually declared annotation attributes in alphabetical order (SPR-6730) 2010-07-21 14:24:10 +00:00
Chris Beams 9bcfc5480d Fix dependency issues in .context pom and .classpath
Hibernate validator had been updated to 4.1.0 in the ivy metadata, but
not yet reflected in the .classpath file.  The pom.xml had been updated
but there was a typo - scope read 'coompile', instead of 'compile'.
2010-07-21 12:04:06 +00:00
Juergen Hoeller 11886f2149 polishing 2010-07-20 20:02:43 +00:00
Juergen Hoeller 1dce03af78 JSR-303 Pattern message resolvable through Spring MessageSource (despite special characters; SPR-7329) 2010-07-20 20:02:23 +00:00
David Syer 3afe8aee18 Fix hibernate-validatin version 2010-07-20 15:41:41 +00:00
David Syer e26fc66523 SPR-7384: switch to using 1-12 for month numbers 2010-07-20 15:25:00 +00:00
Juergen Hoeller 66abad2540 BeanWrapper preserves annotation information for individual array/list/map elements (SPR-7348) 2010-07-12 20:56:22 +00:00
Juergen Hoeller 263fabb0fc JSP EvalTag resolves "@myBeanName" references in expressions against the WebApplicationContext (SPR-7312); for consistency, expressions in an ApplicationContext support the same syntax against the local BeanFactory 2010-07-12 19:36:26 +00:00
Chris Beams cd271fca43 attempted to repro SPR-7318 to no avail 2010-06-28 22:57:26 +00:00
Juergen Hoeller 3f31a1cf75 added "validationMessageSource" property to LocalValidatorFactoryBean, for Spring-based messages (SPR-7307) 2010-06-28 22:08:31 +00:00
Juergen Hoeller 41d6f8e9ed turned formatter implementations non-final 2010-06-23 19:34:29 +00:00
Juergen Hoeller de06de11fe fixed order 2010-06-20 19:11:51 +00:00
Juergen Hoeller 07e9f1775b added test for invalid binding to ClassLoader 2010-06-20 19:11:36 +00:00
Arjen Poutsma b31c34ed7d Upgrading version to 3.0.4 2010-06-15 14:18:29 +00:00
Juergen Hoeller 0e59fc4a15 smarter guessing of the element type (SPR-7283) 2010-06-14 23:26:44 +00:00
Juergen Hoeller 2a140addfd added EmbeddedValueResolver support to FormattingConversionServiceFactoryBean (SPR-7087) 2010-06-08 20:40:54 +00:00
Juergen Hoeller 65622bd546 revised DefaultLifecycleProcessor's handling of circular dependencies to avoid stack overflow (SPR-7266) 2010-06-08 10:08:33 +00:00
Juergen Hoeller 392accd910 introduced EmbeddedValueResolverAware callback interface for convenient placeholder resolution 2010-06-07 22:41:21 +00:00
Juergen Hoeller 8446fd1b26 added assertions for correct postProcess invocation order 2010-06-07 22:36:19 +00:00
Juergen Hoeller 5f9b2db90b turn NotReadablePropertyException into JSR-303 oriented IllegalStateException 2010-06-07 22:30:11 +00:00
Juergen Hoeller d684e49462 added "expose-proxy" attribute to aop namespace (enforcing AopContext proxy exposure with CGLIB; SPR-7261) 2010-06-07 21:28:05 +00:00
Juergen Hoeller 5b420e20c7 revised TaskScheduler javadoc (SPR-7253) 2010-06-07 20:52:12 +00:00
Chris Beams 0dc29cb2d3 Added a test to prove that @Qualifier works in conjunction with @Bean methods after some confusion by users that it may not. 2010-06-02 12:58:59 +00:00
Juergen Hoeller dea5918d66 CronTrigger defensively protects itself against accidental re-fires if a task runs too early (SPR-7004) 2010-05-26 20:35:42 +00:00
David Syer b4af04ba9d SPR-7239: fix CronTrigger 2010-05-26 17:41:54 +00:00
Juergen Hoeller 1532119787 ConversionService is able to apply Converters to interface-based array elements (SPR-7150); a context ConversionService is able to override an ApplicationContext's resource editors (SPR-7079) 2010-05-26 13:58:37 +00:00
Juergen Hoeller b90fa49ebc polishing 2010-05-25 14:23:08 +00:00
Juergen Hoeller bca067abb2 ScheduledTaskRegistrar (as used for @Scheduled processing) properly shuts down its default executor (SPR-6901) 2010-05-25 14:22:49 +00:00
Juergen Hoeller 6fe5871e91 check for "org.joda.time.LocalDate" in order to catch JodaTime 1.3 and higher only (SPR-7222) 2010-05-20 08:30:32 +00:00
Juergen Hoeller 469e30b507 refined LifecycleProcessor exception handling, properly wrapping a start exception from a bean (SPR-7106) 2010-05-19 19:44:57 +00:00
Juergen Hoeller 2c2df7f555 consistent postProcessBeanFactory treatment for BeanDefinitionRegistryPostProcessors (SPR-7167) 2010-05-17 22:40:15 +00:00
Juergen Hoeller 2ad2022058 revised BeanWrapper's exception wrapping to consistently handle ConversionExceptions (SPR-7177) 2010-05-17 21:59:02 +00:00
Chris Beams 57a503b274 BeanDefinitionRegistryPostProcessors' postProcessBeanDefinitionRegistry() method now gets called before postProcessBeanFactory() (SPR-7167) 2010-05-17 16:21:36 +00:00
Juergen Hoeller 738d84f75c filter for duplicate listeners in "getApplicationListeners()" as well (SPR-7204) 2010-05-16 19:08:12 +00:00
Juergen Hoeller 68055ba4c9 AsyncAnnotationBeanPostProcessor consistently adds @Async processing as first Advisor in the chain (SPR-7147) 2010-05-13 22:13:29 +00:00
Juergen Hoeller 59d2d35f4a polishing 2010-05-13 14:44:34 +00:00
Juergen Hoeller 103c1aa82f exclude abstract lazy-init beans from MBean exposure as well (SPR-6784) 2010-05-13 14:38:58 +00:00
Costin Leau 159f98728e SPR-7137
+ fixed incorrect message when unregistering services from passed in registries
2010-04-29 14:42:24 +00:00
Juergen Hoeller 4cab4a7545 introspect decorated definition for getType calls as well (SPR-7006) 2010-04-21 20:06:38 +00:00
Keith Donald a71514222a preserving desc context for collection/map elements 2010-04-18 14:09:41 +00:00
Keith Donald ebbf63f4e0 polish 2010-04-17 06:47:08 +00:00
Keith Donald e6018afe8b restored resource conversion test 2010-04-17 06:31:34 +00:00
Keith Donald b9aeba23ef fixed failing test 2010-04-17 06:28:06 +00:00
Keith Donald 64d6a42dfd improved conversion system logging, collection converter simplification/polish, several optimizations, annotation-driven formatting caching 2010-04-17 04:43:28 +00:00
David Syer eb7f8309e2 Update version in POMs to 3.0.3 2010-04-15 10:26:14 +00:00
Juergen Hoeller 7f90e3bcf7 enable JPATraversableResolver to introspect test domain classes 2010-04-01 11:45:01 +00:00
Juergen Hoeller 092241a632 fixed decorated BeanDefinition condition for early type checking in AbstractBeanFactory (SPR-7006) 2010-03-31 15:21:48 +00:00
Juergen Hoeller 282de41f06 AbstractInterceptorDrivenBeanDefinitionDecorator exposes decorated BeanDefinition for early type checking in AbstractBeanFactory (SPR-7006) 2010-03-30 15:40:47 +00:00
Juergen Hoeller 53b6e1c1b0 fixed DataBinder's conversion error handling for direct field access with ConversionService (SPR-6953) 2010-03-24 17:40:45 +00:00
Juergen Hoeller 2c2cf32b8a polishing 2010-03-24 10:35:50 +00:00
Juergen Hoeller 89755542da BeanPostProcessors are allowed to return a null bean value in the middle of the chain (SPR-6926) 2010-03-24 10:34:21 +00:00
Mark Fisher 0d8a020684 updated commons-pool version in .classpath to match ivy config 2010-03-23 21:44:52 +00:00
Mark Pollack 1e388a894e Change version of Hibernate Validator to 4.0.2 in pom.xml and eclipse .classpath to agree with version in ivy.xml 2010-03-23 16:44:46 +00:00
Juergen Hoeller 296aa96d71 AopUtils.getTargetClass(...) never returns null (SPR-7011) 2010-03-22 18:31:13 +00:00
Juergen Hoeller a2c3274b8e fixed double fixedField call for getFieldType (SPR-7019) 2010-03-22 15:08:57 +00:00
Sam Brannen 0543036ec9 FooConfig, Foo, Bar, and BarFactory are now public static classes in order to avoid a bug with JDT/Spring IDE where the classes cannot be found in the XML application context. 2010-03-19 12:39:34 +00:00
Juergen Hoeller 4c39f90466 made CronSequenceGenerator public (SPR-6920) 2010-03-12 19:34:45 +00:00
David Syer 8d7df01d73 RESOLVED - issue SPR-6955, SPR-6901 added DisposableBean to TaskExecutorFactoryBean 2010-03-08 12:13:30 +00:00
Juergen Hoeller 0444ab236a fixed TypeDescriptor toString for MethodParameter annotations (SPR-6924) 2010-03-04 13:50:43 +00:00
Juergen Hoeller 9ede9fe697 "conversionService" bean gets ignored if not of type ConversionService (SPR-6916) 2010-03-04 11:27:09 +00:00
Costin Leau 20a8039642 + improve template for spring-context so that the import-package is updated automatically 2010-02-25 15:46:54 +00:00
Chris Beams f25d2a9416 Removed hard-coded local path from .core/.classpath; removed duplicate asm entry in .context/.classpath 2010-02-22 01:55:38 +00:00
David Syer 1a351db6e0 Update Central POMs to 3.0.2 2010-02-21 15:32:18 +00:00
Juergen Hoeller 5063c6dd00 upgraded to Hibernate Validator 4.0.2 and Jackson 1.4.2 2010-02-19 13:58:19 +00:00
Costin Leau 8d0bb00188 + make use or property placeholders inside template.mf 2010-02-19 09:43:22 +00:00
Juergen Hoeller 60ac239091 BeanDefinitionReader and ClassPath/FileSystemXmlApplicationContext use varargs where possible (SPR-6849) 2010-02-16 11:59:29 +00:00
Juergen Hoeller 870507cc36 context-specific "conversionService" bean may refer to annotation-configured converter beans (SPR-6800) 2010-02-15 00:42:39 +00:00
Juergen Hoeller 9adb01a4a6 added PropertyPlaceholderConfigurer test 2010-02-15 00:22:06 +00:00
Juergen Hoeller cdee538129 fixed rendering of select options for multi-list (SPR-6799) 2010-02-15 00:04:30 +00:00
Juergen Hoeller 315c16de5f relaxed test conditions 2010-02-12 00:02:32 +00:00
Juergen Hoeller 09998b2434 relaxed test conditions 2010-02-11 23:15:15 +00:00
Juergen Hoeller 3db5a299bb canConvert checks Collection/Map element types as well (SPR-6564) 2010-02-11 12:23:57 +00:00
Juergen Hoeller cef44f6d53 made PersistenceAnnotationBeanPostProcessor's JNDI API references optional - for compatibility with Google App Engine (SPR-6679) 2010-02-11 11:36:33 +00:00
Juergen Hoeller 03e9e4568f avoid double closing in case of shutdown hook (SPR-6793) 2010-02-10 13:49:51 +00:00
Juergen Hoeller b670b19429 setAutoGrowNestedPaths throws an IllegalStateException if being called too late (SPR-6718) 2010-02-09 15:54:48 +00:00
Costin Leau a9386f5c79 SPR-5246
+ clarify order of annotation and XML injection
2010-02-09 11:17:07 +00:00
Chris Beams 0f7f749ada Updated Eclipse .classpath to aspectj 1.6.8 2010-02-04 13:45:14 +00:00
Juergen Hoeller 82178b8d93 ignore IllegalStateException when removing shutdown hook (SPR-6793) 2010-02-04 12:30:39 +00:00
Costin Leau 0fd4a45070 + upgrade to AspectJ 1.6.8
+ externalize some of the jar versions
+ align the versions of some dependencies between pom.xml and ivy.xml
2010-02-04 11:46:21 +00:00
Costin Leau ac93b81a78 SPR-6794
+ fix test
2010-02-04 11:33:58 +00:00
Costin Leau 4f0876de39 SPR-6794
+ added setter for encoding (in case the default UTF-8 is not enough)
2010-02-04 10:13:04 +00:00
Costin Leau fab29dfee7 + add explicit dependency on commons-pool to prevent version 1.3 from being used (since it contains a memory leak) 2010-02-04 10:05:54 +00:00
Costin Leau 0224cbc3de SPR-6794
+ used UTF-8 as the implicit encoding for reading scripts
2010-02-04 10:04:48 +00:00
Juergen Hoeller 4d09809f17 ApplicationListeners will reliably get invoked through their proxy (if any) 2010-02-03 23:52:56 +00:00
Juergen Hoeller ce6f14bd8b refined addApplicationListener to work any time during the refresh phase 2010-02-03 23:09:42 +00:00
Juergen Hoeller d96a6914a8 ApplicationListeners will get detected lazily as well (e.g. on @Bean's concrete result); inner bean ApplicationListeners will be invoked through their proxy (if any) 2010-02-03 22:54:59 +00:00
Juergen Hoeller e3cdabfaac fixed MBeanExporter regression: do not try to expose abstract beans (SPR-6784) 2010-02-01 17:56:03 +00:00
Juergen Hoeller 56d2c9daf5 component-scan's scoped-proxy attribute applies to scope-annotated singleton beans as well (SPR-6683) 2010-02-01 16:30:21 +00:00
Juergen Hoeller 83c018a0b4 call processConfigBeanDefinitions lazily if postProcessBeanDefinitionRegistry hasn't been called 2010-01-31 16:10:11 +00:00
Juergen Hoeller a897e3f01f refined DefaultLifecycleProcessor's start/stop logging and stop exception handling (SPR-6769, SPR-6770) 2010-01-31 15:52:13 +00:00
Juergen Hoeller 59b8a139d7 JndiObjectFactoryBean explicitly only chooses public interfaces as default proxy interfaces (SPR-5869) 2010-01-31 14:59:27 +00:00
Juergen Hoeller 9c44f9252d fixed cron example (SPR-6772) 2010-01-31 14:17:44 +00:00
Juergen Hoeller 6070a498fe BeanNameAutoProxyCreator detects alias matches for specified bean names as well (SPR-6774) 2010-01-31 14:12:48 +00:00
Juergen Hoeller 6b2b5c4c23 introduced BeanDefinitionRegistryPostProcessor extension to BeanFactoryPostProcessor; @Configuration classes support definition of BeanFactoryPostProcessor beans as well (SPR-6455, SPR-6611) 2010-01-31 14:05:28 +00:00
Chris Beams fbd797e50b RESOLVED - issue SPR-6779: imported @Configuration classes do not get enhanced and fail to satisfy scoping requirements
refactoring, polishing.
2010-01-29 23:31:53 +00:00