Commit Graph

269 Commits

Author SHA1 Message Date
Juergen Hoeller fc629bb508 Polishing 2016-12-29 22:39:36 +01:00
Juergen Hoeller edc62be231 @Scheduled reliably applies after other post-processors and shuts down before TaskScheduler
Issue: SPR-14692
Issue: SPR-15067
2016-12-29 22:35:10 +01:00
Juergen Hoeller 2819f7c781 Polishing 2016-12-22 22:36:07 +01:00
Juergen Hoeller ac774cdcef Avoid deprecated Mockito methods
Issue: SPR-14880
2016-11-04 12:24:46 +01:00
Juergen Hoeller ac80ac6f8b Consistent instanceof/casting of Class references 2016-10-30 21:40:27 +01:00
Philippe Marschall ae5b0c6fb5 Replace J2EE with Java EE
String with version 5 the name of Java Platform, Enterprise Edition
changed from J2EE to Java EE. However a lot of the documentation still
uses the term J2EE.

This commit includes the following changes:

 * replace J2EE with Java EE where appropriate

This is not a blind search and replace. The following occurrences
remain unchanged:

 * references to old J2EE releases, most notably 1.3 and 1.4.
 * references to "Expert One-On-One J2EE Design and Development"
 * references to "Core J2EE patterns"
 * XML namespaces
 * package names

Issue: SPR-14811
See gh-1206
2016-10-15 11:49:00 +03:00
Juergen Hoeller edbc1e9212 Avoid outdated Tibco workaround in shouldCommitAfterNoMessageReceived
Issue: SPR-14697
2016-09-13 21:34:47 +02:00
Juergen Hoeller 8c5660683a MappingJackson2MessageConverter adds message id and destination to type resolution exception
Issue: SPR-14672
2016-09-10 12:37:55 +02:00
Juergen Hoeller 59a24b406a Polishing 2016-08-10 14:20:42 +02:00
Juergen Hoeller b9ab895743 Inferred generics for newSetFromMap arrangements
Issue: SPR-13188
2016-07-26 21:26:31 +02:00
Juergen Hoeller e03dea1d64 Polishing 2016-07-26 17:15:19 +02:00
Juergen Hoeller d07381e862 Avoid deprecated number constructors on JDK 9
Issue: SPR-13344
2016-07-19 19:25:55 +02:00
Juergen Hoeller c43e7497c1 Fixed typo: "occured"->"occurred" 2016-07-08 15:12:16 +02:00
Stephane Nicoll e4b0486c5a Add @FunctionalInterface on candidate interfaces
Issue: SPR-14432
2016-07-06 14:32:13 +02:00
Juergen Hoeller 355c6f0715 Upgrade to JMS 2.0 and JCA 1.7
Issue: SPR-13793
2016-07-05 22:18:19 +02:00
Juergen Hoeller bc2c22d51e Streamline XML namespace support towards unversioned schemas
This commit also removes support code for outdated options which were only available in older schema versions.

Issue: SPR-13499
2016-07-05 20:50:03 +02:00
Sam Brannen 1391248ea6 Introduce log4j 2 for Spring's test suite
This commit adds a test runtime dependency on log4j 2 for every project
and migrates all log4j.properties files to log4j2-test.xml files.

Issue: SPR-14431
2016-07-05 19:19:09 +02:00
Stephane Nicoll 00d2606b00 Explicit type can be replaced by <>
Issue: SPR-13188
2016-07-05 17:00:34 +02:00
Juergen Hoeller b5db5d3aac Broadly remove deprecated core classes and methods
Issue: SPR-14430
2016-07-05 15:52:49 +02:00
Stephane Nicoll eba873067c Better hide lazy resolution of JMS payloads
This commit fixes MessagingMessageConverter to no longer expose the lazy
message resolution algorithm. This restores proper behaviour for
converters used outside of that context.

Instead, such arrangement is now private to
AbstractAdaptableMessageListener (as it should).

