Added 'pubSubDomain' property to JmsInboundGateway.
This commit is contained in:
@@ -21,6 +21,7 @@ import javax.jms.Destination;
|
|||||||
import javax.jms.JMSException;
|
import javax.jms.JMSException;
|
||||||
import javax.jms.MessageProducer;
|
import javax.jms.MessageProducer;
|
||||||
import javax.jms.Session;
|
import javax.jms.Session;
|
||||||
|
import javax.jms.Topic;
|
||||||
|
|
||||||
import org.springframework.beans.factory.DisposableBean;
|
import org.springframework.beans.factory.DisposableBean;
|
||||||
import org.springframework.core.task.TaskExecutor;
|
import org.springframework.core.task.TaskExecutor;
|
||||||
@@ -48,6 +49,8 @@ public class JmsInboundGateway extends SimpleMessagingGateway implements Disposa
|
|||||||
|
|
||||||
private volatile String destinationName;
|
private volatile String destinationName;
|
||||||
|
|
||||||
|
private volatile boolean pubSubDomain;
|
||||||
|
|
||||||
private volatile MessageConverter messageConverter;
|
private volatile MessageConverter messageConverter;
|
||||||
|
|
||||||
private volatile JmsHeaderMapper headerMapper;
|
private volatile JmsHeaderMapper headerMapper;
|
||||||
@@ -82,6 +85,9 @@ public class JmsInboundGateway extends SimpleMessagingGateway implements Disposa
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setDestination(Destination destination) {
|
public void setDestination(Destination destination) {
|
||||||
|
if (destination instanceof Topic) {
|
||||||
|
this.pubSubDomain = true;
|
||||||
|
}
|
||||||
this.destination = destination;
|
this.destination = destination;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,6 +95,17 @@ public class JmsInboundGateway extends SimpleMessagingGateway implements Disposa
|
|||||||
this.destinationName = destinationName;
|
this.destinationName = destinationName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specify whether the request destination is a Topic. This value is
|
||||||
|
* necessary when providing a destination name for a Topic rather than
|
||||||
|
* a destination reference.
|
||||||
|
*
|
||||||
|
* @param pubSubDomain true if the request destination is a Topic
|
||||||
|
*/
|
||||||
|
public void setPubSubDomain(boolean pubSubDomain) {
|
||||||
|
this.pubSubDomain = pubSubDomain;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provide a {@link MessageConverter} implementation to use when
|
* Provide a {@link MessageConverter} implementation to use when
|
||||||
* converting between JMS Messages and Spring Integration Messages.
|
* converting between JMS Messages and Spring Integration Messages.
|
||||||
@@ -189,6 +206,7 @@ public class JmsInboundGateway extends SimpleMessagingGateway implements Disposa
|
|||||||
if (this.destinationName != null) {
|
if (this.destinationName != null) {
|
||||||
dmlc.setDestinationName(this.destinationName);
|
dmlc.setDestinationName(this.destinationName);
|
||||||
}
|
}
|
||||||
|
dmlc.setPubSubDomain(this.pubSubDomain);
|
||||||
dmlc.setTransactionManager(this.transactionManager);
|
dmlc.setTransactionManager(this.transactionManager);
|
||||||
dmlc.setSessionTransacted(this.sessionTransacted);
|
dmlc.setSessionTransacted(this.sessionTransacted);
|
||||||
dmlc.setSessionAcknowledgeMode(this.sessionAcknowledgeMode);
|
dmlc.setSessionAcknowledgeMode(this.sessionAcknowledgeMode);
|
||||||
|
|||||||
Reference in New Issue
Block a user