You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2008/08/18 23:08:10 UTC

svn commit: r686868 - in /incubator/uima/sandbox/trunk/uima-as: uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/ uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/details/ uimaj-ep-deployeditor/src/main/java/org/apache/u...

Author: schor
Date: Mon Aug 18 14:08:10 2008
New Revision: 686868

URL: http://svn.apache.org/viewvc?rev=686868&view=rev
Log:
[UIMA-1130] apply patch to allow setting of the number of concurrent consumers for remote reply queues, and only support remote reply queues for remote delegates

Modified:
    incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/Messages.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/details/AEMetaDataDetailsPage.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/hover/DDEInformationControl.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/page/OverviewPage.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/resources/org/apache/uima/dde/internal/messages.properties
    incubator/uima/sandbox/trunk/uima-as/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/AEDeploymentConstants.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/RemoteAEDeploymentMetaData.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/impl/RemoteAEDeploymentMetaData_Impl.java

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/Messages.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/Messages.java?rev=686868&r1=686867&r2=686868&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/Messages.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/Messages.java Mon Aug 18 14:08:10 2008
@@ -68,6 +68,21 @@
 
   static public String DDE_AEConfigPage_ErrorConfig_Section_Title;
 
+  static public String DDE_AEMetaDataDetails_RunAsASAggregate;
+
+  static public String DDE_AEMetaDataDetails_NumberOfReplicatedInstances;
+
+  static public String DDE_AEMetaDataDetails_PoolSizeOfCM;
+
+  static public String DDE_AEMetaDataDetails_InitalSizeOfCASHeap;
+  
+  static public String DDE_AEMetaDataDetails_BrokerURLForRemote;
+
+  static public String DDE_AEMetaDataDetails_QueueNameForRemote;
+
+  static public String DDE_AEMetaDataDetails_NumberOfConsumers;
+
+
   /** ************************************************************************ */
 
   private Messages() {

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/details/AEMetaDataDetailsPage.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/details/AEMetaDataDetailsPage.java?rev=686868&r1=686867&r2=686868&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/details/AEMetaDataDetailsPage.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/details/AEMetaDataDetailsPage.java Mon Aug 18 14:08:10 2008
@@ -151,6 +151,8 @@
   protected Text endPoint;
 
   protected CCombo remoteQueueLocation;
+  
+  protected Spinner replyQueueConsumers;
 
   protected Label serializerMethod;
 
@@ -202,17 +204,11 @@
       } else if (e.getSource() == initialFsHeapSizeRemote) {
           updateInitialFsHeapSize(initialFsHeapSizeRemote.getSelection());
 
-      } else if (e.getSource() == remoteQueueLocation) {
-        String location;
-        if (remoteQueueLocation.getText().equals("no")) {
-          location = "local";
-        } else {
-          location = "remote";
-        }
-        ((RemoteAEDeploymentMetaData) currentMetaDataObject).setReplyQueueLocation(location);
+      } else if (e.getSource() == replyQueueConsumers) {
+        ((RemoteAEDeploymentMetaData) currentMetaDataObject).setReplyQueueConcurrentConsumers(replyQueueConsumers.getSelection());
       }
       multiPageEditor.setFileDirty();
-    }
+    } 
   };
 
   protected SelectionListener deploymentListener = new SelectionAdapter() {
@@ -383,7 +379,7 @@
     // /////////////////////////////////////////////////////////////////////
 
     // Run in AS mode
-    asMode = toolkit.createButton(compositeCoLocatedSetting, "Run as AS aggregate", SWT.CHECK);
+    asMode = toolkit.createButton(compositeCoLocatedSetting, Messages.DDE_AEMetaDataDetails_RunAsASAggregate, SWT.CHECK);
     gd = new GridData();
     gd.horizontalSpan = 2;
     asMode.setLayoutData(gd);
@@ -391,13 +387,13 @@
 
     // <scaleout numberOfInstances="1"/> <!-- optional -->
     scaleout = FormSection2.createLabelAndSpinner(toolkit, compositeCoLocatedSetting,
-            "Number of replicated instances:", SWT.BORDER, 1, Integer.MAX_VALUE, false);
+            Messages.DDE_AEMetaDataDetails_NumberOfReplicatedInstances, SWT.BORDER, 1, Integer.MAX_VALUE, false);
     scaleout.setSelection(1);
     scaleout.addSelectionListener(asynAggregateListener);
 
     // <casMultiplier poolSize="5"/> <!-- optional -->
     casMultiplierLabel = toolkit.createLabel(compositeCoLocatedSetting,
-            "Pool size for CAS Multiplier:");
+            Messages.DDE_AEMetaDataDetails_PoolSizeOfCM);
     casMultiplier = FormSection2.createLabelAndSpinner(toolkit, compositeCoLocatedSetting,
             casMultiplierLabel, SWT.BORDER, 0, Integer.MAX_VALUE, false);
     casMultiplier.setSelection(0);
