Commit Graph

6015 Commits

Author SHA1 Message Date
Juergen Hoeller 3d5bfc35b6 Deprecated Oracle OC4J support in favor of Oracle WebLogic 2012-11-25 21:00:56 +01:00
Juergen Hoeller 9772eb8410 Deprecated Spring's own JSP expression evaluation
Since web applications declaring a Servlet 2.3 web.xml become really rare now, we're finally deprecating Spring's own ExpressionEvaluationUtils class. As a consequence, we're also setting "springJspExpressionSupport" to false by default, avoiding the potential double EL evaluation problem on pre-Servlet-3.0 containers.

Issue: SPR-5308
2012-11-25 20:50:53 +01:00
Juergen Hoeller c368068c0c 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 20:43:27 +01:00
Juergen Hoeller df76f1497a Replaced use of EmbeddedValueResolverAware with ConfigurableBeanFactory's resolveEmbeddedValue in order to avoid a package cycle with the org.springframework.context package
Issue: SPR-10021
2012-11-25 20:18:59 +01:00
Sam Brannen 202b15e19b Fix typo and polish formatting 2012-11-25 15:57:15 +01:00
Chris Beams 4a8be69099 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
2012-11-25 12:28:20 +01:00
Rossen Stoyanchev 2d8bacace7 Set the ApplicationContext prop of ExceptionResolver
The MVC Java config now sets the ApplicationContext property of
ExceptionHandlerExceptionResolver.

Issue: SPR-9997
2012-11-23 15:12:52 -05:00
Rossen Stoyanchev e3681c107d Set response to 503 for async requests that time out
Issue: SPR-10002
2012-11-22 15:39:22 -05:00
Chris Beams 631f24bb32 Introduce jdiff Gradle task
The new jdiff task generates a report of API differences between the
current version (i.e. the value of `version` in gradle.properties) and
any older version of the framework, as specified by -DOLD_VERSION at
the command line, or defaulting to `previousVersion` in
gradle.properties.

Running the command requires a separate clone directory pinned to the
desired old version, as specified by -DOLD_VERSION_ROOT at the command
line. This creates challenges from a build automation perspective,
largely because Gradle doesn't (yet) have APIs for working with Git.

This task may be further automated and included in nightly CI runs, but
in the meantime, a number of reports back to 3.1.3.RELEASE have been
generated manually and uploaded to [1], where one can now find the
following entries in the directory listing:

 - 3.1.3.RELEASE_to_3.2.0.RC1
 - 3.2.0.M1_to_3.2.0.M2
 - 3.2.0.M2_to_3.2.0.RC1
 - 3.2.0.RC1_to_3.2.0.BUILD-SNAPSHOT

Ideally, the final entry there would be kept up-to-date on a daily
basis - again we may revisit doing so in the future. Going forward,
reports will be generated and uploaded manually on an as needed basis
and as part of the release process.

The goal of these reports are as follows:

 - to ease the process of ensuring backward compatibility

 - to aid in code reviews, particularly when reviewing large pull
   requests

 - to ease the process of creating migration guides for project
   maintainers, i.e. to help us remember what's changed

 - to allow ambitious end-users to discover what's been changing at the
   API level without without needing to wait for detailed "what's new in
   version X" and/or migration guide documentation

See documentation in jdiff.gradle for usage details.

Note that the jdiff-1.1.1 distribution as downloaded from [2] has been
added wholesale to the source tree under gradle/jdiff instead of
uploading JDiff jars to repo.springsource.org as we would normally do.
This is due to some unfortunate limitations in the implementation of the
jdiff ant task that require a phisical JDIFF_HOME directory. Checking in
the jars and various resources represents the simplest and most
pragmatic solution to this problem, though ambitious contributors are
free to do what's necessary to arrive at a more elegant arrangement.

[1]: http://static.springframework.org/spring-framework/docs
[2]: http://sourceforge.net/projects/javadiff/files/latest/download

Issue: SPR-9957
2012-11-22 21:05:58 +01:00
Chris Beams d4fb1c8d63 Refactor Gradle script naming and organization
- inline test-mvc and tiles3 .gradle files for clarity
 - rename merge-dist.gradle to merge-artifacts.gradle
 - polish Javadoc for merge-artifacts.gradle
 - move merge-artifacts.gradle into gradle subdirectory
 - move publish-maven.gradle into gradle subdirectory
2012-11-22 20:48:26 +01:00
Rossen Stoyanchev 819be10931 Merge pull request #185 from rwinch/maven-multi-version-artifact
* rwinch-maven-multi-version-artifact:
  Support Gradle/maven with multi version artifacts
