Commit Graph

8515 Commits

Author SHA1 Message Date
Arjen Poutsma 0499fcbeb2 Move ResponseEntityBuilder into ResponseEntity
Moved the ResponseEntityBuilder into the ResponseEntity itself.

Issue: SPR-11752
2014-05-15 13:41:25 -04:00
Stephane Nicoll 8614df8bd4 Add error code for SAP Hana
This commit adds a SQLErrorCodes instance for SAP DB, based on a
contribution from Andrew Clemons

Mostly based on SAP Hana SPS 07 with a few additional codes that are
only present is previous versions:

* -813 - Cannot connect to host somehost:30115 [Connection refused]
* -709 - Unknown host somehost:30115 [somehost], -709.]
* -708 - Cannot connect to jdbc:sap://somehost:30115 [Receive of connect failed.]
* -11210 - Invalid column index XYZ.

Issue: SPR-11770
2014-05-15 17:36:55 +02:00
Juergen Hoeller 0d22719e06 Latest possible dependency updates for spring-orm 2014-05-15 17:07:20 +02:00
Juergen Hoeller 7230d6a1aa Polishing 2014-05-15 17:07:13 +02:00
Stephane Nicoll 6560aed1c8 Avoid JMSException in listener execution
This commit avoids throwing JMSException from the listener execution
as this is not allowed per spec. Our SessionAwareMessageListener
gives a callback that can throw JMSException and we have "abused" it
so far.

Typical message processing goes in those 3 steps:
* Unmarshall the javax.jms.Message to the requested type
* Invoke the actual user method (including processing of method
  arguments)
* Send a reply message, if any

Those three steps have been harmonized so that they don't throw a
JMSException anymore. For the later case, introduced
ReplyFailureException as a general exception indicating the
reply message could not have been sent.

