Commit Graph

106 Commits

Author SHA1 Message Date
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
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
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
Rossen Stoyanchev 676282c66e Support ListenableFuture on @RequestMapping methods
Issue: SPR-11695
2014-05-01 12:28:59 -04:00
Rossen Stoyanchev 26a9c4bc01 Polish STOMP documentation 2014-04-28 22:35:10 -04:00
Sebastien Deleuze 59a050f3b9 Include more guidance about DispatcherServlet context
Also update <mvc:annotation-driven /> comment in XSD.

Issue: SPR-11703
2014-04-28 22:07:55 -04:00
Rossen Stoyanchev 86785f340e Document STOMP-related ApplicationContext events
Issue: SPR-11672
2014-04-28 22:02:45 -04:00
Juergen Hoeller 53162e78e4 WebSocket intro correctly points to annotations section
Issue: SPR-11667
2014-04-16 18:07:25 +02:00
Biju Kunjummen 973780efd5 Minor doc fix to sample for @ConstructorProperties 2014-04-15 18:10:46 +02:00
Stephane Nicoll 1f2d5b5d89 Fix typos 2014-04-09 17:35:45 +02:00
Stephane Nicoll 2b89c1a87e Improve cache abstraction chapter
This commit is a general update of the Cache Abstraction chapter.

Existing sections have been updated with recent improvements made in
that area, in particular:
* Guava and JSR-107 caches support
* New @CacheConfig annotation allowing to share some key customizations
  at class-level
* CacheResolver interface used to resolve the cache(s) to use at
  runtime
* Update section on @CachePut

This commit also describes the support of standard JCache annotations,
i.e. JSR-107.

Issues: SPR-11490, SPR-11316, SPR-10629, SPR-9616, SPR-8696
2014-04-09 11:28:18 +02:00
Sam Brannen 0eba1f818f Use unconstrained quotes in reference manual
Prior to this commit, there were numerous places in the reference
manual, where we would see output similar to the following:

    BeanDefinition`s with the `ApplicationContext

This commit addresses this issue by using unconstrained quotes
(e.g., ++XYZ++s) instead of backticks (e.g., `XYZ`s) when the formatted
text is immediately followed by an "s".

This commit also corrects a few typos and corrects natural English
pluralization of Java code elements in the reference manual where
appropriate -- for example, "@Controllers" becomes "@Controller classes,
etc.

Issue: SPR-11650
2014-04-04 22:02:26 +02:00
Stephane Nicoll db23ec733b Add exception handling of asynchronous method
Prior to this commit, an exception thrown by an @Async void method
was not further processed as there is no way to transmit that
exception to the caller.

The AsyncUncaughtExceptionHandler is a new strategy interface that
can be implemented to handle unexpected exception thrown during the
invocation of such asynchronous method.

The handler can be specified using either the XML namespace or by
implementing the AsyncConfigurer interface with the EnableAsync
annotation.

Issue: SPR-8995
2014-04-02 15:04:40 +02:00
Sam Brannen 1f017c4acb Support classes AND locations in @ContextConfiguration
Prior to this commit, the Spring TestContext Framework did not support
the declaration of both 'locations' and 'classes' within
@ContextConfiguration at the same time.

This commit addresses this in the following manner:

 - ContextConfigurationAttributes no longer throws an
   IllegalArgumentException if both 'locations' and 'classes' are
   supplied to its constructor.

 - Concrete SmartContextLoader implementations now validate the
   supplied MergedContextConfiguration before attempting to load the
   ApplicationContext. See validateMergedContextConfiguration().

 - Introduced tests for hybrid context loaders like the one used in
   Spring Boot. See HybridContextLoaderTests.

 - Updated the Testing chapter of the reference manual so that it no
   longer states that locations and classes cannot be used
   simultaneously, mentioning Spring Boot as well.

 - The Javadoc for @ContextConfiguration has been updated accordingly.

 - Added hasLocations(), hasClasses(), and hasResources() convenience
   methods to MergedContextConfiguration.