2012-11-22 13:22:58 -05:00
Rob Winch 39d419bbc3 Support Gradle/maven with multi version artifacts
Previously the publish-maven.gradle only supported having a single
artifact be marked as optional or provided. This causes problems now
that we are building modules that support multiple versions of an
artifact. For example, we compile against two versions of Tiles
artifacts with identical names, both of which need to be marked
optional.

This updates publish-maven.gradle to find all the artifacts and mark
them as optional as apposed to the first entry.
2012-11-22 13:18:43 -05:00
Rossen Stoyanchev b7f7fae78a Fix issue with @RequestBody args that are type vars
The change to support generic @RequestBody arguments introduced in
3.2 M2 also introduced a regression in reading arguments that are
type variables. This change fixes the issue.

Issue: SPR-9964
2012-11-22 11:35:22 -05:00
Phillip Webb 4181397c31 Merge pull request #85 from obecker/master
* pull85:
  Call ConversionService for null SpEL values
  Polish whitespace
2012-11-21 23:16:25 -08:00
Oliver Becker 759c9b35cd Call ConversionService for null SpEL values
Update SpEL boolean operators to always call the ConversionService
for null values. Primarily to allow null values to be treated as
false by overriding GenericConversionService.convertNullSource().

Issue: SPR-9445
2012-11-21 22:53:29 -08:00
Phillip Webb d9bd2e19a2 Polish whitespace 2012-11-21 22:52:11 -08:00
Phillip Webb c5f391550c Document global date time format configuration
Update reference documentation to detail how global date and time
formats can be specified.

Issue: SPR-9952
2012-11-21 20:42:41 -08:00
Phillip Webb fddb829b8b Update Joda Time references in documentation
Update documentation to reflect the fact that Joda Time is no longer
required to use the @DateTimeFormat annotation.
2012-11-21 20:42:40 -08:00
Rossen Stoyanchev b36ab83ab3 Support GenericArrayType in GenericTypeResolver method
Before this change GenericTypeResolver.resolveType supported
TypeVariable's and ParameterizedType's only. Now it also supports
GenericArrayType.
2012-11-21 13:26:56 -05:00
Phillip Webb 0e2904b71a Document cache and jdbc namespaces
Update the XSD section of the document with details of the cache and
jdbc namespace.

Issue: SPR-9824
2012-11-20 18:12:00 -08:00
Phillip Webb 27210ff3cc Polish XML snippets showing XSD imports
Remove <literal> tag from XML samples to improve the look of the
HTML output.
2012-11-20 18:10:04 -08:00
Phillip Webb c20b22a011 Consistent spelling for US/UK words
Replaced behaviour and summarised with US variants that seem to be
more prevalent in the rest of the document.
2012-11-20 16:39:54 -08:00
Phillip Webb d70762baaf Replace reference to aspectjrt with aspectjweaver
Replace reference to aspectjrt.jar with aspectjweaver.jar since
aspectjrt is a subset of aspectjweaver and the full jar is required
by Spring.

Issue: SPR-8896
2012-11-20 16:06:00 -08:00
Phillip Webb 59b27004de Document @Enable* annotations
Update reference manual with details of Java configuration @Enable*
annotations. Examples of Java style @Configuration is provided
when appropriate alongside existing XML samples.

Several existing @Configuration samples have been changed to placing
the @Enable annotation below the @Configuration annotation.
This has been done to provide consistency with existing Javadoc.

Issue: SPR-9920
2012-11-20 12:17:25 -08:00
Phillip Webb da50a0213b Polish Javadoc
Minor Javadoc reformat to prevent erroneous eclipse warnings
2012-11-20 12:17:25 -08:00
Phillip Webb 838ba79f55 Fix Javadoc references to incorrect XML
Replace references to <task:annotation-config> with
<task:annotation-driven>
2012-11-20 12:17:25 -08:00
Rossen Stoyanchev 11cf978394 Define behavior of null Callable or DeferredResult
When a controller method declares Callable or DeferredResult as its
return value, and returns null, async processing will not start and
the request will be considered "handled" by the controller method.

Issue: SPR-9951
2012-11-20 15:12:58 -05:00
Rossen Stoyanchev 77223d7ced Deprecate pre 3.1 @MVC support classes
Issue: SPR-10005
2012-11-20 14:59:01 -05:00
Rossen Stoyanchev 2a11007a04 Add Spring Framework integration with Tiles 3
Tiles 3 has modified packages and classes as well as additional
dependencies, notably "tiles-request-api", which is a request/response
abstraction independent of Servlet and JSP APIs.