@@ -405,7 +401,7 @@
     
     // initialFsHeapSize (default size is 2M)
     initialFsHeapSizeLabel = toolkit.createLabel(compositeCoLocatedSetting,
-            "Initial size of CAS heap (in bytes):");
+            Messages.DDE_AEMetaDataDetails_InitalSizeOfCASHeap);
     initialFsHeapSize = FormSection2.createLabelAndSpinner(toolkit, compositeCoLocatedSetting,
             initialFsHeapSizeLabel, SWT.BORDER, 1, 
             Integer.MAX_VALUE, false, FormSection2.MAX_DECORATION_WIDTH);
@@ -420,7 +416,7 @@
 
     // Note: Need to add SWT.BORDER style to make the border VISIBLE in Linux
     brokerUrlDecoField = FormSection2.createLabelAndDecoratedText(toolkit, 
-            compositeRemoteSetting, "Broker URL for remote service:", 
+            compositeRemoteSetting, Messages.DDE_AEMetaDataDetails_BrokerURLForRemote, 
             currentMetaDataObject == null ?
                     "":((RemoteAEDeploymentMetaData) currentMetaDataObject).getInputQueue().getBrokerURL(), 
                     SWT.WRAP | SWT.BORDER, 10, 0);
@@ -437,7 +433,7 @@
 
     // Note: Need to add SWT.BORDER style to make the border VISIBLE in Linux
     endPointDecoField = FormSection2.createLabelAndDecoratedText(toolkit, 
-            compositeRemoteSetting, "Queue name for remote service:", 
+            compositeRemoteSetting, Messages.DDE_AEMetaDataDetails_QueueNameForRemote, 
             currentMetaDataObject == null ?
                     "":((RemoteAEDeploymentMetaData) currentMetaDataObject).getInputQueue().getEndPoint(), 
                     SWT.WRAP | SWT.BORDER, 10, 0);
@@ -448,16 +444,16 @@
     decorationEndPoint.setDescription("The name of the queue cannot be empty");
     endPointDecoField.addFieldDecoration(decorationEndPoint, SWT.LEFT | SWT.TOP, false);    
    
-    remoteQueueLocation = FormSection.createLabelAndCCombo(toolkit, compositeRemoteSetting,
-            "Service client is inside firewall:", SWT.BORDER | SWT.FLAT | SWT.READ_ONLY);
-    remoteQueueLocation.add("no");  // local
-    remoteQueueLocation.add("yes"); // remote
-    remoteQueueLocation.select(0);
-    remoteQueueLocation.addSelectionListener(asynAggregateListener);
+    replyQueueConsumers = FormSection2.createLabelAndSpinner(toolkit, compositeRemoteSetting,
+            Messages.DDE_AEMetaDataDetails_NumberOfConsumers, SWT.BORDER, 1, 
+            Integer.MAX_VALUE, false, FormSection2.MAX_DECORATION_WIDTH);
+    replyQueueConsumers.setSelection(1);
+    replyQueueConsumers.addSelectionListener(asynAggregateListener);
+
 
     // <casMultiplier poolSize="5"/> <!-- optional -->
     casMultiplierLabelRemote = toolkit.createLabel(compositeRemoteSetting,
-            "Pool size of CasMultiplier:");
+            Messages.DDE_AEMetaDataDetails_PoolSizeOfCM);
     casMultiplierRemote = FormSection2.createLabelAndSpinner(toolkit, compositeRemoteSetting,
             casMultiplierLabelRemote, SWT.BORDER, 0, Integer.MAX_VALUE, false);
     casMultiplierRemote.setSelection(0);
