Commit Graph

8416 Commits

Author SHA1 Message Date
Juergen Hoeller
77406eded8 Refined DefaultJpaDialect's InvalidIsolationLevelException message
Issue: SPR-8325
(cherry picked from commit af13310)
2014-07-03 22:34:14 +02:00
Rossen Stoyanchev
977c5ca439 Synchronize request init in AbstractHttpSockJsSession
Although unlikely in practice (but not impossible), the SockJS
integration tests write a message while the request is initializing.
This change adds synchronization around request intiailization
for the SockJS HTTP sesion.

This is a backport of:
59e02e63c4

Issue: SPR-11916
2014-07-02 18:28:48 -04:00
Juergen Hoeller
ede2150544 Polishing 2014-07-02 17:32:43 +02:00
Juergen Hoeller
07edf11e21 Defensively check for pre-resolved FactoryBean.getObject() results in circular reference scenarios
Issue: SPR-11937
(cherry picked from commit d870b38)
2014-07-02 00:23:32 +02:00
Juergen Hoeller
f27b9498be CachedIntrospectionResults uses SoftReference instead of WeakReference for non-cache-safe entries
Issue: SPR-11867
2014-07-02 00:22:24 +02:00
Rossen Stoyanchev
e9ecaf6f4a Fix issue with StompSubProtocolHandler initialization
This change ensures that StompSubProtocolHandler is injected with an
ApplicationEventPublisher for both the Java and XML config.

Backport for:
0dddb6f3e1
4372dac002

Issue: SPR-11825
2014-07-01 14:59:51 -04:00
Rossen Stoyanchev
5092414842 Improve SubscriptionRegistry subscription removal
This a backport of:
ce20abde51
083d415fc4

