Commit Graph

104 Commits

Author SHA1 Message Date
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
Juergen Hoeller
57d63a1903 JdbcTemplate and JmsTemplate pass settings with 0 values on to the driver
Issue: SPR-12338
2014-10-17 19:54:30 +02:00
Juergen Hoeller
e58b33a593 Consistent reset of resource holders on doBegin failure
Issue: SPR-12280
2014-10-06 20:31:45 +02:00
Juergen Hoeller
7bc8e5199e Polishing 2014-09-29 23:50:23 +02:00
Juergen Hoeller
cfd9fd6863 Polishing 2014-09-29 17:35:23 +02:00
Stephane Nicoll
bb45fb4538 Restore sleep interval between recovery attempt
Commit 6a04831 introduced a regression that lead to burst recovery
attempts when the broker is up but the listener is failing for some
reason (the most obvious one being that the destination does not
exist).

Since the sleep period between recovery attempts strategy is more
complex, we can't just sleep for a period of time. But we can create
an execution and apply it once which should work just fine for most
use cases.

Issue: SPR-12183
2014-09-29 15:35:07 +02:00
Sam Brannen
9f6c0cb166 Polish Javadoc for @JmsListener 2014-09-28 15:12:07 +02:00
Juergen Hoeller
58b22ceddc Scheduled/JmsListenerAnnotationBeanPostProcessor avoids needless re-scanning of non-annotated classes
Issue: SPR-12189
2014-09-17 21:55:35 +02:00
Juergen Hoeller
82f8b4330c CachingConnectionFactory proceeds to physicalClose in case of logicalClose exceptions
Issue: SPR-12148
2014-09-04 00:36:17 +02:00
Juergen Hoeller
98eb0f75bc Polishing 2014-09-02 22:15:53 +02:00
Stephane Nicoll
da8771d5a9 polishing 2014-09-01 18:31:07 +02:00
Stephane Nicoll
8c4388dd6e Place holder resolution in @JmsListener arguments
This commit allows to use place holder definitions for JmsListener
attributes, effectively allowing to externalize those settings from
the code.

Issue: SPR-12134
2014-09-01 16:27:47 +02:00
Juergen Hoeller
c06ac06bdd JmsMessagingTemplate uses local convertJmsException template method instead of generic MessagingExceptionTranslator interface
This commit also turns MessagingException into a NestedRuntimeException subclass which delivers a root message that has the cause message appended to it. That's a common expectation with the use of Spring exceptions since all of our exception hierarchies have historically been designed that way.

Issue: SPR-12064
Issue: SPR-12038
2014-08-09 22:06:50 +02:00
Stephane Nicoll
5b35fc2d77 Add JmsTemplate accessor in JmsMessagingTemplate 2014-08-08 18:09:16 +02:00
Stephane Nicoll
c1d149591a Add base header mapper implementation 2014-08-08 16:59:42 +02:00
Stephane Nicoll
4a1a622004 polishing 2014-08-08 09:37:47 +02:00
Stephane Nicoll
3da68cfe21 Remove unused imports 2014-08-04 14:13:40 +02:00
Stephane Nicoll
7d1e33d88d Move JmsHandlerMethodFactory to spring-messaging
This commit moves JmsHandlerMethodFactory and its default
implementation to the messaging abstraction. Working on a similar
support for AMQP revealed that this factory has nothing that is JMS
specific and is exactly identical in the case of AMQP.

Issue: SPR-12053
2014-08-01 16:08:31 +02:00
Stephane Nicoll
515b9649fa Fix javadoc typo 2014-07-30 08:45:26 +02:00
Juergen Hoeller
1fe742addf MessagingExceptionTranslator lives in support subpackage now
Issue: SPR-12038
2014-07-29 16:22:47 +02:00
Stephane Nicoll
89d63eb79b JmsMessagingTemplate exception management
This commit introduces MessagingExceptionTranslator, a messaging
exception translation infrastructure similar to what
PersistenceExceptionTranslator provides.

JmsMessagingTemplate does not throw raw JmsException anymore but
translates those to an instance of Spring's MessagingException
hierarchy.

Issue: SPR-12038
2014-07-29 12:29:43 +02:00
Juergen Hoeller
036896a6b8 Split configuration constants into local XConfigUtils classes instead of piling them up in AnnotationConfigUtils 2014-07-28 21:58:21 +02:00
Juergen Hoeller
92c657e12d JmsListener/ScheduledAnnotationBeanPostProcessor uses SmartInitializingSingleton instead of ContextRefreshedEvent
Also reducing the container dependencies to BeanFactory instead of ApplicationContext, wherever possible.