@@ -465,7 +461,7 @@
 
     // initialFsHeapSize (default size is 2M)
     initialFsHeapSizeLabelRemote = toolkit.createLabel(compositeRemoteSetting,
-            "Initial size of CAS heap (in bytes):");
+            Messages.DDE_AEMetaDataDetails_InitalSizeOfCASHeap);
     initialFsHeapSizeRemote = FormSection2.createLabelAndSpinner(toolkit, compositeRemoteSetting,
             initialFsHeapSizeLabelRemote, SWT.BORDER, 1, 
             Integer.MAX_VALUE, false, FormSection2.MAX_DECORATION_WIDTH);
@@ -618,18 +614,8 @@
       endPoint.setText(obj.getInputQueue().getEndPoint());
     }
 
-    if (obj.getReplyQueueLocation() != null) {
-      String yesOrno;
-      if (obj.getReplyQueueLocation().equals("local")) {
-        yesOrno = "no";
-      } else {
-        yesOrno = "yes";
-      }
-
-      int i = remoteQueueLocation.indexOf(yesOrno);
-      if (i >= 0) {
-        remoteQueueLocation.select(i);
-      }
+    if (obj.getReplyQueueConcurrentConsumers() > 0) {
+      replyQueueConsumers.setSelection(obj.getReplyQueueConcurrentConsumers());
     }
 
     if (obj.getResourceSpecifier() != null) {

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/hover/DDEInformationControl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/hover/DDEInformationControl.java?rev=686868&r1=686867&r2=686868&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/hover/DDEInformationControl.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/hover/DDEInformationControl.java Mon Aug 18 14:08:10 2008
@@ -263,8 +263,8 @@
             + (obj.getInputQueue() != null ? obj.getInputQueue().getBrokerURL() : "") + "</li>");
     buf.append("<li><b>Queue Name:</b> "
             + (obj.getInputQueue() != null ? obj.getInputQueue().getEndPoint() : "") + "</li>");
-    if (obj.getReplyQueueLocation() != null) {
-      buf.append("<li><b>Remote Queue Location:</b> " + obj.getReplyQueueLocation() + "</li>");
+    if (obj.getReplyQueueConcurrentConsumers() > 0) {
+      buf.append("<li><b>Concurrent Consumers for reply queue:</b> " + obj.getReplyQueueConcurrentConsumers() + "</li>");
     }
     // Error Config
     toStringFromErrorConfig(buf, obj.getAsyncAEErrorConfiguration());

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/page/OverviewPage.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/page/OverviewPage.java?rev=686868&r1=686867&r2=686868&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/page/OverviewPage.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/java/org/apache/uima/dde/internal/page/OverviewPage.java Mon Aug 18 14:08:10 2008
@@ -289,10 +289,10 @@
     public void widgetSelected(SelectionEvent event) {
       if (event.getSource() == casPoolSize) {
         aeDeploymentDescription.setCasPoolSize(casPoolSize.getSelection());
-        multiPageEditor.setFileDirty();
+
       } else if (event.getSource() == initialFsHeapSize) {
         aeDeploymentDescription.setInitialFsHeapSize(initialFsHeapSize.getSelection());
-        multiPageEditor.setFileDirty();
+
       } else if (event.getSource() == customButton) {
         // Customization of C++
         if (customComposite == null) {
@@ -310,6 +310,7 @@
         serviceSectionClient.layout(true, true);
         mForm.reflow(true);
       }
+      multiPageEditor.setFileDirty();
     }
   };
   
@@ -656,6 +657,13 @@
             Integer.MAX_VALUE, false, FormSection2.MAX_DECORATION_WIDTH);
     casPoolSize.setSelection(aeDeploymentDescription.getCasPoolSize());
     casPoolSize.addSelectionListener(selectionListener);
+    try {
+      if (!aeDeploymentDescription.getAeService().getAnalysisEngineDeploymentMetaData().isAsync()) {
+        casPoolSize.setEnabled(false);
+      }
+    } catch (InvalidXMLException e) {
+      e.printStackTrace();
+    }
 
     // initialFsHeapSize (default size is 2M)
     initialFsHeapSize = FormSection2.createLabelAndSpinner(toolkit, topComposite,

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/resources/org/apache/uima/dde/internal/messages.properties
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/resources/org/apache/uima/dde/internal/messages.properties?rev=686868&r1=686867&r2=686868&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/resources/org/apache/uima/dde/internal/messages.properties (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-ep-deployeditor/src/main/resources/org/apache/uima/dde/internal/messages.properties Mon Aug 18 14:08:10 2008
@@ -32,6 +32,14 @@
 DDE_AEConfigPage_AEConfig_Section_Title = Deployment Details
 DDE_AEConfigPage_ErrorConfig_Section_Title = Error Configuration Details
 
+DDE_AEMetaDataDetails_RunAsASAggregate = Run as AS aggregate
+DDE_AEMetaDataDetails_NumberOfReplicatedInstances = Number of replicated instances:
+DDE_AEMetaDataDetails_BrokerURLForRemote = Broker URL for remote service:
+DDE_AEMetaDataDetails_QueueNameForRemote = Queue name for remote service:
+DDE_AEMetaDataDetails_NumberOfConsumers = Number of consumers for reply queue:
+DDE_AEMetaDataDetails_PoolSizeOfCM = Pool size of CasMultiplier:
+DDE_AEMetaDataDetails_InitalSizeOfCASHeap = Initial size of CAS heap (in bytes):
+
 # Wizard for Adding/Editing Environment Variable
 DDE_EnvVariable_Wizard_Window_Title = Customization for C++ Analysis Engine
 DDE_EnvVariable_Wizard_ADD_Title = Add Environment Variables

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/AEDeploymentConstants.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/AEDeploymentConstants.java?rev=686868&r1=686867&r2=686868&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/AEDeploymentConstants.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/AEDeploymentConstants.java Mon Aug 18 14:08:10 2008
@@ -42,6 +42,7 @@
     final static String     DEFAULT_ADDITIONAL_ERROR_ACTION = "terminate";
     final static boolean    DEFAULT_CONTINUE_ON_RETRY_FAILURE = false;
     final static String     DEFAULT_REPLY_QUEUE_LOCATION = "local";
+    final static int        DEFAULT_CONCURRENT_CONSUMERS = 1;
 
     final static public int    UNDEFINED_INT   = -1; // used to identify undefined integer
 
@@ -88,6 +89,7 @@
     final static public String TAG_IMPORT                  = "import";
 
     final static public String TAG_REPLY_QUEUE             = "replyQueue";
+    final static public String TAG_ATTR_CONCURRENT_CONSUMERS    = "concurrentConsumers";
 
     final static public String TAG_SERIALIZER              = "serializer";
     final static public String TAG_ATTR_METHOD             = "method";

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/RemoteAEDeploymentMetaData.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/RemoteAEDeploymentMetaData.java?rev=686868&r1=686867&r2=686868&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/RemoteAEDeploymentMetaData.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/RemoteAEDeploymentMetaData.java Mon Aug 18 14:08:10 2008
@@ -108,6 +108,11 @@
      */
     public void setReplyQueueLocation(String replyQueueLocation);
 
+    public int getReplyQueueConcurrentConsumers();
+
+    public void setReplyQueueConcurrentConsumers(int concurrentConsumers);
+    
+
     /**
      * @return the serializerMethod
      */

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/impl/RemoteAEDeploymentMetaData_Impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/impl/RemoteAEDeploymentMetaData_Impl.java?rev=686868&r1=686867&r2=686868&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/impl/RemoteAEDeploymentMetaData_Impl.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/impl/RemoteAEDeploymentMetaData_Impl.java Mon Aug 18 14:08:10 2008
@@ -56,7 +56,8 @@
   protected int initialFsHeapSize = DEFAULT_CAS_INITIAL_HEAP_SIZE;
 
   protected InputQueue    inputQueue = new InputQueue_Impl();
-  protected String        replyQueueLocation = DEFAULT_REPLY_QUEUE_LOCATION; // NOT defined
+  protected String        replyQueueLocation = null; // DEFAULT_REPLY_QUEUE_LOCATION; // NOT defined
+  protected int           replyQueueConsumers = -1; // DEFAULT_CONCURRENT_CONSUMERS; // NOT defined
   protected String        serializerMethod = "xmi"; // NOT defined
 
   protected AsyncAEErrorConfiguration errorConfiguration;
@@ -156,9 +157,36 @@
           }
           
         } else if (TAG_REPLY_QUEUE.equalsIgnoreCase(elem.getTagName())) {
-          // setReplyQueueLocation(elem.getAttribute(TAG_ATTR_LOCATION));
-          setReplyQueueLocation(DDParserUtil.checkAndGetAttributeValue(TAG_REPLY_QUEUE, TAG_ATTR_LOCATION, elem, true));
-
+          val = DDParserUtil.checkAndGetAttributeValue(TAG_REPLY_QUEUE, TAG_ATTR_LOCATION, elem, false);
+          if (val != null && val.trim().length() > 0) {
+            val = val.trim();
+            if ( /*val.equalsIgnoreCase("local") ||*/  val.equalsIgnoreCase("remote")) {
+              setReplyQueueLocation(val);
+            } else {
+              throw new InvalidXMLException(InvalidXMLException.INVALID_ELEMENT_TEXT,
+                      new Object[] {val, TAG_ATTR_LOCATION });
+            }
+          }
+          
+          int n;
+          val = DDParserUtil.checkAndGetAttributeValue(TAG_REPLY_QUEUE, TAG_ATTR_CONCURRENT_CONSUMERS, elem, false);
+          if (val == null || val.trim().length() == 0) {
+            n = 1;
+          } else {
+            try {
+              n = Integer.parseInt(val);
+              if (n <= 0) {
+                // n = 1;
+                throw new InvalidXMLException(InvalidXMLException.INVALID_ELEMENT_TEXT,
+                        new Object[] { n, TAG_ATTR_CONCURRENT_CONSUMERS });
+              }
+            } catch (NumberFormatException e) {
+              throw new InvalidXMLException(InvalidXMLException.UNKNOWN_ELEMENT,
+                      new Object[] { TAG_ATTR_CONCURRENT_CONSUMERS }, e);
+            }
+          }
+          setReplyQueueConcurrentConsumers(n);
+                    
         } else if (TAG_SERIALIZER.equalsIgnoreCase(elem.getTagName())) {
           // setSerializerMethod(elem.getAttribute(TAG_ATTR_METHOD));
           setSerializerMethod(DDParserUtil.checkAndGetAttributeValue(TAG_SERIALIZER, TAG_ATTR_METHOD, elem, true));
@@ -270,10 +298,17 @@
       attrs.clear();
     }
 
-    // <replyQueue location="[local|remote]"/> <!-- optional -->
-    if (getReplyQueueLocation() != null) {
-      attrs.addAttribute("", TAG_ATTR_LOCATION, TAG_ATTR_LOCATION,
-              null, getReplyQueueLocation());
+    // <replyQueue concurrentConsumers="1" location="[local|remote]"/> <!-- optional -->
+    // Note: location="local" is NO longer support. Will be warned by DDE
+    if (replyQueueConsumers > 1 || replyQueueLocation != null) {
+      if (replyQueueConsumers > 1) {
+        attrs.addAttribute("", TAG_ATTR_CONCURRENT_CONSUMERS, TAG_ATTR_CONCURRENT_CONSUMERS,
+                null, "" + replyQueueConsumers);        
+      }
+      if (replyQueueLocation != null) {
+        attrs.addAttribute("", TAG_ATTR_LOCATION, TAG_ATTR_LOCATION,
+                null, replyQueueLocation);
+      }
       aContentHandler.startElement("",
               TAG_REPLY_QUEUE, TAG_REPLY_QUEUE, attrs);
       aContentHandler.endElement("", "", TAG_REPLY_QUEUE);
@@ -404,5 +439,13 @@
       this.initialFsHeapSize = initialFsHeapSize;
   }
 
+  public int getReplyQueueConcurrentConsumers() {
+    return replyQueueConsumers;
+  }
+
+  public void setReplyQueueConcurrentConsumers(int concurrentConsumers) {
+    replyQueueConsumers = concurrentConsumers;    
+  }
+
 
 }