mirror of https://github.com/apache/activemq.git
apply patch for: https://issues.apache.org/jira/browse/AMQ-1540
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1158044 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e917f46656
commit
7557f0cfa5
|
@ -40,6 +40,9 @@ public class CreateSubscriber extends DurableSubscriberFacade implements Control
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSelector(String selector) {
|
public void setSelector(String selector) {
|
||||||
|
if (selector != null) {
|
||||||
|
selector = selector.trim();
|
||||||
|
}
|
||||||
this.selector = selector;
|
this.selector = selector;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,8 @@ import org.springframework.web.servlet.mvc.Controller;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a message
|
* Sends a message
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class SendMessage extends DestinationFacade implements Controller {
|
public class SendMessage extends DestinationFacade implements Controller {
|
||||||
|
|
||||||
|
@ -88,6 +88,9 @@ public class SendMessage extends DestinationFacade implements Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setJMSCorrelationID(String correlationID) {
|
public void setJMSCorrelationID(String correlationID) {
|
||||||
|
if (correlationID != null) {
|
||||||
|
correlationID = correlationID.trim();
|
||||||
|
}
|
||||||
jmsCorrelationID = correlationID;
|
jmsCorrelationID = correlationID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,6 +99,9 @@ public class SendMessage extends DestinationFacade implements Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setJMSReplyTo(String replyTo) {
|
public void setJMSReplyTo(String replyTo) {
|
||||||
|
if (replyTo != null) {
|
||||||
|
replyTo = replyTo.trim();
|
||||||
|
}
|
||||||
jmsReplyTo = replyTo;
|
jmsReplyTo = replyTo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,6 +110,9 @@ public class SendMessage extends DestinationFacade implements Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setJMSType(String type) {
|
public void setJMSType(String type) {
|
||||||
|
if (type != null) {
|
||||||
|
type = type.trim();
|
||||||
|
}
|
||||||
jmsType = type;
|
jmsType = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,6 +161,9 @@ public class SendMessage extends DestinationFacade implements Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setJMSMessageCountHeader(String messageCountHeader) {
|
public void setJMSMessageCountHeader(String messageCountHeader) {
|
||||||
|
if (messageCountHeader != null) {
|
||||||
|
messageCountHeader = messageCountHeader.trim();
|
||||||
|
}
|
||||||
jmsMessageCountHeader = messageCountHeader;
|
jmsMessageCountHeader = messageCountHeader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,6 +177,7 @@ public class SendMessage extends DestinationFacade implements Controller {
|
||||||
return client.getSession().createMessage();
|
return client.getSession().createMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
protected void appendHeaders(Message message, HttpServletRequest request) throws JMSException {
|
protected void appendHeaders(Message message, HttpServletRequest request) throws JMSException {
|
||||||
message.setJMSCorrelationID(jmsCorrelationID);
|
message.setJMSCorrelationID(jmsCorrelationID);
|
||||||
if (jmsReplyTo != null && jmsReplyTo.trim().length() > 0) {
|
if (jmsReplyTo != null && jmsReplyTo.trim().length() > 0) {
|
||||||
|
@ -179,7 +192,7 @@ public class SendMessage extends DestinationFacade implements Controller {
|
||||||
Map.Entry entry = (Map.Entry) iter.next();
|
Map.Entry entry = (Map.Entry) iter.next();
|
||||||
String name = (String) entry.getKey();
|
String name = (String) entry.getKey();
|
||||||
if (name.equals("secret")) {
|
if (name.equals("secret")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Object value = entry.getValue();
|
Object value = entry.getValue();
|
||||||
if (isValidPropertyName(name)) {
|
if (isValidPropertyName(name)) {
|
||||||
|
@ -233,8 +246,8 @@ public class SendMessage extends DestinationFacade implements Controller {
|
||||||
// allow JMSX extensions or non JMS properties
|
// allow JMSX extensions or non JMS properties
|
||||||
return name.startsWith("JMSX") || !name.startsWith("JMS");
|
return name.startsWith("JMSX") || !name.startsWith("JMS");
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getSupportedHttpMethods() {
|
public String[] getSupportedHttpMethods() {
|
||||||
return new String[]{"POST"};
|
return new String[]{"POST"};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,6 +88,9 @@ public class DestinationFacade {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setJMSDestination(String destination) {
|
public void setJMSDestination(String destination) {
|
||||||
|
if (destination != null) {
|
||||||
|
destination = destination.trim();
|
||||||
|
}
|
||||||
this.jmsDestination = destination;
|
this.jmsDestination = destination;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,9 @@ public class DurableSubscriberFacade extends DestinationFacade {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setClientId(String clientId) {
|
public void setClientId(String clientId) {
|
||||||
|
if (clientId != null) {
|
||||||
|
clientId = clientId.trim();
|
||||||
|
}
|
||||||
this.clientId = clientId;
|
this.clientId = clientId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,6 +45,9 @@ public class DurableSubscriberFacade extends DestinationFacade {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSubscriberName(String subscriberName) {
|
public void setSubscriberName(String subscriberName) {
|
||||||
|
if (subscriberName != null) {
|
||||||
|
subscriberName = subscriberName.trim();
|
||||||
|
}
|
||||||
this.subscriberName = subscriberName;
|
this.subscriberName = subscriberName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Web Connectors so that messages can be sent via HTTP POST or read via
|
Web Connectors so that messages can be sent via HTTP POST or read via
|
||||||
HTTP POST or GET as well as support for web streaming to we browser or
|
HTTP POST or GET as well as support for web streaming to web browser or
|
||||||
JavaScript clients.
|
JavaScript clients.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue