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 2011/12/11 00:11:58 UTC

svn commit: r1212921 - in /uima/uimaj/trunk: uima-docbook-tools/src/docbook/ uima-docbook-tools/src/docbook/images/tools/tools.cde/ uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/ uimaj-ep-configurator/src/main/java/org/...

Author: schor
Date: Sat Dec 10 23:11:58 2011
New Revision: 1212921

URL: http://svn.apache.org/viewvc?rev=1212921&view=rev
Log:
[UIMA-2116] add UIMA-AS JMS Remote descriptors support to the component descriptor editor.  The Add Remote button dialog page is somewhat reorganized, to now support 3 styles of remote descriptors

Added:
    uima/uimaj/trunk/uima-docbook-tools/src/docbook/images/tools/tools.cde/image014v2.jpg   (with props)
Modified:
    uima/uimaj/trunk/uima-docbook-tools/src/docbook/tools.cde.xml
    uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/AbstractSection.java
    uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/AggregateSection.java
    uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/dialogs/AbstractDialog.java
    uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/dialogs/AddRemoteServiceDialog.java

Added: uima/uimaj/trunk/uima-docbook-tools/src/docbook/images/tools/tools.cde/image014v2.jpg
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uima-docbook-tools/src/docbook/images/tools/tools.cde/image014v2.jpg?rev=1212921&view=auto
==============================================================================
Binary file - no diff available.

Propchange: uima/uimaj/trunk/uima-docbook-tools/src/docbook/images/tools/tools.cde/image014v2.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Modified: uima/uimaj/trunk/uima-docbook-tools/src/docbook/tools.cde.xml
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uima-docbook-tools/src/docbook/tools.cde.xml?rev=1212921&r1=1212920&r2=1212921&view=diff
==============================================================================
--- uima/uimaj/trunk/uima-docbook-tools/src/docbook/tools.cde.xml (original)
+++ uima/uimaj/trunk/uima-docbook-tools/src/docbook/tools.cde.xml Sat Dec 10 23:11:58 2011
@@ -330,23 +330,28 @@ under the License.
         specifies a remote engine (just as if you were adding a non-remote engine) or use the
         Add Remote button which will create a remote descriptor, save it, and then import it,
         all in one operation. The Add Remote button enables you to easily specify the
-        information needed to create a Service Client descriptor for a remote AE - one that
-        runs on a different computer connected over the network. The Service Client
-        descriptor is described in <olink targetdoc="&uima_docs_ref;"
-          targetptr="ugr.ref.xml.component_descriptor.service_client"/>. The Add
-        Remote button creates this descriptor, saves it as a file in the workspace, and
+        information needed to create a remote service descriptor for a remote AE - one that
+        runs on a different computer connected over the network. There are 3 kinds of 
+        these: two are variants of the Service Client
+        descriptor, described in <olink targetdoc="&uima_docs_ref;"
+          targetptr="ugr.ref.xml.component_descriptor.service_client"/>;
+          the other is the UIMA-AS JMS Service descriptor, described in
+          <olink targetdoc="&uima_docs_as;"  
+          targetptr="ugr.async.ov.concepts.jms_descriptor"/>. The Add
+        Remote button creates an instance of one of these descriptors, 
+        saves it as a file in the workspace, and
         imports it into the aggregate.</para>
       
-      <para>Of course, if you already have a Service Client descriptor, you can add it to the
-        set of delegates, just like adding other kinds of analysis engines.</para>
+      <para>Of course, if you already have a remote service descriptor, you can add it to the
+        set of delegates using the <code>Add</code> button, just like adding other kinds of analysis engines.</para>
       
-      <para>After clicking on Add Remote, the following dialog is displayed:
+      <para>After clicking on <code>Add Remote</code>, the following dialog is displayed:
         
         
         <screenshot>
       <mediaobject>
         <imageobject>
-          <imagedata width="5.7in" format="JPG" fileref="&imgroot;image014.jpg"/>
+          <imagedata width="4.9in" format="JPG" fileref="&imgroot;image014v2.jpg"/>
         </imageobject>
         <textobject><phrase>Adding a remote client to an aggregate</phrase>
         </textobject>
@@ -354,8 +359,11 @@ under the License.
     </screenshot></para>
       
       <para>To define a remote service you specify the Service Kind, Protocol Service Type,
