Commit Graph

759 Commits

Author SHA1 Message Date
Keith Donald
1a2f96000e clarified repository definition from DDD and removed comparison with DAO to reduce confusion 2011-09-13 14:31:41 +00:00
Chris Beams
2e5f3559d3 Fix handling of @EnableLoadTimeWeaving AUTODETECT
Issue: SPR-8643
2011-09-03 22:37:16 +00:00
Costin Leau
d9de19d7b3 SPR-8653
+ refactor a bit the internals of CacheAspect to allow invocations that do not throw any exceptions (AspectJ)
2011-09-02 15:37:42 +00:00
Chris Beams
6db594c79d Register JndiPropertySource by default in servlet environments
Prior to this change, StandardServletEnvironment evaluated a
"jndiPropertySourceEnabled" flag to determine whether or not to add a
JndiPropertySource.  Following the changes introduced in SPR-8490, there
is now no reason not to enable a JNDI property source by default. This
change eliminates the support for "jndiPropertySourceEnabled" and adds
a JndiPropertySource automatically.

Issue: SPR-8545, SPR-8490
2011-08-20 03:02:31 +00:00
Sam Brannen
7f715ee803 Fixed minor typo in Javadoc. 2011-08-18 14:18:29 +00:00
Costin Leau
63a217a40a + add XML support for cache abstraction (cache-advice) - DRAFT 2011-08-16 17:35:01 +00:00
Juergen Hoeller
4acb0fa284 introduced ForkJoinPoolFactoryBean for Java 7 (alternative: add new jsr166.jar to Java 6) 2011-08-15 16:41:55 +00:00
Juergen Hoeller
b9ebdd28fb polishing 2011-08-12 10:02:12 +00:00
Chris Beams
6404440cbf Fix typo in SmartLifecycle Javadoc
Issue: SPR-8570
2011-08-04 14:07:36 +00:00
Chris Beams
272f145132 Clarify Lifecycle#stop documentation
Issue: SPR-8570
2011-08-03 06:01:20 +00:00
Chris Beams
35d2ab3bf9 Document Lifecycle#stop concurrency semantics
Issue: SPR-8570
2011-07-29 21:39:42 +00:00
Juergen Hoeller
39616d4a25 polishing 2011-07-28 20:26:34 +00:00
Chris Beams
3c2e48738a Remove CacheProxyFactoryBean 2011-07-26 22:29:09 +00:00
Chris Beams
2b371a7c9a Deprecate TransactionProxyFactoryBean 2011-07-26 22:29:04 +00:00
Juergen Hoeller
abdae3d26b general revision of cache package; added ConcurrentMapCacheManager 2011-07-22 09:32:56 +00:00
Juergen Hoeller
48de81deec refined JBoss 6.0 note 2011-07-21 09:51:23 +00:00
Juergen Hoeller
7d8aa05c40 added "acceptProxyClasses" flag to RemoteInvocationSerializingExporter 2011-07-21 09:04:42 +00:00
Juergen Hoeller
2c199cf190 updated javadoc for server-specific LoadTimeWeavers 2011-07-21 08:36:40 +00:00
Chris Beams
718f025d64 Force lazy-init to false when parsing scheduled:task
A <scheduled:task> element declared within a
<beans default-lazy-init="true"> element represents a contradiction in
terms: such a task will never be executed.

For this reason, we now override any inherited lazy-init settings
when parsing <scheduled:task> elements, forcing lazy-init to false
for the underlying ScheduledTaskRegistrar bean.

Thanks to Mike Youngstrom for contributing an initial patch.