Issue: SPR-11778
2014-05-15 16:36:08 +02:00
Juergen Hoeller b0f0d2f289 Polishing 2014-05-15 14:39:06 +02:00
Juergen Hoeller 0728e32e7f ResultSetWrappingSqlRowSet preserves first matching column per name (as defined in ResultSet's javadoc)
Issue: SPR-11786
2014-05-15 14:27:44 +02:00
Juergen Hoeller 551950cdc0 Consistent use of ClassUtils.forName instead of class.getClassLoader().loadClass
Issue: SPR-11780
2014-05-15 09:56:11 +02:00
Brian Clozel f651065b5e Polish 2014-05-14 18:37:31 +02:00
Brian Clozel a072b3f20d Fix RestTemplate documentation for gzip encoding
Prior to this commit, RestTemplate's documentation advised to a
DecompressingHttpClient decorator along with Apache's HttpClient in
order to support gzipped responses.

Since this is now deprecated as of Apache HttpClient 4.3+, this commits
update the documentation with HttpClientBuilder.
2014-05-14 18:04:46 +02:00
Arjen Poutsma eb65a37f4b Provide builder for ResponseEntity
This commit introduces a ResponseEntityBuilder, which allows for
building of a ResponseEntity through a fluent API.

Issue: SPR-11752
2014-05-14 08:26:22 -04:00
Stephane Nicoll 04e6575db6 polishing
This commit adds an explicit error message when the BackOff instance
has returned BackOffExecution#STOP which basically means that no
further attempts are allowed.

This error message is a convenience way to notify that the container is
about to be shut down.

Issue: SPR-11746
2014-05-13 14:44:14 +02:00
Juergen Hoeller 2750ab6734 Undertow-related polishing 2014-05-12 23:14:16 +02:00
Juergen Hoeller b43fc7ac0f Building against Quartz 2.2.1 and JavaMail 1.5.2 2014-05-12 22:31:27 +02:00
Juergen Hoeller b64b308f62 Building against Groovy 2.3 instead of 1.8; updated several dependencies to latest maintenance releases (JasperReports 5.5.2, Tiles 3.0.4, Jetty 9.1.5) 2014-05-12 20:39:07 +02:00
Juergen Hoeller e04fb15a5e Compilation compatibility with JasperReports 5.5.2 2014-05-12 20:34:38 +02:00
Juergen Hoeller 782d10c66f JasperReports-related polishing 2014-05-12 20:27:53 +02:00
Rossen Stoyanchev 2c4cbb617e Add WebSocket scope
This change adds support for a custom "websocket" scope.

WebSocket-scoped beans may be injected into controllers with message
handling methods as well as channel interceptor registered on the
"inboundClientChannel".

Issue: SPR-11305
2014-05-11 12:31:17 -04:00
Rossen Stoyanchev 66c63c374b Ensure handshake attrs are copied in SockJS session 2014-05-09 17:01:37 -04:00
Juergen Hoeller b4d447fc3d isLiteConfigurationCandidate considers @ComponentScan and @ImportResource as indicators as well
Issue: SPR-11769
2014-05-09 21:43:37 +02:00
Stephane Nicoll 89fc3c0257 Add BackOffExecution to isolate state
This commit separates the BackOff configuration from an actual
 execution. BackOffExecution now contains all the state of a
 particular execution and BackOff is only meant to start (i.e.
 create) a new execution.

 The method "reset" has been removed as its no longer necessary:
 when an execution does not need to be used for a given operation
 anymore it can be simply discarded.

 Issue: SPR-11746
2014-05-09 16:39:01 +02:00
Stephane Nicoll 49040a2925 Add back-off attribute to JMS namespace
This commit adds a "back-off" attribute to the jms:listener-container
 element so that a BackOff instance can be provided for users of the
 XML namespace.

 Issue: SPR-11746
2014-05-09 15:05:43 +02:00
Stephane Nicoll 6a0483128a Configurable back off for listener recovery
Prior to this commit, DefaultMessageListenerContainer was recovering
on failure using a fixed time interval, potentially in an infinite way.

This commit adds an extra "backoff" property to the container that
permits to fine tune the recovery interval using a BackOff instance.

FixedBackOff provides a fixed interval between two attempts and a
maximum number of retries. ExponentialBackOff increases an initial
interval until a maximum interval has been reached. A BackOff instance
can return a special "STOP" time value that indicates that no further
attemps should be made. DefaultMessageListenerContainer uses this
value to stop the container.

protected method "sleepInbetweenRecoveryAttempts" has been renamed
to "applyBackOff" and now returns a boolean that indicate if the
back off has been applied and a new attempt should now be made.

Issue: SPR-11746
2014-05-09 11:56:15 +02:00
Rossen Stoyanchev 97fb308b6b Allow use of @SendToUser even w/o authenticated user
Before this change, subscribing to a user destination and use of
@SendToUser annotation required an authenticated user.

This change makes it possible to subscribe to a user destination from
WebSocket sessions without an authenticated user. In such cases the
destination is associated with one session only rather than with a
user (and all their sessions).

It is then also possible to send a message to a user destination
via "/user/{sessionId}/.." rather than "/user/{user}/...".

That means @SendToUser works relying on the session id of the input
message, effectively sending a reply to destination private to the
session.

A key use case for this is handling an exception with an
@MessageExceptionHandler method and sending a reply with @SendToUser.

Issue: SPR-11309
2014-05-08 22:06:57 -04:00
Juergen Hoeller 3c7bb9c279 Fixed Xml/AnnotationBeanConfigurerTests after AbstractBeanConfigurerTests removal 2014-05-08 17:21:26 +02:00
Juergen Hoeller 6c1f8de5fa Eventual removal of deprecated AbstractBeanConfigurerAspect, BeanReferenceFactoryBean and CommonsLogFactoryBean 2014-05-08 16:24:22 +02:00
Juergen Hoeller 8c9116fd4b Additional tests for configuration class importing via ASM
Issue: SPR-11647
2014-05-08 16:22:24 +02:00
Stephane Nicoll 580e52372f Add support of YAML
This commit migrates the YAML support available in Spring Boot to
the core framework. YAML documents can be loaded either as a
properties object or as a map.

Issue: SPR-9897
2014-05-08 12:02:20 +02:00
Stephane Nicoll 7b7fe9aa17 JMS documentation update
This commit updates the documentation of the JMS chapter
with the newly annotated endpoint infrastructure
2014-05-07 12:00:29 +02:00
Sebastien Deleuze 98738c0bbb Avoid ConcurrentModificationException
Removal of cached destination is now moved outside the for loop
that removes subscriptions to avoid ConcurrentModificationException.

Also since updateCache is a LinkedHashMap with accessOrder=true,
a simple access with updateCache.get() modify the map.
By iterating over updateCache.entrySet(), we avoid this update.

Issue: SPR-11755
2014-05-06 20:19:09 -04:00
Rossen Stoyanchev 426b77b834 Support path segment URI var expansion in UrlTag
Before this change UrlTag expanded URI vars and encoded them using
UriUtils.encodePath.

This change makes it possible to expand using
UriUtils.encodePathSegment, which means a "/" is encoded as "%2F".

To expand with path segment semantics, prefix the URI var name "/":

<spring:url value="/url/path/{/var}">
    <spring:param name="var" value="my/Id" />
</spring:url>

Issue: SPR-11401
2014-05-06 19:41:17 -04:00
Rossen Stoyanchev 9d479feadd Add naming strategy for @MVC request mappings.
This change adds a strategy for assigning a default name to an
@RequestMapping controller method. The @RequestMapping annotation
itself now has a name attribute allowing the explicit assignment
of a mapping name.

This is mainly intended for use in EL expressions in views. The
RequestContext class now provides a getMvcUrl method that internally
delegates to MvcUriComponents to look up the handler method.

See the Javadoc of MvcUriComponents.fromMappingName.

Issue: SPR-5779
2014-05-06 15:27:53 -04:00
Juergen Hoeller 381ccde48d IdToEntityConverter defensively handles access to getDeclaredMethods
Issue: SPR-11758
2014-05-06 18:49:16 +02:00
Juergen Hoeller bea34ea41c GenericTypeResolver returns null for entirely unresolvable type arguments only
Issue: SPR-11763
2014-05-06 18:06:26 +02:00
Sam Brannen db5d651057 Exclude Jackson from Jasper Reports dependencies 2014-05-06 17:34:51 +02:00
Stephane Nicoll 43e4dbadfe Revert merge commit e246010df7 2014-05-06 16:30:13 +02:00
Stephane Nicoll e246010df7 Merge pull request #102 from remast/master
* pull102:
  polishing
  Add exception translator for EclipseLink exceptions
2014-05-06 16:05:50 +02:00
Stephane Nicoll e18308851d polishing
Updating pull request for SPR-9541
2014-05-06 16:04:39 +02:00
Jan Stamer 371e3a7ac0 Add exception translator for EclipseLink exceptions
Issue: SPR-9541
2014-05-06 16:01:51 +02:00
Stephane Nicoll 658f7f58df Add missing @since tag 2014-05-05 15:45:45 +02:00
Rossen Stoyanchev ae30a60d03 Relax websocket xsd attr types for ${} style props
Issue: SPR-11624
2014-05-02 15:17:04 -04:00
Brian Clozel 5a1b7c6ce7 Update IDEA guidelines
* propdeps-plugin is now in version 0.0.6
* Using IntelliJ 13.1
2014-05-02 12:27:46 +02:00
Stephane Nicoll 6551aa61fa Fix typo
Issue: SPR-11571
2014-05-02 09:57:00 +02:00
Rossen Stoyanchev cb2834c10a Fix compile error 2014-05-01 13:40:23 -04:00
Rossen Stoyanchev 8e1a5b9999 Merge pull request #535 from matsev/SPR-11749 2014-05-01 13:38:53 -04:00
Mattias Severson f2991da6d6 Made string constants in HttpHeaders public
Issue: SPR-11749
2014-05-01 13:37:39 -04:00
Rossen Stoyanchev 676282c66e Support ListenableFuture on @RequestMapping methods
Issue: SPR-11695
2014-05-01 12:28:59 -04:00
Rossen Stoyanchev 0d2aa51576 Update ContentNegotiationManager for unknown path exts
This change refines the logic of "mapping" content negotiation
strategies with regards to how to handle cases where no mapping is
found.

The request parameter strategy now treats request parameter values that
do not match any mapped media type as 406 errors.

The path extension strategy provides a new flag called
"ignoreUnknownExtensions" (true by default) that when set to false also
results in a 406. The same flag is also exposed through the
ContentNegotiationManagerFactoryBean and the MVC Java config.

Issue: SPR-10170
2014-05-01 12:03:06 -04:00
Rossen Stoyanchev c50887c877 Merge pull request #487 from cloudmark/SPR-11506 2014-05-01 10:36:54 -04:00
Rossen Stoyanchev 9598a1e2ef Update @SendToUser and related code
Issue: SPR-11506
2014-05-01 10:35:35 -04:00