-        URI and Key. You can also specify a Timeout in milliseconds, used by the SOAP service,
-        and a VNS Host and Port used by the Vinci Service. Just like when one adds an engine from
+        URI and Key. You can also specify a Timeout in milliseconds, used by the SOAP and
+        JMS services,
+        and a VNS Host and Port used by the Vinci Service. 
+        The JMS service has additional timeouts and other parameters you may specify. 
+        Just like when one adds an engine from
         the file system, you have the option of adding the engine to the end of the flow. The
         Component Descriptor Editor currently only supports Vinci and SOAP services using
         this dialog.</para>
@@ -374,7 +382,10 @@ under the License.
       <para>If you are using the Vinci protocol, it requires that you specify the location of
         the Vinci Name Server (an IP address and a Port number). You can specify these in the
         service descriptor, or globally, for your Eclipse workspace, using the Eclipse menu
-        item: Window &rarr; Preferences... &rarr; UIMA Preferences. If the remote service
+        item: Window &rarr; Preferences... &rarr; UIMA Preferences.
+      </para>
+      
+      <para>If the remote service
         is available (up and running), additional operations become possible. For
         instance, hovering the mouse over the remote descriptor will show the description
         metadata from the remote service.</para>

Modified: uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/AbstractSection.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/AbstractSection.java?rev=1212921&r1=1212920&r2=1212921&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/AbstractSection.java (original)
+++ uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/AbstractSection.java Sat Dec 10 23:11:58 2011
@@ -44,6 +44,7 @@ import org.apache.uima.analysis_engine.m
 import org.apache.uima.analysis_engine.metadata.FlowControllerDeclaration;
 import org.apache.uima.analysis_engine.metadata.SofaMapping;
 import org.apache.uima.cas.CAS;
+import org.apache.uima.resource.CustomResourceSpecifier;
 import org.apache.uima.resource.ExternalResourceDependency;
 import org.apache.uima.resource.ExternalResourceDescription;
 import org.apache.uima.resource.PearSpecifier;
@@ -1254,12 +1255,20 @@ implements Listener, StandardStrings {
 
     // code to open selected file, by location or by name
     if (null != res) {
-      if (inputDescription instanceof URISpecifier)
+      if ((inputDescription instanceof URISpecifier) ||
+          isJmsDescriptor(inputDescription)) {
         editor.openTextEditor(path);
+      }
       else
         editor.open(path);
     }
   }
