Commit Graph

5279 Commits

Author SHA1 Message Date
Juergen Hoeller
2b4e25b6f3 Fixed typos in javadoc 2012-11-29 23:11:04 +01:00
Juergen Hoeller
9929810610 Removed accidentally added DestructionAwareAttributeHolder class 2012-11-29 23:09:24 +01:00
Juergen Hoeller
4058f693e5 DefaultMessageListenerContainer allows for concurrent subscription consumers on WebLogic/ActiveMQ
Issue: SPR-10037
2012-11-29 23:08:46 +01:00
Juergen Hoeller
959ab7a5db Preparations for 3.1.4 2012-11-25 23:41:57 +01:00
Juergen Hoeller
bed2134736 CachedIntrospectionResults uses full WeakReference for any non-safe ClassLoader arrangement
Previously, CachedIntrospectionResults had three modes of caching, with the intermediate mode relying on WeakReferences in the JDK PropertyDescriptor implementation. Since the JDK is actually using SoftReferences there these days, losing information in case of a GC run with tough memory constraints, we want to allow for hard references in PropertyDescriptor objects and therefore use a full WeakReference for the CachedIntrospectionResults object itself.

Issue: SPR-10028
2012-11-25 23:36:59 +01:00
Juergen Hoeller
dd68fecbf2 Avoid wide locks in order to remove deadlock potential in case of multi-threaded singleton creation/destruction
Issue: SPR-10020
Issue: SPR-8471
2012-11-25 23:33:05 +01:00
Juergen Hoeller
667438ddb0 Polishing 2012-11-25 22:29:05 +01:00
Juergen Hoeller
f4532ad704 Avoid a hard dependency on Sun's CachedRowSetImpl class 2012-11-25 22:21:01 +01:00
Juergen Hoeller
0deacb9fa1 Oracle OC4J support will be deprecated in favor of Oracle WebLogic as of Spring 3.2 2012-11-25 21:04:06 +01:00
Chris Beams
0ee12563b0 Overhaul non-void JavaBean write method support
This change revisits the implementation of ExtendedBeanInfo, simplifying
the overall approach while also ensuring that ExtendedBeanInfo is fully
isolated from the BeanInfo instance it wraps. This includes any existing
PropertyDescriptors in the wrapped BeanInfo - along with being copied
locally into ExtendedBeanInfo, each property descriptor is now also
wrapped with our own new "simple" PropertyDescriptor variants that
bypass the soft/weak reference management that goes on in both
java.beans.PropertyDescriptor and java.beans.IndexedPropertyDescriptor,
maintaining hard references to methods and bean classes instead. This
ensures that changes we make to property descriptors, e.g. adding write
methods, do not cause subtle conflicts during garbage collection (as was
reported and reproduced in SPR-9702).

Eliminating soft/weak reference management means that we must take extra
care to ensure that we do not cause ClassLoader leaks by maintaining
hard references to methods, and therefore transitively to the
ClassLoader in which the bean class was loaded. The forthcoming
SPR-10028 addresses this aspect.

See the updated ExtendedBeanInfo Javadoc for further details.

Issue: SPR-8079, SPR-8175, SPR-8347, SPR-8432, SPR-8491, SPR-8522,
       SPR-8806, SPR-8931, SPR-8937, SPR-8949, SPR-9007, SPR-9059,
       SPR-9414, SPR-9453, SPR-9542, SPR-9584, SPR-9677, SPR-9702,
       SPR-9723, SPR-9943, SPR-9978, SPR-10028, SPR-10029
Backport-Commit: 4a8be69099
Conflicts:
	spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfoFactory.java
2012-11-25 13:08:20 +01:00
Spring Buildmaster
e0b29b708c Increment version to 3.1.4.BUILD-SNAPSHOT 2012-10-31 18:14:06 +01:00
Spring Buildmaster
6c36240055 Release version 3.1.3.RELEASE 2012-10-31 18:12:45 +01:00
Chris Beams
a844712908 Update release date in readme 2012-10-31 14:12:11 +01:00
Juergen Hoeller
03c3dc3dae Clarified ServletConfigAware behavior in case of no ServletConfig being available
Issue: SPR-9855
2012-10-31 09:02:48 +01:00
Juergen Hoeller
9caf672f21 Added proper synchronization and not-null check to SimpleMessageListenerContainer's doShutdown
Issue: SPR-9930
2012-10-31 08:53:29 +01:00
Juergen Hoeller
9d78f17176 Adapted PropertySourcesPropertyResolverTests for different error message format 2012-10-31 02:44:48 +01:00
Juergen Hoeller
245d3114a8 Final preparations for 3.1.3 release 2012-10-31 02:23:50 +01:00
Juergen Hoeller
4169898842 Fix circular placeholder prevention
Issue: SPR-5369
2012-10-31 02:18:43 +01:00
Juergen Hoeller
e491d990de Minor polishing 2012-10-31 02:10:11 +01:00
Juergen Hoeller
6d6eaf8506 Added test for custom async annotation 2012-10-31 02:09:26 +01:00
Juergen Hoeller
a6bcda25c2 Portlet mapping predicate compareTo implementations are transitive now
Also removed unused validateHandler code with dead cachedMappings HashMap.