Issue: SPR-12039
2014-07-28 15:58:13 +02:00
Stephane Nicoll
b6389a6c66 Jms request/reply operations
This commit updates JmsMessagingTemplate to support the
MessageRequestReplyOperation interface that provides synchronous
request/reply operations.

As JmsMessagingTemplate delegates everything under the scenes to
JmsTemplate, the latter has been updated as well to offer such lower
level operation.

Issue: SPR-12037
2014-07-28 15:52:50 +02:00
Stephane Nicoll
0a46f38527 polishing 2014-07-24 17:12:31 +02:00
Juergen Hoeller
c082220b34 AbstractMessageListenerContainer calls "Session.recover()" in case of rollback attempt on non-transacted Session
Issue: SPR-12015
2014-07-22 16:50:41 +02:00
Juergen Hoeller
3be190df6a Consistent removal of JMS 1.0.2 references 2014-07-18 17:21:31 +02:00
Juergen Hoeller
a9100c427c Revision of JMS annotated endpoint support, plus support for JMS 2.0's shared subscriptions
Issue: SPR-9882
Issue: SPR-11969
2014-07-18 17:21:21 +02:00
Stephane Nicoll
dd713c70aa Fix typo 2014-07-18 11:50:49 +02:00
Stephane Nicoll
29bdbceaa2 Customize concurrency at listener level
Prior to this commit, customizing the concurrency to use fo a given JMS
listener involved to define it in a specific listener-container. As
this is quite restrictive, users may stop using the XML namespace
support altogether to fallback on regular abstract bean definition for
the container.

This commit adds a concurrency attribute to the jms and jca listener
element as well as on the @JmsListener annotation. If the value is set,
it takes precedence; otherwise the value provided by the factory is
used.

Issue: SPR-11988
2014-07-14 15:49:31 +02:00
Juergen Hoeller
fa4f51c5d0 Subpackage rearrangements within 4.1's jms-messaging alignment
Issue: SPR-10873
2014-07-09 22:19:14 +02:00
Juergen Hoeller
1fadd1c954 BackOff abstraction lives in util.backoff subpackage now
Issue: SPR-11746
2014-07-09 21:53:32 +02:00
Juergen Hoeller
55c351523d Polishing 2014-07-07 16:28:48 +02:00
Juergen Hoeller
b9a70c6000 Refined CachingConnectionFactory log messages
Issue: SPR-11956
2014-07-05 08:59:11 +02:00
Juergen Hoeller
6fd0fc7005 CachedSessionInvocationHandler includes durable flag in ConsumerCacheKey
Issue: SPR-11956
2014-07-05 08:49:28 +02:00
Juergen Hoeller
7a7641bd23 CachedSessionInvocationHandler properly caches createSharedConsumer results
Issue: SPR-11956
2014-07-04 22:20:19 +02:00
Juergen Hoeller
b6a7957dc4 Revised Jms2MessageProducerInvocationHandler implementation with switch statement
Issue: SPR-11950
2014-07-04 16:09:06 +02:00
Stephane Nicoll
c2da846732 Add support for extra MessageProducer method
This commit supports two additional methods of the MessageProducer
interface as from JMS 2.0

An integration test infrastructure is necessary to be able to test
those scenario: this is taken care of in a separated initiative.

Issue: SPR-11950
2014-07-04 14:08:56 +02:00
Juergen Hoeller
134e5a2aec Jms2MessageProducerInvocationHandler properly delegates to CachedMessageProducer.this
Issue: SPR-11949
2014-07-04 00:25:43 +02:00
Juergen Hoeller
98d6f7b443 Polishing 2014-06-26 16:01:24 +02:00
Stephane Nicoll
674bad4cfa Clarify the use of sessionTransacted
This commit clarifies the role of the external transactionManager for
a DMLC and the relationship with the sessionTransacted flag

Issue: SPR-9200
2014-06-02 17:52:03 +02:00
Stephane Nicoll
12a9df8a1c Throw a proper exception if no convert is found
Prior to this commit, no exception was raised if a message could not
be converted to the requested payload because no suitable converter
were found.

This commit adds an explicit check if the converted payload is null.

Issue: SPR-11817
2014-05-28 16:48:48 +02:00