Issue: SPR-14389
2016-06-29 18:10:34 +02:00
Stephane Nicoll 9c02a99d38 Polish doc
SPR-14290
2016-05-20 09:57:41 +02:00
Juergen Hoeller 8c139ef444 Polishing 2016-05-04 17:37:30 +02:00
Juergen Hoeller 07ea3745c4 Polishing 2016-05-02 13:54:47 +02:00
Stephane Nicoll 09b45d2c0f Validate callback is always invoked in DMLC#stop
The underlying issue has been fixed in e45d33f and this commit is merely
adding a test of the expected behaviour.

Issue: SPR-14233
2016-05-02 13:33:05 +02:00
Juergen Hoeller f83cbff543 Consistent SmartLifecycle implementations
Issue: SPR-14233
2016-05-02 13:01:44 +02:00
Juergen Hoeller e45d33f9de DefaultMessageListenerContainer immediately invokes stop callback when not running
Issue: SPR-14233
2016-05-02 12:57:30 +02:00
Juergen Hoeller 6ab8d36ed0 DefaultMessageListenerContainer's recovery phase uses wait instead of sleep
Issue: SPR-14200
2016-04-27 21:27:21 +02:00
Juergen Hoeller 87b93a7ae9 Aligned JmsTemplate and DefaultMessageListenerContainer receiveTimeout values
Issue: SPR-14212
2016-04-26 17:09:57 +02:00
Johnny Lim 44e652f99e Remove duplicate words
Closes gh-1039
2016-04-19 08:24:21 +02:00
Juergen Hoeller 537193a4e0 Consistent license header 2016-04-11 20:49:38 +02:00
Juergen Hoeller 26378cd604 Polishing 2016-04-04 20:51:30 +02:00
Stephane Nicoll 996c1cc0a6 Fix Auto-Startup for @JmsListener
Ignore container's auto-startup once the context is refreshed.

Issue: SPR-14015
2016-04-04 18:21:10 +02:00
Sam Brannen 2ed3382a60 Document composed support for @Scheduled, @JmsListener, & @Sql
Issue: SPR-13973
2016-03-29 19:53:58 +02:00
Juergen Hoeller 54aeb7a5d6 Cache key classes implement Comparable and consistently provide a toString representation
Issue: SPR-14017
2016-03-26 14:32:10 +01:00
Sam Brannen 4742aa0bfe Test @JmsListener as a merged composed annotation
Issue: SPR-13973
2016-03-26 01:09:35 +01:00
Sam Brannen 2353f39ee4 Clean up warnings 2016-03-26 01:08:58 +01:00
Juergen Hoeller c6ff0951fc Polishing 2016-03-25 23:46:18 +01:00
Sam Brannen d572b022cc Support @JmsListener as a merged composed annotation
Issue: SPR-13973
2016-03-25 00:51:24 +01:00
Juergen Hoeller 517ebd1d3e Consistent formatting 2016-03-24 19:22:50 +01:00
Juergen Hoeller 5025c615b1 Consistent use of AnnotatedElementUtils.findMergedAnnotation/hasAnnotation
Issue: SPR-13440
2016-03-23 18:39:20 +01:00
Rossen Stoyanchev f33578ef0f Fix failing test and warings
The test failure was caused by the previous commit. The Message
resolver now supports payload conversion so it can raise a
MessageConversionException, not MethodArgumentTypeMismatchException.
2016-02-18 22:37:57 -05:00
Juergen Hoeller ea4a766df7 Consistent support for SpEL next to placeholders in annotation attributes
Issue: SPR-13625
2016-02-17 23:00:07 +01:00
Juergen Hoeller 1253b451f5 DefaultMessageListenerContainer stops if recovery failed after interrupt signal
Issue: SPR-11787
2016-02-16 22:28:10 +01:00
Juergen Hoeller e90310612f Polishing 2016-02-04 20:00:00 +01:00
Stephane Nicoll a112557dc4 Support SendTo at class-level
Issue: SPR-13578
2016-01-16 16:34:02 +01:00
Stephane Nicoll dc8de51408 Json view support for JMS
Support of @JsonView on @JmsListener annotated method that uses the
jackson converter. Also update MappingJackson2MessageConverter to offer
a public API to set the JSON view to use to serialize a payload.