Issue: SPR-9874
2012-10-31 01:41:19 +01:00
Juergen Hoeller
7702fb8513 Added "jtaDataSource" property to JPA LocalContainerEntityManagerFactoryBean (for default units)
Issue: SPR-9883
2012-10-31 01:08:03 +01:00
Juergen Hoeller
b17d53ffae DispatcherPortlet uses a forward for rendering a view as resource response
Issue: SPR-9876
2012-10-31 00:50:46 +01:00
Phillip Webb
7f081a5eb4 Update changelog 2012-10-28 11:59:42 -07:00
Gareth Davis
983e2ce64f Allow 'arg-type' matches against element body
Allow the body of 'arg-type' XML elements to be used as an alternative to
'match' attribute when defining a 'replace-method' in XML configuration.

This change has been introduced primarily to support the samples printed
in the Apress 'Pro Spring' book.

Issue: SPR-9812
Backport-Issue: SPR-9929
Backport-Commit: 0709c033a0
2012-10-28 11:52:22 -07:00
Phillip Webb
ea49c8b840 Polish whitespace 2012-10-28 11:13:46 -07:00
Chris Beams
2cfd15899d Fix split package introduced by @EnableSpringConfigured
Commit 6263c9abf9
@EnableSpringConfigured from beans.factory.aspectj =>
context.annotation within the spring-aspects module. This resolved a
package cycle but had the side-effect of causing a "split package" [1]
problem between spring-context and spring-aspects in OSGi-based
classloader environments because the context.annotation package now
exists in both modules.

The simplest and best solution from an OSGi perspective is to relocate
@EnableSpringConfigured and its supporting SpringConfiguredConfiguration
class into a new package. This commit moves both these types into
context.annotation.aspectj, following convention with other such
"aspectj"-qualified packages in the spring-aspects module.

As with the previous move, it is presumed this change will be low-impact
as the "spring-configured" approach to domain object injection is a
niche feature to begin with, and @EnableSpringConfigured has existed in
its current location only since 3.1.2 and this change is being made in
time for 3.1.3.

[1]: http://wiki.osgi.org/wiki/Split_Packages

Issue: SPR-9811, SPR-9441
Backport-Commit: 54db7387de
2012-10-26 14:06:47 +02:00
Sam Brannen
d8dc4a257a Support comments in SQL scripts in JdbcTestUtils
Prior to this commit, utility methods in JdbcTestUtils interpreted SQL
comments as separate statements, resulting in an exception when such a
script is executed.

This commit addresses this issue by introducing a
readScript(lineNumberReader, String) method that accepts a comment
prefix. Comment lines are therefore no longer returned in the parsed
script. Furthermore, the existing readScript(lineNumberReader) method
now delegates to this new readScript() method, supplying "--" as the
default comment prefix.

Issue: SPR-9593
Backport-Commit: 4aaf014cc6
2012-10-26 10:45:56 +02:00
Chris Beams
00ed17dca0 Update Apache license header date
Issue: SPR-9853
Backport-Commit: 8a38891e15
2012-10-25 09:24:36 +02:00
Phillip Webb
410b9f933e Update changelog 2012-10-24 11:00:49 -07:00
Phillip Webb
a0745c0c0a Support SQL exception translation for ORA-06550
Oracle error ORA-06550 will now raise a BadSqlGrammarException.

Issue: SPR-9853
Backport-Commit: ba5a148d8d
2012-10-24 10:46:06 -07:00
Phillip Webb
cfdd50d8ab Polish whitespace 2012-10-24 10:45:29 -07:00
Phillip Webb
e3136e65f4 Allow MapToMap conversion even w/out default ctor
MapToMap conversion now works when the target map does not have a
default constructor (as long as a new map copy is not required).

Issue: SPR-9284
Backport-Commit: 38c4393592
2012-10-24 19:31:24 +02:00
Phillip Webb
ced6bb4569 Prevent memory leaks with @Configuration beans
Refactor ConfigurationClassEnhancer to allow cglib caching of
generated classes.  Prior to this commit each enhanced @Configuration
class would consume permgen space when created.

The CallbackFilter and Callback Types are now defined as static final
members so that they can be shared by all enhancers.  Only the
callbackInstances remain specific to a @Configuration class and
these are not used by cglib as part of the cache key.

Issue: SPR-9851
Backport-Commit: c8061393fb
2012-10-24 19:12:03 +02:00
Phillip Webb
4525527794 SpEL support for methods and properties on class …
Update the ReflectiveMethodResolver and ReflectivePropertyAccessor
to allow methods and properties of java.lang.Class to be resolved
when the target object is a class.

