Skip to content

Commit f94489f

Browse files
committed
Harmonize packages in jms module
* Move inbound channel adapters into a new `inbound` package * Move outbound channel adapters into a new `outbound` package * Move channels into a new `channel` package * Preserve existing classes in the root package as deprecated and as extensions of new classes * Some tests refactoring (affected files) according to modern AssertJ API * Use now a new in SF `SimpleDestinationResolver` for optimization with caching
1 parent eecf9e9 commit f94489f

File tree

64 files changed

+4045
-3649
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+4045
-3649
lines changed

spring-integration-jms/src/main/java/org/springframework/integration/jms/AbstractJmsChannel.java

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@
1616

1717
package org.springframework.integration.jms;
1818

19-
import org.springframework.integration.IntegrationMessageHeaderAccessor;
2019
import org.springframework.integration.channel.AbstractMessageChannel;
2120
import org.springframework.jms.core.JmsTemplate;
22-
import org.springframework.messaging.Message;
23-
import org.springframework.util.Assert;
2421

2522
/**
2623
* A base {@link AbstractMessageChannel} implementation for JMS-backed message channels.
@@ -30,32 +27,16 @@
3027
*
3128
* @since 2.0
3229
*
33-
* @see PollableJmsChannel
34-
* @see SubscribableJmsChannel
30+
* @see org.springframework.integration.jms.channel.PollableJmsChannel
31+
* @see org.springframework.integration.jms.channel.SubscribableJmsChannel
32+
*
33+
* @deprecated since 7.0 in favor of {@link org.springframework.integration.jms.channel.AbstractJmsChannel}
3534
*/
36-
public abstract class AbstractJmsChannel extends AbstractMessageChannel {
37-
38-
private final JmsTemplate jmsTemplate;
35+
@Deprecated(forRemoval = true, since = "7.0")
36+
public abstract class AbstractJmsChannel extends org.springframework.integration.jms.channel.AbstractJmsChannel {
3937

4038
public AbstractJmsChannel(JmsTemplate jmsTemplate) {
41-
Assert.notNull(jmsTemplate, "jmsTemplate must not be null");
42-
this.jmsTemplate = jmsTemplate;
43-
}
44-
45-
JmsTemplate getJmsTemplate() {
46-
return this.jmsTemplate;
47-
}
48-
49-
@Override
50-
protected boolean doSend(Message<?> message, long timeout) {
51-
try {
52-
DynamicJmsTemplateProperties.setPriority(new IntegrationMessageHeaderAccessor(message).getPriority());
53-
this.jmsTemplate.convertAndSend(message);
54-
}
55-
finally {
56-
DynamicJmsTemplateProperties.clearPriority();
57-
}
58-
return true;
39+
super(jmsTemplate);
5940
}
6041

6142
}

0 commit comments

Comments
 (0)