Support a destinationOptions servlet parameter that configures the destination options used on a destination

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@418311 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-06-30 15:28:15 +00:00
parent d0c46a7726
commit 1e54538e69
1 changed files with 8 additions and 1 deletions

View File

@ -56,10 +56,13 @@ public abstract class MessageServletSupport extends HttpServlet {
private boolean defaultMessagePersistent = true; private boolean defaultMessagePersistent = true;
private int defaultMessagePriority = 5; private int defaultMessagePriority = 5;
private long defaultMessageTimeToLive = 0; private long defaultMessageTimeToLive = 0;
private String destinationOptions;
public void init(ServletConfig servletConfig) throws ServletException { public void init(ServletConfig servletConfig) throws ServletException {
super.init(servletConfig); super.init(servletConfig);
destinationOptions = servletConfig.getInitParameter("destinationOptions");
String name = servletConfig.getInitParameter("topic"); String name = servletConfig.getInitParameter("topic");
if (name != null) { if (name != null) {
defaultTopicFlag = asBoolean(name); defaultTopicFlag = asBoolean(name);
@ -290,6 +293,10 @@ public abstract class MessageServletSupport extends HttpServlet {
else else
is_topic=isTopic(request); is_topic=isTopic(request);
if( destinationOptions!=null ) {
destinationName += "?" + destinationOptions;
}
if (is_topic) { if (is_topic) {
return client.getSession().createTopic(destinationName); return client.getSession().createTopic(destinationName);
} }