Issue: SPR-13237
2016-01-15 17:18:14 +01:00
Stephane Nicoll 31a3607de6 Lazy resolution of the JMS message
Previously, any `javax.jms.Message` was converted eagerly to the Message
abstraction. This leads to unnecessary conversion if the Payload is not
requested by the underlying method (i.e. if the `javax.jms.Message` is
injected directly).

This commit returns a `Message` implementation that holds the
`javax.jms.Message` and lazily resolve the payload or the headers on
demand (that is the first time they are requested).

Issue: SPR-13777
2016-01-14 17:20:25 +01:00
Juergen Hoeller 470ea977e1 Consistent validation of annotated methods behind AOP proxies
Issue: SPR-13816
2015-12-23 20:47:28 +01:00
Sam Brannen 5b3edcd9f9 Spring Cleaning in December
- Delete unused imports
- Delete unused code
- Clean up warnings
2015-12-17 20:27:33 +01:00
Juergen Hoeller 8ce5e88c66 Require Jackson 2.6+, FreeMarker 2.3.21+, XStream 1.4.5+
Issue: SPR-13062
2015-12-17 17:14:50 +01:00
Stephane Nicoll 752d3c715a Initiate structure for 4.3 XSDs 2015-12-17 15:43:23 +01:00
Juergen Hoeller 11806b9215 Class identity comparisons wherever possible (and further polishing)
Issue: SPR-12926
2015-12-09 12:28:09 +01:00
Juergen Hoeller 8346eeda27 Reset BytesMessage after payload extraction
Issue: SPR-13769
2015-12-08 17:12:38 +01:00
Juergen Hoeller 9589749fb2 Introduced createMethodJmsListenerEndpoint template method
Issue: SPR-13774
2015-12-08 17:07:40 +01:00
Johnny Lim 2defb6555e Fix broken Javadoc related to `<` and `>` 2015-11-12 11:22:08 +01:00
Juergen Hoeller 760bc719f2 Polishing 2015-11-09 15:03:14 +01:00
Juergen Hoeller da9c80c604 Revised method selection for JMS listeners (and their parameters)
Issue: SPR-13576
2015-11-09 15:02:15 +01:00
Stephane Nicoll 77af692e5e Polishing
Issue: SPR-13633
2015-11-02 20:35:41 +01:00
Stephane Nicoll 1bc41bdf0f Expose JMS message listener container ids
Issue: SPR-13633
2015-11-02 16:13:47 +01:00
Juergen Hoeller af213a09ee Polishing 2015-10-07 13:25:41 +02:00
Sam Brannen d5ee787e1e Migrate JUnit 3 tests to JUnit 4
This commit migrates all remaining tests from JUnit 3 to JUnit 4, with
the exception of Spring's legacy JUnit 3.8 based testing framework that
is still in use in the spring-orm module.

Issue: SPR-13514
2015-09-27 21:17:51 +02:00
Juergen Hoeller 1ed1167153 Avoid ConcurrentModificationException in SingleConnectionFactory's AggregatedExceptionListener
Issue: SPR-13421
2015-09-02 16:55:09 +02:00
Juergen Hoeller 965fca808a Polishing 2015-07-29 01:08:16 +02:00
Juergen Hoeller faab220946 Initial test for Jackson-based JMS reply
Issue: SPR-13237
2015-07-29 01:06:38 +02:00
Juergen Hoeller 14f27bda37 Prefer use of "Java EE" over "J2EE" 2015-07-27 15:32:56 +02:00
Juergen Hoeller e5a2b34829 Clarify acknowledge mode semantics and transaction recommendations
Issue: SPR-13278
2015-07-27 15:32:18 +02:00
Juergen Hoeller edd6e76b9f Polishing 2015-07-21 22:58:34 +02:00
Juergen Hoeller 203f1225c3 Polishing 2015-07-17 15:25:43 +02:00
Stephane Nicoll 4631add6cf Add support for repeatable JmsListener
Previously, a method could only declare one Jms endpoint so if several
destinations share the exact same business logic, you'd still need one
separate method declaration per destination.

