Since Hibernate 3.6 and 4.x differ in exception handling now, this change makes HibernateJpaDialect independent from orm.hibernate3 now and avoids introducing a conditional dependency on orm.hibernate4.
Issue: SPR-10815
Use a single class for the broker availability event with a boolean
that indicates whether or not the broker is available, rather than one
event for an available broker and one event for an unavailable broker.
Publish broker availability events in SimpleBrokerMessageHandler so that
it can be used as a drop-in replacement for
StompBrokerRelayMessageHandler.
Upgrade to Reactor snapshot builds to take advantage of TcpClient's
reconnect support that was added post-M1. Now, the system relay session
will try every 5 seconds to establish a connection with the broker, both
when first connecting and in the event of subsequently becoming
disconnected.
A more sophisticated reconnection policy, including back off and
failover to different brokers, is possible with the Reactor API. We may
want to enhance the relay's reconnection policy in the future.
Typically, a broken connection is identified by the failure to forward
a message to the broker. As things stand, the message id then discarded.
Any further messages that are forwarded before the connection's been
re-established are queued for forwarding once the CONNECTED frame's been
received. We may want to consider also queueing the message that failed
to send, however we would then need to consider the possibility of the
message itself being what caused the broker to close the connection
and resending it would simply cause the connection to be closed again.
Components that are using a StompBrokerRelayMessageHandler may want
to know whether or not the broker's unavailable. If they're sending
messages to the relay via an asynchronous channel there's currently
no way for them to find this out.
This commit enhances StompBrokerRelayMessageHandler to publish
application events when the broker's availability changes:
BrokerBecameAvailableEvent and BrokerBecameUnavailableEvent.
Irrespective of the number of relay sessions only a single event is
published for each change in the broker's availability.
Although ServletHttpRequest provides access to Cookies, other
implementations may not. At the moment this was only needed
for SockJS to check the value of the JSESSIONID cookie. This
is now down by parsing the raw cookie values locally.
If comprehensive cookie support is to be added, we should
probably consider HttpHeaders as a potential candidate.
A HandshakeInterceptor can be used to intercept WebSocket handshakes
(or SockJS requests where a new session is created) in order to
inspect the request and response before and after the handshake
including the ability to pass attributes to the WebSocketHandler,
which the hander can access through
WebSocketSession.getHandshakeAttributes()
An HttpSessionHandshakeInterceptor is available that can copy
attributes from the HTTP session to make them available to the
WebSocket session.
Issue: SPR-10624
Added XStream CatchAllConverter that supports all classes, but throws
exceptions for (un)marshalling.
Main purpose of this class is to register this converter as a catchall
last converter with a normal or higher priority in addition to
converters that explicitly support the domain classes that should be
supported. As a result, default XStream converters with lower
priorities and possible security vulnerabilities do not get invoked.
Also, StandardReflectionParameterNameDiscoverer calls "Parameter.isNamePresent()" now to return null (and pass on to the next discoverer) if no JDK 8 parameters are available. Note that this requires OpenJDK 8 b100 or higher to compile now.
Issue: SPR-10532
This change enables having @ResponseBody on the type-level in which
case it inherited and does not need to be added on the method level.
For added convenience, there is also a new @RestController annotation,
a meta-annotation in turn annotated with @Controller and @ResponseBody.
Classes with the new annotation do not need to have @ResponseBody
declared on the method level as it is inherited.
Issue: SPR-10814
MimeType is available in core-spring and does not include support
for quality parameters and media used in HTTP content negotiation.
The MediaType sub-class in org.springframework.http adds q-parameters.
The method returning query parameters now returns only query string
parameters as opposed to any Servlet request parameter.
This commit also adds a ReadOnlyMultiValueMap.
ServerHttpAsyncResponseControl wraps a ServetHttpRequest and -Response
pair and allows putting the processing of the request in async mode
so that the response remains open until explicitly closed, either from
the current or from another thread.
ServletServerHttpAsyncResponseControl provides a Serlvet-based
implementation.