Issue: SPR-11634
2014-04-01 19:45:56 +02:00
Stephane Nicoll dcf5f4a6a3 javax.annotation.Priority alternative to @Order
This commit rationalizes the use of @Order so that the standard
@Priority annotation can be used instead. The handling of both
annotations are now defined in OrderUtils.

This also updates the link to the JavaEE API so that we refer to
JavaEE7 instead of JavaEE6.

Issue: SPR-11639
2014-04-01 14:30:47 +02:00
Rossen Stoyanchev 32852e0843 Improve doc on authentication for stomp/websocket 2014-03-26 17:12:30 -04:00
Rossen Stoyanchev b02bda95b2 Document better ASYNC dispatch type config for Filters
Although the need to map the ASYNC dispatcher type to a Filter was
already mentioned, it wasn't very prominent and can be quite critical
in some cases. This change addresses that.

Issue: SPR-10440
2014-03-26 17:12:10 -04:00
Rossen Stoyanchev e6e12be5ef Fix typo in documentation 2014-03-26 11:32:34 -04:00
Rossen Stoyanchev 5dbcd76a71 Add doc section on configuration and performance
Issue: SPR-11450
2014-03-26 00:20:35 -04:00
Rossen Stoyanchev fd175180b9 Revise section explaining the flow of STOMP messages 2014-03-25 22:15:12 -04:00
Rossen Stoyanchev 84133c86fe Update SockJS overview section and polish 2014-03-25 22:15:12 -04:00
md42 b0e7f72a27 typo in pointcut expression 2014-03-25 17:15:07 +01:00
Sebastien Deleuze d67f0803c4 Update WebSocket engines support documentation 2014-03-25 11:05:47 -04:00
Rossen Stoyanchev c11484b2e7 Add WebSocket transport configuration support
Issue: SPR-11527
2014-03-24 19:20:38 -04:00
Sebastien Deleuze bbdb72d808 Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.

Issue: SPR-11527
2014-03-24 19:20:37 -04:00
Rossen Stoyanchev f25b7df552 Document heartbeat support in SockJS 2014-03-23 23:13:13 -04:00
Rossen Stoyanchev b1a0b38d8f Document use of CORS headers in SockJS Service
Issue: SPR-11437
2014-03-23 22:52:14 -04:00
Rossen Stoyanchev 15188a8eee Document IE 8 and 9 related SockJS transport details
Issue: SPR-11496, SPR-11525
2014-03-23 22:52:13 -04:00
Rossen Stoyanchev d30cb17c91 Polish SockJS documentation 2014-03-23 22:51:31 -04:00
Sebastien Deleuze fb600857df Document locale convention in Tiles def file names
In Tiles v3 integration, underscores in filenames are
intended to identify the definition locale. This behavior
is now documented in order to avoid unexpected results
with filenames like tiles_definitions.xml.

This commit also updates Tiles v2 references to Tiles v3
in the Spring reference documentation.

Issue: SPR-11491
2014-03-17 21:37:37 -04:00
Sebastien Deleuze aac409c6cf Fix "Configuring the WebSocket Engine" documentation
This commit updates reference documentation in order
to specify that ServletServerContainerFactoryBean is for
server side use and WebSocketContainerFactoryBean
for client side use.