We now make sure that JmsListener is a repeatable annotation, introducing
JmsListeners for pre Java8 use cases.

Issue: SPR-13147
2015-06-22 13:01:42 +02:00
Stephane Nicoll c8fcdadbae Polish
Review bd093eb to provide a generic type on `JmsResponse`

Issue: SPR-13133
2015-06-16 15:33:50 +02:00
Stephane Nicoll bd093eb6bf Runtime resolution of JMS reply destination
Add JmsResponse that can be used as return type of any JMS listener
method to indicate not only the response but also the actual destination
to which the reply should be sent.

Issue: SPR-13133
2015-06-16 15:02:22 +02:00
Juergen Hoeller ad55687627 Polishing 2015-06-11 12:33:30 +02:00
Sam Brannen 60a5ec87d0 Introduce alias for 'value' attribute in @Header
This commit introduces 'name' as an alias for 'value' in @Header.

Issue: SPR-11393
2015-05-29 23:23:52 +02:00
Juergen Hoeller 05d475a275 Polishing 2015-05-22 23:50:47 +02:00
Juergen Hoeller fee63fdfb8 Message listener containers only call Session.recover() in client acknowledge mode
Issue: SPR-13056
2015-05-22 12:16:59 +02:00
Juergen Hoeller b4095c3e1d Class identity comparisons wherever possible
Issue: SPR-12926
2015-05-20 14:34:16 +02:00
Juergen Hoeller 72894b26c2 Fix conversion of Message<?> payload for replies
If a custom MessageConverter is set, it is not used for replies defined
via the Message abstraction. This commit harmonizes the behaviour of the
`MessagingMessageConverter` so that the conversion of the payload can
be converted for both incoming and outgoing messages.

Issue: SPR-12912
2015-04-20 13:29:32 +02:00
Stephane Nicoll 444b9032be Apply DestinationResolver to listener container
Previously, a custom `DestinationResolver` was not made available
to the underlying `MessageListener`: if a reply needs to be sent, the
default `DestinationResolver` was used.

This commit ensures that if a custom `DestinationResolver` has been set,
it is also configured accordingly for replies.

Issue: SPR-12927
2015-04-20 09:51:33 +02:00
Juergen Hoeller d398bb7c51 DefaultMessageListenerContainer uses receiveTimeout for wait call on shutdown
Issue: SPR-11841
2015-04-16 22:49:45 +02:00
Stephane Nicoll f98a6c6b6a Support expression in @SendTo
The attributes of @JmsListener allows to specify the reference to a key
in the Environment but @SendTo did not.

This commit fixes this inconsistency so that response destinations are
now also externally configurable.

Issue: SPR-12899
2015-04-16 18:18:29 +02:00
Stephane Nicoll 2c7d2d38a9 Support custom resolution of response destination
Previously, the "pubSubDomain" drove the resolution of both the
destination of the listener and the default response destination.

A new "replyPubSubDomain" attribute has been added on the base listener
and  can be used to listen on a topic and reply to a queue (or vice
versa). The attribute is exposed via the "response-destination-type" XML
attribute on the listener container element. It is also available on the
JmsListenerContainerFactory for use with the @JmsListener infrastructure.

Issue: SPR-12911
2015-04-16 17:29:48 +02:00
Stephane Nicoll 6f3570a0f6 Add auto-startup support for JmsListenerContainerFactory
The auto startup flag can now be set on a JmsListenerContainerFactory to
control if the created container should be started automatically when the
application context starts.

Issue: SPR-12824
2015-04-07 11:32:57 +02:00
Juergen Hoeller 6f98cf3add Explicit documentation on 4.1+ properties in AbstractMessageListenerContainer 2015-03-17 21:41:37 +01:00
Juergen Hoeller b541fc9366 Polishing 2015-03-05 18:56:57 +01:00
Stephane Nicoll 31df7155ab Refine BeanPostProcessorChecker condition
Previously, adding `@EnableAsync` on a blank application would lead to an
info message stating that `ProxyAsyncConfiguration` is not eligible for
getting processed by all BeanPostProcessors. Concretely, this is ok as
such internal configuration is not meant to be a target of such post
processing.