In order to have both Tiles 2 and Tiles 3 integrations, the source for
the Tiles 3 integration is in a separate project spring-webmvc-tiles3.
The build process merges the compiled Tiles 3 integration classes into
the spring-webmvc module so in effect it contains both the Tiles 2 and
the Tiles 3 integrations.

This change originated as a pull request at spring-framework-issues:
https://github.com/SpringSource/spring-framework-issues/pull/30

And was additionally updated:
1f64be4aa5

Issue: SPR-8825
2012-11-20 12:24:08 -05:00
Phillip Webb 63ca14c33e Clarify use of @Bean with @EnableAsync executors
Update Javadoc to indicate that the getAsyncExecutor() method may be
optionally annotated with @Bean and in such circumstance the
executor.initialize() method need not be called.

Issue: SPR-9934
2012-11-19 10:42:33 -08:00
Rossen Stoyanchev 92ca8b32fb Add DefaultMvcResultTests 2012-11-16 09:48:12 -05:00
Phillip Webb 107fafbcc5 Do not consider bridge methods in SpEL properties
Modify ReflectivePropertyAccessor so that it no longer considers
bridge methods when finding getters or setters. This should help
to prevent subtle errors that can occur when particular JDK
implementations happen to return bridge methods before non-bridge
methods when calling Class.getMethods()

Issue: SPR-9994
2012-11-15 17:22:45 -08:00
Rossen Stoyanchev f8bf577eff Fix failures in PrintingResultHandlerTests 2012-11-15 11:26:14 -05:00
Rossen Stoyanchev 8afcf717e2 Fix failing test from previous commit 2012-11-15 10:15:34 -05:00
Rossen Stoyanchev 1f2e89e3ed Print async result in Spring MVC Test ResultHandler 2012-11-15 09:45:38 -05:00
Chris Beams f0f76e493d Update README to reflect JDK 1.7 build prereq 2012-11-14 13:18:59 +01:00
Chris Beams 084486a6b6 Update README link to contributor guidelines 2012-11-14 12:41:11 +01:00
Rossen Stoyanchev ecce7520fb Support HttpMessageConverter refs in mvc namespace
Issue: SPR-9469
2012-11-13 21:47:59 -05:00
Rossen Stoyanchev 62f2858f7f Fix issue with SpEL in mvc namespace
This change ensures that the location attribute of a resource mapping
and the path attribute of an interceptor mapping support SpEL
expressions.

Issue: SPR-9291, SPR-9848
2012-11-13 21:13:52 -05:00
Phillip Webb 950f00a280 Fix Collections import
Replace backport Collections class with stock JDK version
2012-11-12 13:15:25 -08:00
Chris Beams 6407a347c1 Merge pull request #181 from olivergierke/SPR-9568
# By Oliver Gierke
* SPR-9568:
  Support *Aware ImportBeanDefinitionRegistars
2012-11-12 18:27:43 +01:00
Oliver Gierke 146a66fe0b Support *Aware ImportBeanDefinitionRegistars
Implementations of Spring's ImportBeanDefinitionRegistrar interface may
now implement any of the following *Aware interfaces and have their
respective methods called prior to #registerBeanDefinitions:

 - BeanFactoryAware
 - BeanClassLoaderAware
 - ResourceLoaderAware

Issue: SPR-9568
2012-11-12 18:26:50 +01:00
Sam Brannen f5080f7d70 Suppress warnings for java.io.Closeable resources
Issue: SPR-9962
2012-11-10 19:22:26 +01:00
Sam Brannen f833366a7f Update package-info for test.util package 2012-11-10 19:08:18 +01:00
Juergen Hoeller f6209cd7af DefaultSingletonBeanRegistry avoids singletonObjects lock wherever possible for non-singleton factory performance
Also fixing setCurrentlyInCreation to use a concurrent Set and to apply to prototype beans as well.

Issue: SPR-9819
2012-11-09 00:54:57 +01:00
Juergen Hoeller de91d754d8 Re-added InitializingBean declaration 2012-11-09 00:13:40 +01:00
Juergen Hoeller f00559c440 Initial preparations for 3.2 RC2 2012-11-08 23:48:08 +01:00
Juergen Hoeller ea95da126a Implement java.io.Closeable where appropriate
Issue: SPR-9962
2012-11-08 23:44:49 +01:00
Juergen Hoeller d6e1a4a26a LocalDataSourceConnectionProvider checks against SmartDataSource before closing a Connection
Issue: SPR-9978
2012-11-08 23:37:14 +01:00
Juergen Hoeller 4ed9ababdf spring-jms-3.2.xsd declares former nmtoken attributes as string, allowing for placeholders
Issue: SPR-9597
2012-11-08 23:24:58 +01:00