Issue: SPR-11931, SPR-11930
2014-07-01 14:35:22 -04:00
Rossen Stoyanchev
6438209557 Remove JDK 1.7 guards 2014-07-01 14:33:27 -04:00
Juergen Hoeller
7396210d40 Package javadoc cleanup for web.servlet.mvc, removing outdated references
Issue: SPR-11935
(cherry picked from commit ba522e5)
2014-07-01 18:12:42 +02:00
Juergen Hoeller
b9935e9fe3 BeanFactoryAnnotationUtils consistently applies bean name fallback when no BeanDefinition present
Issue: SPR-11915
(cherry picked from commit f8b6114)
2014-07-01 18:12:23 +02:00
Juergen Hoeller
86ea3059b6 Polishing 2014-07-01 15:11:36 +02:00
Juergen Hoeller
4384c1ae50 Upgrade to Reactor 1.1.3 2014-07-01 15:10:09 +02:00
Juergen Hoeller
347b7313b8 Dependency updates (as appropriate for the 4.0.x line) 2014-07-01 12:31:47 +02:00
Juergen Hoeller
3fb05017a1 Reference documentation overhaul (backported from master)
Issue: SPR-11853
Issue: SPR-11906
2014-07-01 12:31:16 +02:00
Juergen Hoeller
48f753f368 Polishing (backported from master) 2014-07-01 12:12:42 +02:00
Juergen Hoeller
c16032b98a Consistent declaration of private static final logger variables
Issue: SPR-11905
(cherry picked from commit 18131bf)
2014-07-01 12:09:29 +02:00
Juergen Hoeller
c32d5592c7 AbstractAutowireCapableBeanFactory's createBean/autowireBean/configureBean use CacheUtils.isCacheSafe to re-enable PropertyDescriptor caching
Issue: SPR-11875
(cherry picked from commit 974bd43)
2014-07-01 12:07:26 +02:00
Juergen Hoeller
5f695a47db Cache Class.getDeclaredMethods() results and avoid pattern matching in isCglibRenamedMethod as far as possible
Issue: SPR-11882
Issue: SPR-11894
2014-07-01 12:06:34 +02:00
Juergen Hoeller
74c878ee0e AnnotationUtils defensively catches and logs unexpected exceptions from retrieval attempts (proceeding like the annotation wasn't there)
Issue: SPR-11874
(cherry picked from commit 2c0c081)
2014-07-01 12:05:38 +02:00
Juergen Hoeller
178d58cc75 ConfigurationClassParser falls back to ASM-based resolution of member classes in case of NoClassDefFoundError
Issue: SPR-11844
(cherry picked from commit 6aa9c40)
2014-07-01 12:02:27 +02:00
Juergen Hoeller
7b38b41bf5 ConfigurationClassPostProcessor skips pre-processed bean definitions now (avoiding side effects in case of multiple CCPPs)
Issue: SPR-11858
(cherry picked from commit b625512)
2014-07-01 12:01:50 +02:00
Juergen Hoeller
6403479902 TypeDescriptor's nested type traversal leniently returns null in case of unresolvable nested type
Issue: SPR-11898
(cherry picked from commit d663580)
2014-07-01 12:00:20 +02:00
Juergen Hoeller
5af1a691bc DefaultAdvisorChainFactory never passes null into ClassFilter, enabling async advisor to work without target class as well
Issue: SPR-11910
(cherry picked from commit a9b650f)
2014-07-01 11:59:43 +02:00
Juergen Hoeller
9f967b1d81 SharedEntityManagerCreator immediately throws TransactionRequiredException on persist, merge, remove etc (as required by JPA spec)
Issue: SPR-11923
(cherry picked from commit 045d735)
2014-07-01 11:59:11 +02:00
Juergen Hoeller
e50507206f DefaultSubscriptionRegistry's removeSubscriptionInternal defensively handles non-existing destinations
Issue: SPR-11832
(cherry picked from commit 5a8e470)
2014-07-01 11:58:08 +02:00
Juergen Hoeller
c73ac075c4 UriComponentBuilder allows for multiple independent build() calls on same builder instance
Issue: SPR-11885
(cherry picked from commit d239016)
2014-07-01 11:57:45 +02:00
Juergen Hoeller
0bf0901b8f SelectTag consistently checks specified 'multiple' attribute now, never falling back to forceMultiple in case of user-provided value
Issue: SPR-11903
(cherry picked from commit 779ca99)
2014-07-01 11:57:15 +02:00
Juergen Hoeller
7d94b5e853 FrameworkPortlet properly initializes StandardPortletEnvironment's property sources and exposes local PortletRequestAttributes in case of pre-bound ServletRequestAttributes as well
Issue: SPR-11816
Issue: SPR-11295
2014-07-01 11:55:19 +02:00
Juergen Hoeller
8ddbbc2e67 PathMatchingResourcePatternResolver's findPathMatchingResources needs to check for VFS before checking isJarResource
ResourceUtils isFileURL also detects "vfsfile" as a file system protocol (again).

Issue: SPR-11887
2014-07-01 11:54:16 +02:00
Juergen Hoeller
0a34f86333 MBeanExportConfiguration's SpecificPlatform properly calls afterPropertiesSet
Also makes the nested SpecificPlatform enum public for Spring Boot to reuse it.

Issue: SPR-11877
(cherry picked from commit 6f68b03)
2014-07-01 11:52:53 +02:00
Juergen Hoeller
a0c86ae455 WebSphereUowTransactionManager exposes SmartTransactionObject
Issue: SPR-11876
(cherry picked from commit 03f3412)
2014-07-01 11:51:33 +02:00
Juergen Hoeller
0761ee99ae Workaround for WFLY-3474 NullPointerException
Prior to this commit, the ServletResponseHttpHeaders.get method
would throw an NPE when used under Wildfly 8.0.0.Final and 8.1.0.Final.
This can be traced to WFLY-3474, which throws an NPE when calling
HttpServletResponse.getHeaders("foo") and that header has not
been defined prior to that.
This would cause NPE being thrown by AbstractSockJsService when
checking for CORS HTTP headers in the server HTTP response.

This commit surrounds that method call in AbstractSockJsService and
guards against this issue.

Issue: SPR-11919
(cherry picked from commit 24cdefb)
2014-07-01 11:51:01 +02:00
Juergen Hoeller
9054f4fb58 HttpHeaders fails getAllow if set to EmptyCollection
Prior to this commit, calls to getAllow would fail is setAllow was set
to an EmptyCollection right before.

    java.lang.IllegalArgumentException: No enum constant
    org.springframework.http.HttpMethod

This commit fixes this by testing the header value for an empty value
before trying to use it to get a value from the Enum.

Issue: SPR-11917
(cherry picked from commit 9919a98)
2014-07-01 11:46:53 +02:00
Rossen Stoyanchev
41e78d0f50 Fix failing test 2014-06-29 22:08:25 -04:00
Rossen Stoyanchev
526d5ba253 Fix warnings from sniff task on master 2014-06-29 17:44:43 -04:00
Rossen Stoyanchev
40c203ca71 Minor fix in STOMP broker relay
This is a backport for a change made as part of:
113fd1180a

Issue: SPR-11884
2014-06-29 16:58:47 -04:00
Rossen Stoyanchev
d18fc53148 Avoid multiple invocations of afterConnectionClosed
This change ensures the state of a SockJS session is set to CLOSED
immediately after close is invoked. This avoids duplicate invocations
of afterConnectionClosed in WebSocket transport.

This is a backport of:
3af488a701

Issue: SPR-11884
2014-06-29 16:58:13 -04:00
Rossen Stoyanchev
618771d59d Add check for unused WebSocket sessions
Sessions connected to a STOMP endpoint are expected to receive some
client messages. Having received none after successfully connecting
could be an indication of proxy or network issue. This change adds
periodic checks to see if we have not received any messages on a
session which is an indication the session isn't going anywhere
most likely due to a proxy issue (or unreliable network) and close
those sessions.

This is a backport for commit:
a3fa9c9797

Issue: SPR-11884
2014-06-29 16:58:13 -04:00
Rossen Stoyanchev
87077d3fad Add support for setting removeOnCancelPolicy
This change introduces removeOnCancelPolicy on ThreadPoolTaskScheduler
and ScheduledExecutorFactoryBean and sets it to true for SockJS.
This ensures that cancelled tasks are removed immediately to avoid
the "unbounded retention of cancelled tasks" that is mentioned in
the Javadoc ScheduledThreadPoolExecutor:

"By default, such a cancelled task is not automatically removed from
the work queue until its delay elapses. While this enables further
inspection and monitoring, it may also cause unbounded retention of
cancelled tasks. To avoid this, set setRemoveOnCancelPolicy to true,
which causes tasks to be immediately removed from the work queue at
time of cancellation."

This is a backport for:
7441f23012

Issue: SPR-11918
2014-06-29 16:57:58 -04:00
Rossen Stoyanchev
c0c3618906 Fix concurrency issues in SockJS session impls
Cherry-picked from:
fcf6ae8328

Issue: SPR-11916
2014-06-29 15:50:55 -04:00
Spring Buildmaster
0405bb401a Next development version 2014-05-20 06:41:20 -07:00
Juergen Hoeller
e3e71ba92a Servlet 3 multipart request implements getParameterMap defensively as well
Issue: SPR-11074
(cherry picked from commit c7d1c49)
2014-05-20 11:11:56 +02:00
Juergen Hoeller
d4e1b9eb4c Polishing
(cherry picked from commit 6fef8b9)
2014-05-20 11:11:33 +02:00
Rossen Stoyanchev
44ee51a6c9 Disable URL resolution in DTD declarations
Issue: SPR-11768
2014-05-19 22:23:51 -04:00
Juergen Hoeller
ba6d187b5c Consistent MvcUriComponentsBuilder assertion handling
(cherry picked from commit 61b47ba)
2014-05-20 01:51:33 +02:00
Juergen Hoeller
54636b3f7c Further UriComponentsBuilder javadoc revision 2014-05-20 01:13:18 +02:00
Juergen Hoeller
545c28fd4e Minor UriComponentsBuilder javadoc revision 2014-05-20 00:47:03 +02:00
Juergen Hoeller
95a7bfd327 Consistent use of IllegalStateException instead of InternalError for UnsupportedEncodingException cause
(cherry picked from commit d9b39ad)
2014-05-20 00:42:48 +02:00
Juergen Hoeller
ccebbf74ec Latest patches from ASM trunk
(cherry picked from commit cfc720d)
2014-05-19 22:59:39 +02:00
Juergen Hoeller
c350080f99 StringUtils.parseLocaleString parses variant correctly when variant contains country code
This commit also includes a JUnit 4 style revision of StringUtilsTests and ObjectUtilsTests.

Issue: SPR-11806
(cherry picked from commit 295a6ae)
2014-05-19 22:46:47 +02:00