Revisit the condition for non infrastructure bean only. Add the
infrastructure role to a set of internal configuration, including the
`ProxyAsyncConfiguration`.

Issue: SPR-12761
2015-03-05 11:37:11 +01:00
Stephane Nicoll 5c9f09c2c7 Register lazy @JmsListener components
Support the creation and registration of message listener containers in
a lazy manner, that is after the container initialization has completed.

Such support brought an interesting brainstorming of the thread safety
if JmsListenerEndpointRegistrar and JmsListenerEndpointRegistry so those
have also been revisited as part of this commit.

Issue: SPR-12774
2015-03-04 16:59:55 +01:00
Juergen Hoeller fdd1f83639 Polishing
(cherry picked from commit 3783591)
2015-03-02 22:05:16 +01:00
Juergen Hoeller c1a9e3484a Revised documentation on AUTO_ACKNOWLEDGE behavior
Issue: SPR-12705
2015-02-27 22:28:18 +01:00
Stephane Nicoll dff2a3d180 Reduce logging level of EventListenerMethodProcessor
Reduce logging level when no target annotation is found a on bean. For
consistency, update ScheduledAnnotationBeanPostProcessor and
JmsListenerAnnotationBeanPostProcessor that define the same log
statement.

Issue: SPR-12574
2015-02-26 13:33:19 +01:00
Sam Brannen 65b6017db9 Return exception from convertJmsInvokerAccessException()
The convertJmsInvokerAccessException() method in
JmsInvokerClientInterceptor now correctly returns the converted
exception instead of throwing it.
2015-02-19 22:18:52 +01:00
Sam Brannen 53c2531a8b Polish Javadoc for JmsInvokerClientInterceptor 2015-02-19 22:15:51 +01:00
Stephane Nicoll 8fcbdaee24 Handle receive timeout in JmsInvokerClientInterceptor
JmsInvokerClientInterceptor defines a receiveTimeout field but does not
handle such timeout. This commit adds an additional callback that throws
an RemoteTimeoutException instead.

Sub-classes can override the onReceiveTimeout to throw a different
exception or return a fallback RemoteInvocationResult.

Issue: SPR-12731
2015-02-19 17:13:48 +01:00
Stephane Nicoll adc7ad7fb2 Fix detection of the @SendTo annotation
Previously, the default reply destination could not be discovered if the
@JmsListener annotation was placed on a bean that is eligible for
proxying as the proxy method is used internally and does not reveal
an annotation placed on the implementation.

This commit makes sure to resolve the most specific method when
searching that annotation.

Issue: SPR-12513
2014-12-08 10:56:02 +01:00
Sebastien Deleuze fbd85925de Use Jackson improved default configuration everywhere
With this commit, Jackson builder is now used in spring-websocket
to create the ObjectMapper instance.

It is not possible to use the builder for spring-messaging
and spring-jms since these modules don't have a dependency on
spring-web, thus they now just customize the same features:
 - MapperFeature#DEFAULT_VIEW_INCLUSION is disabled
 - DeserializationFeature#FAIL_ON_UNKNOWN_PROPERTIES is disabled

Issue: SPR-12293
2014-12-03 09:49:41 +01:00
Juergen Hoeller e02c23eea4 Straight JmsMessagingTemplate setup based on JMS ConnectionFactory
Issue: SPR-12413
2014-11-06 14:29:29 +01:00
Sam Brannen 78459504e0 Clean up warnings in spring-jms 2014-11-01 16:18:32 +01:00
Juergen Hoeller 1146d5ba1d Polishing 2014-10-29 22:44:59 +01:00
Juergen Hoeller 4927c9054f Revised SingleConnectionFactory for individual proxies with ExceptionListener and start/stop state
Issue: SPR-10397
2014-10-29 22:43:48 +01:00
Sam Brannen 4412bc68aa Polish Javadoc 2014-10-23 01:06:12 +02:00
Juergen Hoeller 8325b10080 Consistent formatting of license headers, package javadocs, and import declarations 2014-10-21 01:44:07 +02:00