Issue: SPR-9017
Backport-Commit: d28592a6c6
2012-10-24 18:04:10 +02:00
Phillip Webb
98075c33c6 Chain exception cause on create failure
Propogate root cause of exceptions thrown from createCollection
and createMap.

Issue: SPR-9285
Backport-Commit: 2e48656906
2012-10-24 15:47:11 +02:00
Chris Beams
4cee691d09 Remove accidentally introduced SpEL test method
SpringEL300Tests's #testArray method was originally introduced with
SPR-9203, which has not yet been backported to 3.1.x. During the process
of backporting SPR-9486 functionality, this method was accidentally
introduced, causing false negative test failures. This commit removes
the offending test method.

Issue: SPR-9203, SPR-9486
2012-10-24 14:32:48 +02:00
Chris Beams
347737290e Update SpEL test to reflect native float support
Issue: SPR-9486
Backport-Commit: 59fb67e38d
2012-10-24 14:31:37 +02:00
Satyapal Reddy
a94677e7b6 Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.

Issue: SPR-9486
Backport-Commit: be8f23d756
2012-10-24 14:09:33 +02:00
Phillip Webb
ca386c13fc Close 'beans' tag in MVC namespace documentation
Issue: SPR-9898
Backport Issue: SPR-9906
2012-10-22 10:07:51 -07:00
Rossen Stoyanchev
f9eacf9c1f Update changelog 2012-10-22 12:41:27 -04:00
Rossen Stoyanchev
88906d271b Improve regex for parsing query params
Previously UriComponentsBuilder used a regular expression for parsing
query name-value pairs where both name and value were expected to not
contain neither '&', not '='. The idea is that the presence of reserved
characters makes it impossible to guess correctly how to parse the
query string (e.g. a=b&c).

This change relaxes the constraint on query param values, allowing them
to contain '='. In effect '&' is the ultimate separator of name-value
pairs, and any '=' in values is ignored. For example "q=1USD=?EUR" is
interpreted as "q equals '1USD=?EUR'".

Issue: SPR-9832
2012-10-22 11:08:56 -04:00
Rossen Stoyanchev
d8166d6155 Decode target parameters prior to saving a FlashMap
The target parameters for a FlashMap must be decoded to be able to
match them to the parameters of incoming requests given that the
HttpServletRequest returns decoded request parameters.

Issue: SPR-9657
Backport Issue: SPR-9701
2012-10-14 21:37:29 -04:00
Rossen Stoyanchev
4fccd1799a Fix issue with resolving Errors controller argument
The ErrorsMethodArgumentResolver expects the preceding @ModelAttribute
in the controller method signature to be the last one added in the
model -- an assumption that can break if a model attribute is added
earlier (e.g. through a @ModelAttribute method) and more attributes
are added as well. This fix ensures when an @ModelAttribute is resolved
as a controller method argument it has the highest index in the model.

Issue: SPR-9378
Backport Issue: SPR-9687
2012-10-14 21:28:45 -04:00
Chris Beams
9187eeff27 Make required spring-web's dependence on spring-aop
Prior to this commit spring-web's dependence on spring-aop was marked
optional, however spring-web's required dependence on spring-context
transitively forces a required dependence on spring-aop anyway.

This change marks spring-aop as a required dependency of spring-web,
which a) reflects the poms created by the 3.2 Gradle build and b) helps
solve dependency issues when using higher-level Spring projects such as
Spring Security.

Issue: SPR-9573
2012-10-12 14:24:59 -07:00
Juergen Hoeller
2ab55414e5 Polishing 2012-10-12 23:07:10 +02:00
Juergen Hoeller
c90e2c6f10 Made AutoProxyCreatorTests less dependent on container's own interrogation of FactoryBeans
Issue: SPR-9857
2012-10-12 23:06:15 +02:00
Juergen Hoeller
506e9f50d0 LoadTimeWeaverAware beans are consistently being created early for JPA weaving to work reliably
Reverted change for @Bean methods that declare FactoryBean as their return type: The effects of trying to create the FactoryBean to find out about its implementation type are too far-reaching. It's better to recommend declaring a specific return type in the method signature if you want the container to specifically react to your implementation type.

Issue: SPR-9857
2012-10-12 22:56:08 +02:00
Juergen Hoeller
2564db2bfd LoadTimeWeaverAware beans are consistently being created early for JPA weaving to work reliably
Includes a change for factory methods that declare their return type as FactoryBean: When asked for a specific type match (e.g. LoadTimeWeaverAware), we do check early singleton instances as well (reusing the instances that we create for getObjectType checks). This is necessary in order to make @Bean method introspection as capable as XML bean definition introspection, even in case of the @Bean method using a generic FactoryBean declaration for its return type (instead of the FactoryBean impl class).

Issue: SPR-9857
2012-10-12 17:13:07 +02:00
Juergen Hoeller
13edc93f78 Only cache by-type lookups if configuration has been marked as frozen
Issue: SPR-9448
2012-10-12 16:44:04 +02:00