Issue: SPR-8498
2011-07-19 23:00:12 +00:00
Costin Leau
1d690ab99f SPR-8533
+ add LTW support for JBoss 7
(renamed existing classes to MC (JBoss 5&6) and introduced Modules (JBoss 7))
2011-07-19 07:24:47 +00:00
Juergen Hoeller
d97a5bf889 minor javadoc revision 2011-07-18 21:50:15 +00:00
Juergen Hoeller
94ac883eb1 polishing 2011-07-18 21:37:24 +00:00
Chris Beams
236b0305e8 Refactor execution of config class enhancement
This change returns the invocation order of
ConfigurationClassPostProcessor#enhanceConfigurationClasses to its
pre-3.1 M2 state. An earlier (and now unnecessary) refactoring in
service of @Feature method processing caused the change that this now
reverts.
2011-07-18 21:23:55 +00:00
Juergen Hoeller
c0e429a9a5 polishing 2011-07-15 14:48:51 +00:00
Juergen Hoeller
5937779bb1 call setEnvironment before other awareness methods rather than after; fixed AccessControlContext applicability check 2011-07-15 14:40:38 +00:00
Costin Leau
4e1cb2b823 move default value wrapper into support package (rather then interceptor) 2011-07-15 14:13:22 +00:00
Chris Beams
fd42a65c6c Allow ConfigurationCPP to process multiple registries
Prior to this change, an instance of ConfigurationClassPostProcessor
would throw IllegalStateException if its
postProcessBeanDefinitionRegistry method were called more than once.
This check is important to ensure that @Configuration classes are
not proxied by CGLIB multiple times, and works for most normal use
cases.

However, if the same CCPP instance is used to process multiple
registries/factories/contexts, this check creates a false negative
because it does not distinguish between invocations of
postProcessBeanDefinitionRegistry across different registries.

A use case for this, though admittedly uncommon, would be creating
a CCPP instance and registering it via
ConfigurableApplicationContext#addBeanDefinitionPostProcessor against
several ApplicationContexts. In such a case, the same CCPP instance
will post-process multiple different registry instances, and throw the
above mentioned exception.

With this change, CCPP now performs lightweight tracking of the
registries/beanFactories that it has already processed by recording
the identity hashcodes of these objects.  This is only slightly more
complex than the previous boolean-based 'already processed' flags, and
prevents this issue (however rare it may be) from occurring.

Issue: SPR-8527
2011-07-13 23:30:57 +00:00
Chris Beams
c5463a2e52 Move ImportSelector.Context to a top-level class
Issue: SPR-8411, SPR-8494
2011-07-13 23:28:53 +00:00
Costin Leau
f5fdedea60 + fix compilation error 2011-07-13 13:51:20 +00:00
Costin Leau
b82ab4950d + removed unneeded generic 2011-07-13 12:58:09 +00:00
Chris Beams
431e935011 Fix APC registration for @EnableTransactionManagement
Prior to this change, @EnableTransactionManagement (via the
ProxyTransactionManagementConfiguration class) did not properly
register its auto-proxy creator through the usual AopConfigUtils
methods.  It was trying to register the APC as a normal @Bean method,
but this causes issues (SPR-8494) with the logic in
AopConfigUtils#registerOrEscalateApcAsRequired, which expects the APC
bean definition to have a beanClassName property.  When the APC is
registered via a @Bean definition, it is actually a
factoryBean/factoryMethod situation with no directly resolvable
beanClass/beanClassName.

To solve this problem, ImportSelector#selectImports has been refactored
to accept an ImportSelector.Context instance. This object contains the
AnnotationMetadata of the importing class as well as the enclosing
BeanDefinitionRegistry to allow for the kind of conditional bean
registration necessary here. In this case, the bean definition that
must be registered conditionally is that of the auto-proxy creator.
It should only be registered if AdviceMode == PROXY, and thus the
ImportSelector is an appropriate place to make this happen.  It must
happen as a BeanDefinition (rather than a @Bean method) for
compatibility with AopConfigUtils, and working with the
BeanDefinitionRegistry API allows for that. This change does mean that
in certain cases like this one, #selectImports has container modifying
side effects. Documentation has been updated to reflect.

Issue: SPR-8411, SPR-8494
2011-07-11 01:17:19 +00:00
Juergen Hoeller
c07eb6bb9a added "disabled" property to EhCacheFactoryBean 2011-07-04 22:14:05 +00:00
Juergen Hoeller
4c75054f90 DataBinder uses a default limit of 256 for array/collection auto-growing (SPR-7842) 2011-07-03 19:26:49 +00:00
Chris Beams
d9ee958d88 Refactor JndiPropertySource
Prior to this change, JndiPropertySource worked directly against a JNDI
Context instance as its 'source' object.  This works well enough, but is
not nearly as fully-featured as Spring's existing JndiLocatorDelegate.

This change refactors JndiPropertySource from relying on an underlying
Context to relying on an underlying JndiLocatorDelegate.  By default,
the delegate's "resourceRef" property is set to true, meaning that the
implementation will always try to prepand a given name with
"java:comp/env/" before looking up the name, and upon failure will drop
back to the given name sans prefix.