Issue: SPR-11565
2014-03-17 21:20:50 -04:00
Juergen Hoeller 264d7b9c98 Improved documentation on how to convert collections with ConversionService
Issue: SPR-11432
2014-03-10 18:18:29 +01:00
Sam Brannen 241682c117 Update author list in reference manual 2014-03-10 12:31:00 +01:00
Sam Brannen b364599278 Update links to Spring JIRA server 2014-03-10 12:26:29 +01:00
Juergen Hoeller 2cdc066daf Relaxed statement on early validation of bean references
Issue: SPR-11495
2014-03-05 22:41:26 +01:00
Marcin Mielnicki 7cf5e3a508 Outdated code example correction in section 10.3.6 2014-03-03 22:20:28 +01:00
Brian Clozel 53017da0c3 Update reference documentation for SPR-11486
Issue: SPR-11486
2014-03-03 12:13:17 +01:00
Stephane Nicoll 035d9d5af0 Clarify exception handling in converter
Issue: SPR-11500
2014-03-03 10:02:39 +01:00
Rossen Stoyanchev 4238299661 Add smart logging for disconnected SockJS clients
The Servlet API does not provide notifications when a client
disconnects, see see https://java.net/jira/browse/SERVLET_SPEC-44.
Therefore network IO failures may occur simply because a client has
gone away. Before this change that could fill logs with unnecessary
stack traces.

After this change we make a best effort to identify such network
failures, on a per-server basis (tested with Jetty, Tomcat, Glassfish,
and WildFly), and log them under a separate log category.

A simple one-line message is logged at DEBUG level (i.e. no stack trace)
while a full stack trace is shown at TRACE level.

Issue: SPR-11438
2014-03-01 14:46:44 -05:00
Sam Brannen 5d4ed4efe5 Fix DocBook to AsciiDoc conversion errors
- "__ `text`__" --> "__`text`__"

 - "`text` s" --> "`text`s"
2014-02-28 22:31:06 +01:00
Oliver Gierke 74969a4794 Update ref. manual to favor constructor injection
The breakout box named "Constructor-based or setter-based DI?" in the
reference manual currently recommends the use of setter injection.

This commit refines this text to align with current best practices and
now favors constructor injection over setter injection.

Issue: SPR-11459
2014-02-28 21:53:54 +01:00
Juergen Hoeller 9af7d2646b Added documentation on how to set up JSR-303 method validation
Also removed outdated Struts references and made use of 'javadocs' term consistent.

Issue: SPR-11473
2014-02-28 19:02:18 +01:00
Rossen Stoyanchev 651e0a44fb Update documentation
Clarify ability to use @MessageMapping methods on both @Controller as
well as @RestController.

Add section on configuring connections (including credentials) to the
message broker and clarify the use of the login/passcode headerers of
the STOMP CONNECT frame.

Add note on when to add the reactor-tcp dependency.

Issue: SPR-11464, SPR-11436, SPR-11449
2014-02-25 11:31:13 -05:00
Rossen Stoyanchev 0cb27f4bc5 Allow HttpMethod as a controller method argument
Issue: SPR-11425
2014-02-13 12:16:24 -05:00
Rossen Stoyanchev 7301b58ec9 Improve info on use of @Controller's with aop proxying
Before this change, issues surrounding the use of @Controller's in
combination with AOP proxying, resulted in an IllegalArgumentException
when trying to invoke the controller method.

This change detects such cases proactively and reports them with a
clear recommendation to use class-based proxying when it comes to
@Controller's. This is the most optimcal approach for controllers
in many respects, also allows @MVC annotations to remain on the
class.

The documentation has also been updated to have a specific section
on @Controller's and AOP proxying providing the same advice.

Issue:SPR-11281
2014-02-11 12:25:54 -05:00
Juergen Hoeller 9a8f860318 Fixed broken link to jax-ws-commons website
Issue: SPR-11404
2014-02-07 17:24:47 +01:00
Sam Brannen 7566ceb5f2 Fix minor typo in testing chapter 2014-02-06 21:47:42 +01:00
Sam Brannen 9a6252d715 Fix formatting in 'TCF support classes' section of ref
This commit fixes some formatting issues in the 'TestContext Framework
support classes' section of the reference manual that were introduced
in the conversion from DocBook to AsciiDoc.
2014-02-06 21:12:00 +01:00
Lukasz Kryger 14d3525a28 Minor corrections/typos to "27. Cache Abstraction" docs section 2014-01-28 12:30:04 +00:00