+  
+  protected boolean isJmsDescriptor (XMLizable inputDescription) {
+    return (inputDescription instanceof CustomResourceSpecifier) &&
+    ("org.apache.uima.aae.jms_adapter.JmsAnalysisEngineServiceAdapter".equals(
+        ((CustomResourceSpecifier)inputDescription).getResourceClassName()));
+  }
 
   private Point getAbsoluteLocation(Control control, int x, int y) {
     Point point = new Point(x, y);

Modified: uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/AggregateSection.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/AggregateSection.java?rev=1212921&r1=1212920&r2=1212921&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/AggregateSection.java (original)
+++ uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/AggregateSection.java Sat Dec 10 23:11:58 2011
@@ -417,6 +417,16 @@ public class AggregateSection extends Ab
           "  <protocol>{2}</protocol>\n" + // SOAP or Vinci
           "  <timeout>{3}</timeout>" + "  {4}" + // <parameters> for VNS </parameters>
           "\n</uriSpecifier>";
+  
+  private final static String REMOTE_JMS_TEMPLATE = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" 
+    + "<customResourceSpecifier xmlns=\"http://uima.apache.org/resourceSpecifier\">\n"
+    + "  <resourceClassName>org.apache.uima.aae.jms_adapter.JmsAnalysisEngineServiceAdapter</resourceClassName>\n"
+    + "  <parameters>\n"
+    + "    <parameter name=\"brokerURL\" value=\"{0}\"/>\n"
+    + "    <parameter name=\"endpoint\"  value=\"{1}\"/>\n"
+    + "{2}" 
+    + "  </parameters>\n"
+    + "</customResourceSpecifier>";
 
   private void handleAddRemote() {
     String sDescriptorPath = editor.getFile().getParent().getLocation().toString() + '/';
@@ -426,7 +436,10 @@ public class AggregateSection extends Ab
       return;
 
     String sServiceType = dialog.getSelectedServiceTypeName();
-    if (sServiceType != null && !sServiceType.equals("SOAP") && !sServiceType.equals("Vinci")) {
+    if (sServiceType != null &&
+        !sServiceType.equals("UIMA-AS JMS") &&
+        !sServiceType.equals("SOAP") && 
+        !sServiceType.equals("Vinci")) {
       return;
     }
     String sURI = dialog.getSelectedUri();
@@ -440,19 +453,37 @@ public class AggregateSection extends Ab
 
     PrintWriter printWriter = setupToPrintFile(dialog.genFilePath);
     if (null != printWriter) {
-      String vnsHostPort = "";
-      if (dialog.vnsHost.length() > 0) {
-        vnsHostPort = MessageFormat.format("    <parameter name=\"VNS_HOST\" value=\"{0}\"/>\n",
-                new Object[] { dialog.vnsHost });
-      }
-      if (dialog.vnsPort.length() > 0) {
-        vnsHostPort += MessageFormat.format("    <parameter name=\"VNS_PORT\" value=\"{0}\"/>\n",
-                new Object[] { dialog.vnsPort });
-      }
-      if (vnsHostPort.length() > 0)
-        vnsHostPort = "\n  <parameters>" + vnsHostPort + "  </parameters>";
-      printWriter.println(MessageFormat.format(REMOTE_TEMPLATE, new Object[] { dialog.aeOrCc, sURI,
-          sServiceType, dialog.timeout, vnsHostPort }));
+      if (!sServiceType.equals("UIMA-AS JMS")) {
+        String vnsHostPort = "";
+        if (dialog.vnsHost.length() > 0) {
+          vnsHostPort = MessageFormat.format("    <parameter name=\"VNS_HOST\" value=\"{0}\"/>\n",
+                    new Object[] { dialog.vnsHost });
+        }
+        if (dialog.vnsPort.length() > 0) {
+          vnsHostPort += MessageFormat.format("    <parameter name=\"VNS_PORT\" value=\"{0}\"/>\n",
+                  new Object[] { dialog.vnsPort });
+        }
+        
+        if (vnsHostPort.length() > 0)
+          vnsHostPort = "\n  <parameters>" + vnsHostPort + "  </parameters>";
+      
+      
+        printWriter.println(MessageFormat.format(REMOTE_TEMPLATE, new Object[] { dialog.aeOrCc, sURI,
+            sServiceType, dialog.timeout, vnsHostPort }));
+      } else { 
+        // is UIMA-AS JMS
+        StringBuilder sb = new StringBuilder();
+        addParam(sb, "timeout", dialog.timeout);
+        addParam(sb, "getmetatimeout", dialog.getmetaTimeout);
+        addParam(sb, "cpctimeout", dialog.cpcTimeout);
+        addParam(sb, "binary_serialization", dialog.binary_serialization);
+        addParam(sb, "ignore_process_errors", dialog.ignore_process_errors);
+        printWriter.println(MessageFormat.format(REMOTE_JMS_TEMPLATE, new Object[] {
+            sURI, // brokerUrl
+            dialog.endpoint, // endpoint
+            sb.toString()
+        }));   
+      }
       printWriter.close();
 
       boolean bSuccess = addDelegate(dialog.genFilePath, sKey, sKey, dialog.isImportByName);
@@ -465,6 +496,13 @@ public class AggregateSection extends Ab
       }
     }
   }
+  
+  private StringBuilder addParam(StringBuilder sb, String name, String value) {
+    if (value != null && value.length() > 0) {
+      sb = sb.append("      <parameter name=\"").append(name).append("\" value=\"").append(value).append("\"/>\n");
+    }
+    return sb;
+  }
 
   private static final String[] delegateComponentStringHeadersLC = new String[] {
       "<analysisenginedescription", "<casconsumerdescription", "<taedescription" };
@@ -565,7 +603,9 @@ public class AggregateSection extends Ab
     if (!(inputDescription instanceof AnalysisEngineDescription)
             && !(inputDescription instanceof CasConsumerDescription)
             && !(inputDescription instanceof URISpecifier)
-            && !(inputDescription instanceof PearSpecifier)) {
+            && !(inputDescription instanceof PearSpecifier)
+            && !(isJmsDescriptor(inputDescription))
+       ) {
       Utility
               .popMessage(
                       "Invalid kind of descriptor",
@@ -591,7 +631,7 @@ public class AggregateSection extends Ab
     finishAggregateChangeAction();
     return true;
   }
-
+  
   private boolean isNewKey(String keyName) {
     for (int i = 0; i < filesTable.getItemCount(); i++) {
       if (filesTable.getItem(i).getText(1).equals(keyName)) {

Modified: uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/dialogs/AbstractDialog.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/dialogs/AbstractDialog.java?rev=1212921&r1=1212920&r2=1212921&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/dialogs/AbstractDialog.java (original)
+++ uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/dialogs/AbstractDialog.java Sat Dec 10 23:11:58 2011
@@ -157,6 +157,11 @@ public abstract class AbstractDialog ext
     c.setText(label);
     c.setToolTipText(tip);
   }
+  
+  protected void setTextAndTip(Label c, String label, String tip, int horizStyle, boolean horizGrab) {
+    setTextAndTip(c, label, tip);
+    c.setLayoutData(new GridData(horizStyle, SWT.BEGINNING, horizGrab, false));
+  }
 
   protected Composite new2ColumnComposite(Composite parent) {
     Composite twoCol = new Composite(parent, SWT.NONE);

Modified: uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/dialogs/AddRemoteServiceDialog.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/dialogs/AddRemoteServiceDialog.java?rev=1212921&r1=1212920&r2=1212921&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/dialogs/AddRemoteServiceDialog.java (original)
+++ uima/uimaj/trunk/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/dialogs/AddRemoteServiceDialog.java Sat Dec 10 23:11:58 2011
@@ -21,6 +21,7 @@ package org.apache.uima.taeconfigurator.
 
 import java.text.MessageFormat;
 
+import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.CCombo;
 import org.eclipse.swt.events.ModifyEvent;
@@ -58,6 +59,8 @@ public class AddRemoteServiceDialog exte
   private CCombo serviceTypeCombo;
 
   private Text uriText;
+  
+  private Text endpointText;
 
   private Text keyText;
 
@@ -94,6 +97,38 @@ public class AddRemoteServiceDialog exte
   private boolean portNumberIsOK;
 
   private CCombo aeOrCcCombo;
+  
+  private Label endpointLabel;
+  
+  private Label uriLabel;
+
+  private Label timeoutProcessLabel;
+
+  private Label timeoutJmsGetmetaLabel;
+
+  private Text timeoutGetmetaText;
+
+  public String getmetaTimeout;
+
+  public String endpoint;
+
+  private Text timeoutJmsCpcText;
+
+  private Label timeoutJmsCpcLabel;
+
+  private Label binarySerializationLabel;
+
+  private CCombo binarySerializationCombo;
+
+  private Label ignoreProcessErrorsLabel;
+
+  private CCombo ignoreProcessErrorsCombo;
+
+  public String cpcTimeout;
+
+  public String binary_serialization;
+
+  public String ignore_process_errors;
 
   private class DialogModifyListener implements ModifyListener {
     public void modifyText(ModifyEvent e) {
@@ -128,33 +163,41 @@ public class AddRemoteServiceDialog exte
   protected Control createDialogArea(Composite parent) {
 
     Composite composite = (Composite) super.createDialogArea(parent);
-
-    createWideLabel(composite, "Service kind: Analysis Engine or Cas Consumer:");
-
-    aeOrCcCombo = newCCombo(composite,
-            "Specify whether the Service is an Analysis Engine or a Cas Consumer");
-    aeOrCcCombo.add("AnalysisEngine");
-    aeOrCcCombo.add("CasConsumer");
-    aeOrCcCombo.select(0);
-
-    createWideLabel(composite, "Protocol Service Type:");
-
-    serviceTypeCombo = newCCombo(composite, S_);
-    serviceTypeCombo.add("SOAP");
-    serviceTypeCombo.add("Vinci");
-    serviceTypeCombo.select(0);
-
-    createWideLabel(composite, "URI:");
-
-    uriText = new Text(composite, SWT.BORDER);
-    uriText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-    uriText.addModifyListener(m_dialogModifyListener);
-
-    createWideLabel(composite, "Key (a short mnemonic for this service):");
-
-    keyText = new Text(composite, SWT.BORDER);
-    keyText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-    keyText.addModifyListener(m_dialogModifyListener);
+    
+    Composite tc1 = new2ColumnComposite(composite);
+    Label tempLabel;
+    
+    setTextAndTip(tempLabel = new Label(tc1, SWT.WRAP), "Service kind:", S_, SWT.BEGINNING, false);    
+    aeOrCcCombo = wideCCombo(tc1, "Specify whether the Service is an Analysis Engine or a Cas Consumer",
+            "AnalysisEngine", "CasConsumer");
+
+    setTextAndTip(tempLabel = new Label(tc1, SWT.WRAP), "Protocol Service Type", S_, SWT.BEGINNING, false);
+    serviceTypeCombo = wideCCombo(tc1, S_, "UIMA-AS JMS", "SOAP", "Vinci");
+
+    setTextAndTip(uriLabel = new Label(tc1, SWT.NONE), "URI of service or JMS Broker:",
+       "The URI for the service, e.g. localhost", SWT.BEGINNING, false);
+    uriText = wideTextInput(tc1, S_, m_dialogModifyListener);
+
+    setTextAndTip(endpointLabel = new Label(tc1, SWT.NONE), "Endpoint Name (JMS Service):",
+    "For UIMA-AS JMS Services only, the endpoint name", SWT.BEGINNING, false);
+
+    endpointText = wideTextInput(tc1, S_, m_dialogModifyListener);
+
+    setTextAndTip(binarySerializationLabel = new Label(tc1, SWT.NONE), "Binary Serialization (JMS Service):",
+        "For UIMA-AS JMS Services only, use binary serialzation (requires all type systems be identical)", 
+        SWT.BEGINNING, false);
+
+    binarySerializationCombo = wideCComboTF(tc1, S_);
+    
+    setTextAndTip(ignoreProcessErrorsLabel = new Label(tc1, SWT.NONE), "Ignore Process Errors (JMS Service):",
+    "For UIMA-AS JMS Services only, ignore processing errors");
+    ignoreProcessErrorsLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));
+
+    ignoreProcessErrorsCombo = wideCComboTF(tc1, S_);   
+
+    setTextAndTip(tempLabel = new Label(tc1, SWT.NONE), "Key (a short mnemonic for this service):",
+        "also used as part of the file name", SWT.BEGINNING, false);
+    keyText = wideTextInput(tc1, S_, m_dialogModifyListener);
     keyText.addVerifyListener(new DialogVerifyListener());
     keyTextPrev = ".xml";
 
@@ -165,10 +208,21 @@ public class AddRemoteServiceDialog exte
 
     createWideLabel(
             composite,
-            "Timeout, in milliseconds.  This is ignored for the Vinci protocol.  Specify 0 to wait forever. If not specified, a default timeout is used.");
-    timeoutText = new Text(composite, SWT.BORDER);
-    timeoutText.setEnabled(false);
-
+            "Timeouts, in milliseconds.  This is ignored for the Vinci protocol.  Specify 0 to wait forever. If not specified, a default timeout is used.");
+    
+    tc1 = new2ColumnComposite(composite);
+    
+    setTextAndTip(timeoutProcessLabel = new Label(tc1, SWT.NONE), "Timeout: Process:",
+        "Timeout for processing a CAS", SWT.BEGINNING, false);   
+    timeoutText = wideTextInput(tc1, S_);
+
+    setTextAndTip(timeoutJmsGetmetaLabel = new Label(tc1, SWT.NONE), "Timeout: (JMS) GetMeta:",
+    "Timeout for querying the metadata from a JMS service", SWT.BEGINNING, false);
+    timeoutGetmetaText = wideTextInput(tc1, S_);
+
+    setTextAndTip(timeoutJmsCpcLabel = new Label(tc1, SWT.NONE), "Timeout: (JMS) Collection Processing Complete:",
+    "Timeout for Collection Processing Complete", SWT.BEGINNING, false);   
+    timeoutJmsCpcText = wideTextInput(tc1, S_);
     createWideLabel(composite,
             "For the Vinci protocol, you can optionally specify the Host/Port for the Vinci Name Service");
     Composite tc = new2ColumnComposite(composite);
@@ -207,18 +261,66 @@ public class AddRemoteServiceDialog exte
     return composite;
   }
 
+  private CCombo wideCCombo(Composite tc, String tip, String ... entries) {
+    CCombo cc = newCCombo(tc, tip);
+    for (String e : entries) {
+      cc.add(e);
+    }
+    ((GridData) cc.getLayoutData()).grabExcessHorizontalSpace = true;;
+    cc.select(0);
+    return cc;
+  }
+  
+  private CCombo wideCComboTF(Composite tc, String tip) {
+    return wideCCombo(tc, tip, "false", "true");
+  }
+ 
+  private Text wideTextInput(Composite tc, String tip) {
+    return wideTextInput(tc, tip, null);
+  }
+  
+  private Text wideTextInput(Composite tc, String tip, DialogModifyListener listener) {
+    Text t = newText(tc, SWT.BORDER, tip);
+    t.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
+    if (listener != null) {
+      t.addModifyListener(listener);
+    } else {
+      t.setEnabled(false);
+    }
+    return t;
+  }
+  
+  
   public void enableOK() {
-    boolean isVinci = serviceTypeCombo.getSelectionIndex() == 1;
+    boolean isVinci = serviceTypeCombo.getSelectionIndex() == 2;
+    boolean isJms = serviceTypeCombo.getSelectionIndex() == 0;
     vnsHostLabel.setEnabled(isVinci);
     vnsHostUI.setEnabled(isVinci);
     vnsPortLabel.setEnabled(isVinci);
     vnsPortUI.setEnabled(isVinci);
     timeoutText.setEnabled(!isVinci);
+    timeoutProcessLabel.setEnabled(!isVinci);
+    timeoutJmsGetmetaLabel.setEnabled(isJms);
+    timeoutGetmetaText.setEnabled(isJms);
+    endpointLabel.setEnabled(isJms);
+    endpointText.setEnabled(isJms);
+    timeoutJmsCpcLabel.setEnabled(isJms);
+    timeoutJmsCpcText.setEnabled(isJms);
+    binarySerializationLabel.setEnabled(isJms);
+    binarySerializationCombo.setEnabled(isJms);
+    binarySerializationCombo.setVisible(isJms);
+    ignoreProcessErrorsLabel.setEnabled(isJms);
+    ignoreProcessErrorsCombo.setEnabled(isJms);
+    ignoreProcessErrorsCombo.setVisible(isJms);
 
     boolean bEnableOk = (serviceTypeCombo.getText() != null && !serviceTypeCombo.getText().equals(
             ""))
             && (uriText != null && !uriText.getText().trim().equals(""))
             && (keyText != null && !keyText.getText().trim().equals(""));
+    
+    if (!bEnableOk) {
+      setErrorMessage("missing URI or key");
+    }
 
     portNumberIsOK = true;
     if (isVinci && vnsPortUI.getText().length() > 0) {
@@ -231,8 +333,16 @@ public class AddRemoteServiceDialog exte
         setErrorMessage("Invalid number, please correct.");
       }
     }
+    
+    if (isJms && 
+        (endpointText.getText() == null || 
+         endpointText.getText().trim().equals(""))) {
+      bEnableOk = false;
+      setErrorMessage("missing JMS endpoint");
+    }    
+    
     okButton.setEnabled(bEnableOk);
-    if (portNumberWasBad && portNumberIsOK) {
+    if (bEnableOk) {
       setErrorMessage("");
       portNumberWasBad = false;
     }
@@ -271,6 +381,11 @@ public class AddRemoteServiceDialog exte
     vnsHost = vnsHostUI.getText();
     vnsPort = vnsPortUI.getText();
     CDEpropertyPage.setImportByDefault(editor.getProject(), isImportByName ? "name" : "location");
+    getmetaTimeout = timeoutGetmetaText.getText();
+    cpcTimeout = timeoutJmsCpcText.getText();
+    endpoint = endpointText.getText();
+    binary_serialization = binarySerializationCombo.getText();
+    ignore_process_errors = ignoreProcessErrorsCombo.getText();
   }
 
   public boolean isValid() {