See JndiPropertySource Javadoc for complete details.

Issue: SPR-8490
2011-07-02 21:26:44 +00:00
Chris Beams
ce0a0ff3d4 Move JNDI_PROPERTY_SOURCE_ENABLED_FLAG constant
Move JNDI_PROPERTY_SOURCE_ENABLED_FLAG from JndiPropertySource to
StandardServletEnvironment, as this is the only context in which the
constant makes sense.
2011-07-02 21:26:38 +00:00
Chris Beams
ea6d363c1e Return null from JndiPropertySource on lookup failure
Issue: SPR-8490
2011-07-02 21:26:30 +00:00
Costin Leau
26dbfba6c0 SPR-8477
+ add no-op cache implementations suitable for cache declarations w/o a backing store
2011-06-30 18:17:39 +00:00
Chris Beams
41e5d55d52 Fix bridge method detection for class hierarchies
Prior to this change, @Autowired injection against an instance of a
subclass having different visibility than its superclass would fail
if the @Autowired method is declared only in the superclass. This is due
to an apparent change in the rules around bridge method generation
between Java 5 and Java 6, and possibly even varying across compiler
vendors.

Now, BridgeMethodResolver is used consistently when detecting
@Autowired, @Inject and @Resource metadata to bypass these bridge
methods if they exist.

Issue: SPR-7900
2011-06-21 14:59:37 +00:00
David Syer
64fd0b081d SPR-6268: Add proxy-target-class to <lang:groovy/> 2011-06-17 12:14:01 +00:00
Chris Beams
4fc386a4f5 Provide default ParameterNameDiscoverer for AACBF
Prior to this change, AbstractAutowireCapableBeanFactory did not support
a default ParameterNameDiscoverer.  This meant that attempting to use
<constructor-arg name=".."> syntax would fail (with a fairly obscure
exception) as that feature depends on a ParameterNameDiscoverer to
introspect the constructor arguments.

This lack of a default was originally intended to avoid a dependency on
ASM, but now that (a) .asm is a built-in module and (b) .beans has a
non-optional compile-time dependency on .asm, there is no reason not to
provide this default.

The net effect is that in a number of locations throughout the
framework, namely in GenericApplicationContext and
AbstractRefreshableApplicationContext, it is no longer necessary to
explicitly call AACBF#setParameterNameDiscoverer. This also means that
using a naked BeanFactory (likely for testing scenarios) is that much
easier.

Issue: SPR-8184
2011-06-17 09:47:19 +00:00
Juergen Hoeller
5c1e86b47f refined WebLogic RMI descriptor to only mark 'getTargetInterfaceName' method as idempotent (SPR-8369) 2011-06-14 15:07:23 +00:00
Chris Beams
234bca6462 Resolve ${...} placeholders in @PropertySource
Issue: SPR-8442
2011-06-13 04:23:08 +00:00
Chris Beams
799785abad Polish @EnableScheduling Javadoc 2011-06-12 06:56:37 +00:00
Chris Beams
2d68b726b5 Add syntax highlighting to Javadoc where necessary
Issue: SPR-8426
2011-06-12 06:56:17 +00:00
Chris Beams
ae61aa3555 Revert introduction of AnnotationConfigCapableAC
Per review with Juergen in light of SPR-8413, which will revisit the
overall structure of ACAC and ACWAC.

Issue: SPR-8365, SPR-8413
2011-06-09 02:54:34 +00:00
Chris Beams
4a3c1292bc Preserve DefaultContextLoadTimeWeaver no-arg ctor
Issue: SPR-8317
2011-06-06 13:15:10 +00:00
Chris Beams
620018d16b Introduce @EnableLoadTimeWeaving
Issue: SPR-8317
2011-06-06 08:31:18 +00:00
Mark Fisher
72420c79cb SPR-8205 added support for a 'trigger' attribute (bean ref) on scheduled-task elements 2011-06-03 18:54:21 +00:00
Oliver Gierke
c7a350cde7 SPR-7477 - Added lazy-init attribute to jee namespace 2011-06-03 08:51:56 +00:00
Sam Brannen
74b169e886 [SPR-8393] AnnotatedBeanDefinitionReader's constructor now inherits the Environment of supplied BeanDefinitionRegistry. 2011-06-02 17:33:12 +00:00