You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by ch...@apache.org on 2013/01/24 19:13:56 UTC
svn commit: r1438113 [2/2] - in /uima/sandbox/uima-ducc/trunk: ./
src/main/assembly/ uima-ducc-examples/ uima-ducc-examples/src/
uima-ducc-examples/src/main/ uima-ducc-examples/src/main/java/
uima-ducc-examples/src/main/java/org/ uima-ducc-examples/src...
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UIMA_Service.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UIMA_Service.java?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UIMA_Service.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UIMA_Service.java Thu Jan 24 18:13:55 2013
@@ -0,0 +1,476 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.uima.ducc.test.service;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InvalidClassException;
+
+import org.apache.uima.UIMAFramework;
+import org.apache.uima.aae.UimaAsVersion;
+import org.apache.uima.aae.controller.AnalysisEngineController;
+import org.apache.uima.aae.jmx.monitor.BasicUimaJmxMonitorListener;
+import org.apache.uima.aae.jmx.monitor.JmxMonitor;
+import org.apache.uima.aae.jmx.monitor.JmxMonitorListener;
+import org.apache.uima.adapter.jms.JmsConstants;
+import org.apache.uima.adapter.jms.activemq.SpringContainerDeployer;
+import org.apache.uima.adapter.jms.service.Dd2spring;
+import org.apache.uima.resource.ResourceInitializationException;
+import org.apache.uima.util.Level;
+import org.springframework.context.ApplicationEvent;
+import org.springframework.context.ApplicationListener;
+import org.springframework.context.event.ContextClosedEvent;
+import org.springframework.context.support.FileSystemXmlApplicationContext;
+
+@SuppressWarnings("rawtypes")
+public class UIMA_Service implements ApplicationListener {
+ private static final Class CLASS_NAME = UIMA_Service.class;
+
+ protected boolean serviceInitializationCompleted;
+
+ protected boolean serviceInitializationException;
+
+ protected Object serviceMonitor = new Object();
+
+ private JmxMonitor monitor = null;
+
+ private Thread monitorThread = null;
+
+ /**
+ * Parse command args, run dd2spring on the deployment descriptors to generate Spring context
+ * files.
+ *
+ * @param args
+ * - command line arguments
+ * @return - an array of Spring context files generated from provided deployment descriptors
+ * @throws Exception
+ */
+ public String[] initialize(String[] args) throws Exception {
+ UIMAFramework.getLogger(CLASS_NAME).log(Level.INFO,
+ "UIMA-AS version " + UimaAsVersion.getFullVersionString());
+
+ String[] springConfigFileArray = {};
+ String[] deploymentDescriptors = {};
+ int nbrOfArgs = args.length;
+
+ deploymentDescriptors = getMultipleArg("-d", args);
+ if (deploymentDescriptors.length == 0) {
+ // allow multiple args for one key
+ deploymentDescriptors = getMultipleArg2("-dd", args);
+ }
+ String saxonURL = getArg("-saxonURL", args);
+ String xslTransform = getArg("-xslt", args);
+ String uimaAsDebug = getArg("-uimaEeDebug", args);
+
+ if (nbrOfArgs < 1
+ || (args[0].startsWith("-") && (deploymentDescriptors.length == 0
+ || saxonURL.equals("") || xslTransform.equals("")))) {
+ printUsageMessage();
+ return null;
+ }
+ String brokerURL = getArg("-brokerURL", args);
+ // Check if broker URL is specified on the command line. If it is not, use the default
+ // localhost:61616. In either case, set the System property defaultBrokerURL. It will be used
+ // by Spring Framework to substitute a place holder in Spring xml.
+ if (brokerURL != "") {
+ System.setProperty("defaultBrokerURL", brokerURL);
+ System.out.println(">>> Setting defaultBrokerURL to:" + brokerURL);
+ } else if ( System.getProperty("defaultBrokerURL") == null) { // perhaps already set using -D
+ System.setProperty("defaultBrokerURL", "tcp://localhost:61616");
+ }
+
+ if (System.getProperty(JmsConstants.SessionTimeoutOverride) != null) {
+ System.out.println(">>> Setting Inactivity Timeout To: "
+ + System.getProperty(JmsConstants.SessionTimeoutOverride));
+ }
+ if (deploymentDescriptors.length == 0) {
+ // array of context files passed in
+ springConfigFileArray = args;
+ } else {
+ // create a String array of spring context files
+ springConfigFileArray = new String[deploymentDescriptors.length];
+
+ Dd2spring aDd2Spring = new Dd2spring();
+ for (int dd = 0; dd < deploymentDescriptors.length; dd++) {
+ String deploymentDescriptor = deploymentDescriptors[dd];
+
+ File springConfigFile = aDd2Spring.convertDd2Spring(deploymentDescriptor, xslTransform,
+ saxonURL, uimaAsDebug);
+
+ // if any are bad, fail
+ if (null == springConfigFile) {
+ return null;
+ }
+ springConfigFileArray[dd] = springConfigFile.getAbsolutePath();
+
+ // get the descriptor to register with the engine controller
+ String deployDescriptor = "";
+ File afile = null;
+ FileInputStream fis = null;
+ try {
+ afile = new File(deploymentDescriptor);
+ fis = new FileInputStream(afile);
+ byte[] bytes = new byte[(int) afile.length()];
+ fis.read(bytes);
+ deployDescriptor = new String(bytes);
+ // Log Deployment Descriptor
+ UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(), "main",
+ JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_deploy_desc__FINEST",
+ new Object[] { deployDescriptor });
+ } catch (IOException e) {
+ if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+ UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
+ "initialize", JmsConstants.JMS_LOG_RESOURCE_BUNDLE,
+ "UIMAJMS_exception__WARNING", e);
+ }
+ } finally {
+ if (fis != null) {
+ try {
+ fis.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+ }
+ }
+ return springConfigFileArray;
+
+ }
+
+ /**
+ * Deploy Spring context files in a Spring Container.
+ *
+ * @param springContextFiles
+ * - array of Spring context files
+ *
+ * @throws Exception
+ */
+ public SpringContainerDeployer deploy(String[] springContextFiles) throws Exception {
+ SpringContainerDeployer springDeployer = new SpringContainerDeployer();
+ // now try to deploy the array of spring context files
+ springDeployer.deploy(springContextFiles);
+ // Poll the deployer for the initialization status. Wait for either successful
+ // initialization or failure.
+ while (!springDeployer.isInitialized() ) {
+ if ( springDeployer.initializationFailed()) {
+ throw new ResourceInitializationException();
+ }
+ synchronized (springDeployer) {
+ springDeployer.wait(100);
+ }
+ }
+ // Check if the deployer failed
+ // Register this class to receive Spring container notifications. Specifically, looking
+ // for an even signaling the container termination. This is done so that we can stop
+ // the monitor thread
+ FileSystemXmlApplicationContext context = springDeployer.getSpringContext();
+ context.addApplicationListener(this);
+ springDeployer.startListeners();
+
+ return springDeployer;
+ }
+
+ /**
+ * Creates an instance of a {@link JmxMonitor}, initializes it with the JMX Server URI and
+ * checkpoint frequency, and finally starts the monitor.
+ *
+ * @param samplingFrequency
+ * - how often the JmxMonitor should checkpoint to fetch service metrics
+ *
+ * @throws Exception
+ * - error on monitor initialization or startup
+ */
+ public void startMonitor(long samplingFrequency) throws Exception {
+ monitor = new JmxMonitor();
+
+ // Check if the monitor should run in the verbose mode. In this mode
+ // the monitor dumps JMX Server URI, and a list of UIMA-AS services
+ // found in that server. The default is to not show this info.
+ if (System.getProperty("verbose") != null) {
+ monitor.setVerbose();
+ }
+
+ // Use the URI provided in the first arg to connect to the JMX server.
+ // Also define sampling frequency. The monitor will collect the metrics
+ // at this interval.
+ String jmxServerPort = null;
+ // get the port of the JMX Server. This property can be set on the command line via -d
+ // OR it is set automatically by the code that creates an internal JMX Server. The latter
+ // is created in the {@link BaseAnalysisEngineController} constructor.
+ if ((jmxServerPort = System.getProperty("com.sun.management.jmxremote.port")) != null) {
+ // parameter is set, compose the URI
+ String jmxServerURI = "service:jmx:rmi:///jndi/rmi://localhost:" + jmxServerPort + "/jmxrmi";
+ // Connect to the JMX Server, configure checkpoint frequency, create MBean proxies for
+ // UIMA-AS MBeans and service input queues
+ monitor.initialize(jmxServerURI, samplingFrequency);
+ // Create formatter listener
+ JmxMonitorListener listener = null;
+ String formatterListenerClass = null;
+ // Check if a custom monitor formatter listener class is provided. The user provides this
+ // formatter by adding a -Duima.jmx.monitor.formatter=<class> parameter which specifies a class
+ // that implements {@link JmxMonitorListener} interface
+ if ((formatterListenerClass = System.getProperty(JmxMonitor.FormatterListener)) != null) {
+ Object object = null;
+ try {
+ // Instantiate the formatter listener class
+ Class formatterClass = Class.forName(formatterListenerClass);
+ object = formatterClass.newInstance();
+ } catch (ClassNotFoundException e) {
+ System.out
+ .println("Class Not Found:"
+ + formatterListenerClass
+ + ". Provide a Formatter Class Which Implements:org.apache.uima.aae.jmx.monitor.JmxMonitorListener");
+ throw e;
+ }
+ if (object instanceof JmxMonitorListener) {
+ listener = (JmxMonitorListener) object;
+ } else {
+ throw new InvalidClassException(
+ "Invalid Monitor Formatter Class:"
+ + formatterListenerClass
+ + ".The Monitor Requires a Formatter Which Implements:org.apache.uima.aae.jmx.monitor.JmxMonitorListener");
+ }
+ } else {
+ // The default formatter listener which logs to the UIMA log
+ listener = new BasicUimaJmxMonitorListener(monitor.getMaxServiceNameLength());
+ }
+ // Plug in the monitor listener
+ monitor.addJmxMonitorListener(listener);
+ // Create and start the monitor thread
+ monitorThread = new Thread(monitor);
+
+ // Start the monitor thread. It will run until the Spring container stops. When this happens
+ // the UIMA_Service receives notication via a {@code onApplicationEvent()} callback. There
+ // the monitor is stopped allowing the service to terminate.
+ monitorThread.start();
+ System.out.println(">>> Started JMX Monitor.\n\t>>> MBean Server Port:" + jmxServerPort
+ + "\n\t>>> Monitor Sampling Interval:" + samplingFrequency
+ + "\n\t>>> Monitor Formatter Class:" + listener.getClass().getName());
+ }
+
+ }
+
+ /**
+ * scan args for a particular arg, return the following token or the empty string if not found
+ *
+ * @param id
+ * the arg to search for
+ * @param args
+ * the array of strings
+ * @return the following token, or a 0 length string if not found
+ */
+ private static String getArg(String id, String[] args) {
+ for (int i = 0; i < args.length; i++) {
+ if (id.equals(args[i]))
+ return (i + 1 < args.length) ? args[i + 1] : "";
+ }
+ return "";
+ }
+
+ /**
+ * scan args for a particular arg, return the following token(s) or the empty string if not found
+ *
+ * @param id
+ * the arg to search for
+ * @param args
+ * the array of strings
+ * @return the following token, or a 0 length string array if not found
+ */
+ private static String[] getMultipleArg(String id, String[] args) {
+ String[] retr = {};
+ for (int i = 0; i < args.length; i++) {
+ if (id.equals(args[i])) {
+ String[] temp = new String[retr.length + 1];
+ for (int s = 0; s < retr.length; s++) {
+ temp[s] = retr[s];
+ }
+ retr = temp;
+ retr[retr.length - 1] = (i + 1 < args.length) ? args[i + 1] : null;
+ }
+ }
+ return retr;
+ }
+
+ /**
+ * scan args for a particular arg, return the following token(s) or the empty string if not found
+ *
+ * @param id
+ * the arg to search for
+ * @param args
+ * the array of strings
+ * @return the following token, or a 0 length string array if not found
+ */
+ private static String[] getMultipleArg2(String id, String[] args) {
+ String[] retr = {};
+ for (int i = 0; i < args.length; i++) {
+ if (id.equals(args[i])) {
+ int j = 0;
+ while ((i + 1 + j < args.length) && !args[i + 1 + j].startsWith("-")) {
+ String[] temp = new String[retr.length + 1];
+ for (int s = 0; s < retr.length; s++) {
+ temp[s] = retr[s];
+ }
+ retr = temp;
+ retr[retr.length - 1] = args[i + 1 + j++];
+ }
+ return retr;
+ }
+ }
+ return retr;
+ }
+
+ protected void finalize() {
+ System.err.println(this + " finalized");
+ }
+
+ private static void printUsageMessage() {
+ System.out
+ .println(" Arguments to the program are as follows : \n"
+ + "-d path-to-UIMA-Deployment-Descriptor [-d path-to-UIMA-Deployment-Descriptor ...] \n"
+ + "-saxon path-to-saxon.jar \n"
+ + "-xslt path-to-dd2spring-xslt\n"
+ + " or\n"
+ + "path to Spring XML Configuration File which is the output of running dd2spring\n"
+ + "-defaultBrokerURL the default broker URL to use for the service and all its delegates");
+ }
+
+ public void onApplicationEvent(ApplicationEvent event) {
+ if (event instanceof ContextClosedEvent && monitor != null && monitor.isRunning()) {
+ System.out.println("Stopping Monitor");
+ // Stop the monitor. The service has stopped
+ monitor.doStop();
+ }
+ }
+
+ /**
+ * The main routine for starting the deployment of a UIMA-AS instance. The args are either: 1 or
+ * more "paths" to Spring XML descriptors representing the information needed or some number of
+ * parameters, preceeded by a "-" sign. If the first arg doesn't start with a "-" it is presumed
+ * to be the first format.
+ *
+ * For the 2nd style, the arguments are: -saxonURL a-URL-to-the-saxon-jar usually starting with
+ * "file:", -xslt path-to-the-dd2spring.xsl file, -d path-to-UIMA-deployment-descriptor [-d
+ * path-to-another-dd ...] these arguments may be in any order)
+ *
+ * For the 3rd style, like #2 but with multiple dd-files following a single -dd Useful for calling
+ * from scripts.
+ *
+ * @param args
+ */
+ public static void main(String[] args) {
+ try {
+ UIMA_Service service = new UIMA_Service();
+ // parse command args and run dd2spring to generate spring context
+ // files from deployment descriptors
+ String contextFiles[] = service.initialize(args);
+ // If no context files generated there is nothing to do
+ if (contextFiles == null) {
+ return;
+ }
+ // Deploy components defined in Spring context files. This method blocks until
+ // the container is fully initialized and all UIMA-AS components are succefully
+ // deployed.
+ SpringContainerDeployer serviceDeployer = service.deploy(contextFiles);
+
+ if (serviceDeployer == null) {
+ System.out.println(">>> Failed to Deploy UIMA Service. Check Logs for Details");
+ System.exit(1);
+ }
+ // Add a shutdown hook to catch kill signal and to force quiesce and stop
+ ServiceShutdownHook shutdownHook = new ServiceShutdownHook(serviceDeployer);
+ Runtime.getRuntime().addShutdownHook(shutdownHook);
+ // Check if we should start an optional JMX-based monitor that will provide service metrics
+ // The monitor is enabled by existence of -Duima.jmx.monitor.interval=<number> parameter. By
+ // default
+ // the monitor is not enabled.
+ String monitorCheckpointFrequency;
+ if ((monitorCheckpointFrequency = System.getProperty(JmxMonitor.SamplingInterval)) != null) {
+ // Found monitor checkpoint frequency parameter, configure and start the monitor.
+ // If the monitor fails to initialize the service is not effected.
+ service.startMonitor(Long.parseLong(monitorCheckpointFrequency));
+ }
+
+ for (String s: args) {
+ if ( s.equals("-b") ) {
+ System.out.println("Moving to background");
+ return;
+ }
+ }
+
+ AnalysisEngineController topLevelControllor = serviceDeployer.getTopLevelController();
+ String prompt = "Press 'q'+'Enter' to quiesce and stop the service or 's'+'Enter' to stop it now.\nNote: selected option is not echoed on the console.";
+ if (topLevelControllor != null) {
+ System.out.println(prompt);
+ // Loop forever or until the service is stopped
+ while (!topLevelControllor.isStopped()) {
+ if (System.in.available() > 0) {
+ int c = System.in.read();
+ if (c == 's') {
+ serviceDeployer.undeploy(SpringContainerDeployer.STOP_NOW);
+ } else if (c == 'q') {
+ serviceDeployer.undeploy(SpringContainerDeployer.QUIESCE_AND_STOP);
+ } else if (Character.isLetter(c) || Character.isDigit(c)) {
+ System.out.println(prompt);
+ }
+ }
+ // This is a polling loop. Sleep for 1 sec
+ try {
+ if (!topLevelControllor.isStopped())
+ Thread.sleep(1000);
+ } catch (InterruptedException ex) {
+ }
+ } // while
+ }
+ } catch (Exception e) {
+ if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+ UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
+ "main", JmsConstants.JMS_LOG_RESOURCE_BUNDLE,
+ "UIMAJMS_exception__WARNING", e);
+ }
+ }
+ }
+ static class ServiceShutdownHook extends Thread {
+
+ public SpringContainerDeployer serviceDeployer;
+
+ public ServiceShutdownHook(SpringContainerDeployer serviceDeployer) {
+ this.serviceDeployer = serviceDeployer;
+ }
+
+ public void run() {
+ try {
+ AnalysisEngineController topLevelController = serviceDeployer.getTopLevelController();
+ if (topLevelController != null && !topLevelController.isStopped() ) {
+ UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
+ "run", JmsConstants.JMS_LOG_RESOURCE_BUNDLE,
+ "UIMAJMS_caught_signal__INFO", new Object[] { topLevelController.getComponentName() });
+ serviceDeployer.undeploy(SpringContainerDeployer.QUIESCE_AND_STOP);
+ }
+ } catch( Exception e) {
+ if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+ UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
+ "run", JmsConstants.JMS_LOG_RESOURCE_BUNDLE,
+ "UIMAJMS_exception__WARNING", e);
+ }
+ }
+ }
+ }
+}
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+ <delegateAnalysisEngine key="UimaAsRemote">
+ <import name="com.ibm.ducc.test.service.UimaAsRemote"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>UimaAsFailAgg</name>
+ <description/>
+ <version>1.0</version>
+ <vendor/>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <flowConstraints>
+ <fixedFlow>
+ <node>UimaAsRemote</node>
+ </fixedFlow>
+ </flowConstraints>
+ <fsIndexCollection/>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ <languagesSupported/>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+ <resourceManagerConfiguration/>
+</analysisEngineDescription>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_0.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_0.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_0.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_0.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+ <delegateAnalysisEngine key="UimaAsRemote">
+ <import name="com.ibm.ducc.test.service.UimaAsRemote_0"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>UimaAsFailAgg</name>
+ <description/>
+ <version>1.0</version>
+ <vendor/>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <flowConstraints>
+ <fixedFlow>
+ <node>UimaAsRemote</node>
+ </fixedFlow>
+ </flowConstraints>
+ <fsIndexCollection/>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ <languagesSupported/>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+ <resourceManagerConfiguration/>
+</analysisEngineDescription>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_1.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_1.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_1.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_1.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+ <delegateAnalysisEngine key="UimaAsRemote">
+ <import name="com.ibm.ducc.test.service.UimaAsRemote_1"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>UimaAsFailAgg</name>
+ <description/>
+ <version>1.0</version>
+ <vendor/>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <flowConstraints>
+ <fixedFlow>
+ <node>UimaAsRemote</node>
+ </fixedFlow>
+ </flowConstraints>
+ <fsIndexCollection/>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ <languagesSupported/>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+ <resourceManagerConfiguration/>
+</analysisEngineDescription>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_10.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_10.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_10.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_10.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+ <delegateAnalysisEngine key="UimaAsRemote">
+ <import name="com.ibm.ducc.test.service.UimaAsRemote_10"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>UimaAsFailAgg</name>
+ <description/>
+ <version>1.0</version>
+ <vendor/>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <flowConstraints>
+ <fixedFlow>
+ <node>UimaAsRemote</node>
+ </fixedFlow>
+ </flowConstraints>
+ <fsIndexCollection/>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ <languagesSupported/>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+ <resourceManagerConfiguration/>
+</analysisEngineDescription>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_11.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_11.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_11.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_11.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+ <delegateAnalysisEngine key="UimaAsRemote">
+ <import name="com.ibm.ducc.test.service.UimaAsRemote_11"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>UimaAsFailAgg</name>
+ <description/>
+ <version>1.0</version>
+ <vendor/>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <flowConstraints>
+ <fixedFlow>
+ <node>UimaAsRemote</node>
+ </fixedFlow>
+ </flowConstraints>
+ <fsIndexCollection/>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ <languagesSupported/>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+ <resourceManagerConfiguration/>
+</analysisEngineDescription>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_2.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_2.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_2.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_2.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+ <delegateAnalysisEngine key="UimaAsRemote">
+ <import name="com.ibm.ducc.test.service.UimaAsRemote_2"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>UimaAsFailAgg</name>
+ <description/>
+ <version>1.0</version>
+ <vendor/>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <flowConstraints>
+ <fixedFlow>
+ <node>UimaAsRemote</node>
+ </fixedFlow>
+ </flowConstraints>
+ <fsIndexCollection/>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ <languagesSupported/>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+ <resourceManagerConfiguration/>
+</analysisEngineDescription>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_3.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_3.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_3.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_3.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+ <delegateAnalysisEngine key="UimaAsRemote">
+ <import name="com.ibm.ducc.test.service.UimaAsRemote_3"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>UimaAsFailAgg</name>
+ <description/>
+ <version>1.0</version>
+ <vendor/>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <flowConstraints>
+ <fixedFlow>
+ <node>UimaAsRemote</node>
+ </fixedFlow>
+ </flowConstraints>
+ <fsIndexCollection/>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ <languagesSupported/>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+ <resourceManagerConfiguration/>
+</analysisEngineDescription>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_4.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_4.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_4.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_4.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+ <delegateAnalysisEngine key="UimaAsRemote">
+ <import name="com.ibm.ducc.test.service.UimaAsRemote_4"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>UimaAsFailAgg</name>
+ <description/>
+ <version>1.0</version>
+ <vendor/>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <flowConstraints>
+ <fixedFlow>
+ <node>UimaAsRemote</node>
+ </fixedFlow>
+ </flowConstraints>
+ <fsIndexCollection/>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ <languagesSupported/>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+ <resourceManagerConfiguration/>
+</analysisEngineDescription>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_5.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_5.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_5.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_5.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+ <delegateAnalysisEngine key="UimaAsRemote">
+ <import name="com.ibm.ducc.test.service.UimaAsRemote_5"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>UimaAsFailAgg</name>
+ <description/>
+ <version>1.0</version>
+ <vendor/>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <flowConstraints>
+ <fixedFlow>
+ <node>UimaAsRemote</node>
+ </fixedFlow>
+ </flowConstraints>
+ <fsIndexCollection/>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ <languagesSupported/>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+ <resourceManagerConfiguration/>
+</analysisEngineDescription>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_6.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_6.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_6.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_6.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+ <delegateAnalysisEngine key="UimaAsRemote">
+ <import name="com.ibm.ducc.test.service.UimaAsRemote_6"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>UimaAsFailAgg</name>
+ <description/>
+ <version>1.0</version>
+ <vendor/>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <flowConstraints>
+ <fixedFlow>
+ <node>UimaAsRemote</node>
+ </fixedFlow>
+ </flowConstraints>
+ <fsIndexCollection/>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ <languagesSupported/>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+ <resourceManagerConfiguration/>
+</analysisEngineDescription>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_7.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_7.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_7.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_7.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+ <delegateAnalysisEngine key="UimaAsRemote">
+ <import name="com.ibm.ducc.test.service.UimaAsRemote_7"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>UimaAsFailAgg</name>
+ <description/>
+ <version>1.0</version>
+ <vendor/>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <flowConstraints>
+ <fixedFlow>
+ <node>UimaAsRemote</node>
+ </fixedFlow>
+ </flowConstraints>
+ <fsIndexCollection/>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ <languagesSupported/>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+ <resourceManagerConfiguration/>
+</analysisEngineDescription>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_8.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_8.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_8.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_8.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+ <delegateAnalysisEngine key="UimaAsRemote">
+ <import name="com.ibm.ducc.test.service.UimaAsRemote_8"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>UimaAsFailAgg</name>
+ <description/>
+ <version>1.0</version>
+ <vendor/>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <flowConstraints>
+ <fixedFlow>
+ <node>UimaAsRemote</node>
+ </fixedFlow>
+ </flowConstraints>
+ <fsIndexCollection/>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ <languagesSupported/>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+ <resourceManagerConfiguration/>
+</analysisEngineDescription>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_9.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_9.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_9.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsFailAgg_9.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+ <delegateAnalysisEngineSpecifiers>
+ <delegateAnalysisEngine key="UimaAsRemote">
+ <import name="com.ibm.ducc.test.service.UimaAsRemote_9"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>UimaAsFailAgg</name>
+ <description/>
+ <version>1.0</version>
+ <vendor/>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <flowConstraints>
+ <fixedFlow>
+ <node>UimaAsRemote</node>
+ </fixedFlow>
+ </flowConstraints>
+ <fsIndexCollection/>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ <languagesSupported/>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+ <resourceManagerConfiguration/>
+</analysisEngineDescription>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,16 @@
+<!--
+ *
+ * Remote pointing at remote RandomSleepAE
+ *
+ -->
+<customResourceSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
+ <resourceClassName>org.apache.uima.aae.jms_adapter.JmsAnalysisEngineServiceAdapter</resourceClassName>
+ <parameters>
+ <!-- parameter name="brokerURL" value="tcp://bluej02:61617" / -->
+ <parameter name="brokerURL" value="${defaultBrokerURL}" />
+ <parameter name="endpoint" value="FixedSleepAE"/>
+ <parameter name="timeout" value="0"/>
+ <parameter name="getmetatimeout" value="5000"/>
+ <parameter name="cpctimeout" value="5000"/>
+ </parameters>
+</customResourceSpecifier>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_0.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_0.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_0.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_0.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,16 @@
+y<!--
+ *
+ * Remote pointing at remote RandomSleepAE
+ *
+ -->
+<customResourceSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
+ <resourceClassName>org.apache.uima.aae.jms_adapter.JmsAnalysisEngineServiceAdapter</resourceClassName>
+ <parameters>
+ <!-- parameter name="brokerURL" value="tcp://bluej02:61617" / -->
+ <parameter name="brokerURL" value="${defaultBrokerURL}" />
+ <parameter name="endpoint" value="FixedSleepAE_0"/>
+ <parameter name="timeout" value="0"/>
+ <parameter name="getmetatimeout" value="5000"/>
+ <parameter name="cpctimeout" value="5000"/>
+ </parameters>
+</customResourceSpecifier>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_1.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_1.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_1.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_1.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,16 @@
+<!--
+ *
+ * Remote pointing at remote RandomSleepAE
+ *
+ -->
+<customResourceSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
+ <resourceClassName>org.apache.uima.aae.jms_adapter.JmsAnalysisEngineServiceAdapter</resourceClassName>
+ <parameters>
+ <!-- parameter name="brokerURL" value="tcp://bluej02:61617" / -->
+ <parameter name="brokerURL" value="${defaultBrokerURL}" />
+ <parameter name="endpoint" value="FixedSleepAE_1"/>
+ <parameter name="timeout" value="0"/>
+ <parameter name="getmetatimeout" value="5000"/>
+ <parameter name="cpctimeout" value="5000"/>
+ </parameters>
+</customResourceSpecifier>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_10.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_10.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_10.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_10.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,16 @@
+<!--
+ *
+ * Remote pointing at remote RandomSleepAE
+ *
+ -->
+<customResourceSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
+ <resourceClassName>org.apache.uima.aae.jms_adapter.JmsAnalysisEngineServiceAdapter</resourceClassName>
+ <parameters>
+ <!-- parameter name="brokerURL" value="tcp://bluej02:61617" / -->
+ <parameter name="brokerURL" value="${defaultBrokerURL}" />
+ <parameter name="endpoint" value="FixedSleepAE_10"/>
+ <parameter name="timeout" value="0"/>
+ <parameter name="getmetatimeout" value="5000"/>
+ <parameter name="cpctimeout" value="5000"/>
+ </parameters>
+</customResourceSpecifier>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_11.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_11.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_11.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_11.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,16 @@
+<!--
+ *
+ * Remote pointing at remote RandomSleepAE
+ *
+ -->
+<customResourceSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
+ <resourceClassName>org.apache.uima.aae.jms_adapter.JmsAnalysisEngineServiceAdapter</resourceClassName>
+ <parameters>
+ <!-- parameter name="brokerURL" value="tcp://bluej02:61617" / -->
+ <parameter name="brokerURL" value="${defaultBrokerURL}" />
+ <parameter name="endpoint" value="FixedSleepAE_11"/>
+ <parameter name="timeout" value="0"/>
+ <parameter name="getmetatimeout" value="5000"/>
+ <parameter name="cpctimeout" value="5000"/>
+ </parameters>
+</customResourceSpecifier>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_2.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_2.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_2.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_2.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,16 @@
+<!--
+ *
+ * Remote pointing at remote RandomSleepAE
+ *
+ -->
+<customResourceSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
+ <resourceClassName>org.apache.uima.aae.jms_adapter.JmsAnalysisEngineServiceAdapter</resourceClassName>
+ <parameters>
+ <!-- parameter name="brokerURL" value="tcp://bluej02:61617" / -->
+ <parameter name="brokerURL" value="${defaultBrokerURL}" />
+ <parameter name="endpoint" value="FixedSleepAE_2"/>
+ <parameter name="timeout" value="0"/>
+ <parameter name="getmetatimeout" value="5000"/>
+ <parameter name="cpctimeout" value="5000"/>
+ </parameters>
+</customResourceSpecifier>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_3.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_3.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_3.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_3.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,16 @@
+<!--
+ *
+ * Remote pointing at remote RandomSleepAE
+ *
+ -->
+<customResourceSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
+ <resourceClassName>org.apache.uima.aae.jms_adapter.JmsAnalysisEngineServiceAdapter</resourceClassName>
+ <parameters>
+ <!-- parameter name="brokerURL" value="tcp://bluej02:61617" / -->
+ <parameter name="brokerURL" value="${defaultBrokerURL}" />
+ <parameter name="endpoint" value="FixedSleepAE_3"/>
+ <parameter name="timeout" value="0"/>
+ <parameter name="getmetatimeout" value="5000"/>
+ <parameter name="cpctimeout" value="5000"/>
+ </parameters>
+</customResourceSpecifier>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_4.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_4.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_4.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_4.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,16 @@
+<!--
+ *
+ * Remote pointing at remote RandomSleepAE
+ *
+ -->
+<customResourceSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
+ <resourceClassName>org.apache.uima.aae.jms_adapter.JmsAnalysisEngineServiceAdapter</resourceClassName>
+ <parameters>
+ <!-- parameter name="brokerURL" value="tcp://bluej02:61617" / -->
+ <parameter name="brokerURL" value="${defaultBrokerURL}" />
+ <parameter name="endpoint" value="FixedSleepAE_4"/>
+ <parameter name="timeout" value="0"/>
+ <parameter name="getmetatimeout" value="5000"/>
+ <parameter name="cpctimeout" value="5000"/>
+ </parameters>
+</customResourceSpecifier>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_5.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_5.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_5.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_5.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,16 @@
+<!--
+ *
+ * Remote pointing at remote RandomSleepAE
+ *
+ -->
+<customResourceSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
+ <resourceClassName>org.apache.uima.aae.jms_adapter.JmsAnalysisEngineServiceAdapter</resourceClassName>
+ <parameters>
+ <!-- parameter name="brokerURL" value="tcp://bluej02:61617" / -->
+ <parameter name="brokerURL" value="${defaultBrokerURL}" />
+ <parameter name="endpoint" value="FixedSleepAE_5"/>
+ <parameter name="timeout" value="0"/>
+ <parameter name="getmetatimeout" value="5000"/>
+ <parameter name="cpctimeout" value="5000"/>
+ </parameters>
+</customResourceSpecifier>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_6.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_6.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_6.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_6.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,16 @@
+<!--
+ *
+ * Remote pointing at remote RandomSleepAE
+ *
+ -->
+<customResourceSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
+ <resourceClassName>org.apache.uima.aae.jms_adapter.JmsAnalysisEngineServiceAdapter</resourceClassName>
+ <parameters>
+ <!-- parameter name="brokerURL" value="tcp://bluej02:61617" / -->
+ <parameter name="brokerURL" value="${defaultBrokerURL}" />
+ <parameter name="endpoint" value="FixedSleepAE_6"/>
+ <parameter name="timeout" value="0"/>
+ <parameter name="getmetatimeout" value="5000"/>
+ <parameter name="cpctimeout" value="5000"/>
+ </parameters>
+</customResourceSpecifier>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_7.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_7.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_7.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_7.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,16 @@
+<!--
+ *
+ * Remote pointing at remote RandomSleepAE
+ *
+ -->
+<customResourceSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
+ <resourceClassName>org.apache.uima.aae.jms_adapter.JmsAnalysisEngineServiceAdapter</resourceClassName>
+ <parameters>
+ <!-- parameter name="brokerURL" value="tcp://bluej02:61617" / -->
+ <parameter name="brokerURL" value="${defaultBrokerURL}" />
+ <parameter name="endpoint" value="FixedSleepAE_7"/>
+ <parameter name="timeout" value="0"/>
+ <parameter name="getmetatimeout" value="5000"/>
+ <parameter name="cpctimeout" value="5000"/>
+ </parameters>
+</customResourceSpecifier>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_8.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_8.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_8.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_8.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,16 @@
+<!--
+ *
+ * Remote pointing at remote RandomSleepAE
+ *
+ -->
+<customResourceSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
+ <resourceClassName>org.apache.uima.aae.jms_adapter.JmsAnalysisEngineServiceAdapter</resourceClassName>
+ <parameters>
+ <!-- parameter name="brokerURL" value="tcp://bluej02:61617" / -->
+ <parameter name="brokerURL" value="${defaultBrokerURL}" />
+ <parameter name="endpoint" value="FixedSleepAE_8"/>
+ <parameter name="timeout" value="0"/>
+ <parameter name="getmetatimeout" value="5000"/>
+ <parameter name="cpctimeout" value="5000"/>
+ </parameters>
+</customResourceSpecifier>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_9.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_9.xml?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_9.xml (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/test/service/UimaAsRemote_9.xml Thu Jan 24 18:13:55 2013
@@ -0,0 +1,16 @@
+<!--
+ *
+ * Remote pointing at remote RandomSleepAE
+ *
+ -->
+<customResourceSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
+ <resourceClassName>org.apache.uima.aae.jms_adapter.JmsAnalysisEngineServiceAdapter</resourceClassName>
+ <parameters>
+ <!-- parameter name="brokerURL" value="tcp://bluej02:61617" / -->
+ <parameter name="brokerURL" value="${defaultBrokerURL}" />
+ <parameter name="endpoint" value="FixedSleepAE_9"/>
+ <parameter name="timeout" value="0"/>
+ <parameter name="getmetatimeout" value="5000"/>
+ <parameter name="cpctimeout" value="5000"/>
+ </parameters>
+</customResourceSpecifier>
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/tools/DuccPubListener.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/tools/DuccPubListener.java?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/tools/DuccPubListener.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/tools/DuccPubListener.java Thu Jan 24 18:13:55 2013
@@ -0,0 +1,267 @@
+package org.apache.uima.ducc.tools;
+
+
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jms.Connection;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.ObjectMessage;
+import javax.jms.Session;
+import javax.jms.Topic;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import com.google.gson.Gson;
+
+
+public class DuccPubListener
+ implements MessageListener
+{
+ String host;
+ int port;
+ String topic_str;
+ String[] agents;
+ String outfn = null;
+ int generation = 0;
+ int timeout = 0;
+ Map<String, Boolean> agentPresence = new HashMap<String, Boolean>();
+ int total_agents = 0;
+
+ Connection connection;
+ Session session;
+ Topic topic;
+
+ boolean do_filter = false;
+
+ public DuccPubListener (String host, int port, String topic_str, int timeout, String outfn, String[] agents)
+ {
+ this.host = host;
+ this.port = port;
+ this.topic_str = topic_str;
+ this.timeout = timeout;
+ this.outfn = outfn;
+ this.agents = agents;
+
+ for ( String a : agents ) {
+ agentPresence.put(a, false);
+ }
+ total_agents = agentPresence.size();
+
+ if ( ((topic_str.indexOf("metrics") >= 0 ) || (topic_str.indexOf("inventory") >= 0) )
+ && ( total_agents > 0 ) ) {
+ do_filter = true;
+ }
+
+ }
+
+ protected void connect()
+ throws Throwable
+ {
+ String url = "tcp://" + host + ":" + port;
+ ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(url);
+ connection = factory.createConnection();
+ session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ topic = session.createTopic(topic_str);
+
+ MessageConsumer consumer = session.createConsumer(topic);
+ consumer.setMessageListener(this);
+
+ connection.start();
+
+ if ( timeout > 0 ) {
+ try {
+ Thread.sleep(timeout * 1000);
+ } catch ( Throwable t ){
+ }
+ close();
+ }
+ }
+
+ protected void close()
+ throws Throwable
+ {
+ connection.close();
+ System.exit(0);
+ }
+
+ /**
+ * For agents - we might be looking for multiple messages. Need to search the message to see if
+ * one of the watch agent names is there.
+ */
+ String receivedAgent(String msg)
+ {
+ String answer = null;
+
+ for ( String a : agents ) {
+ if ( agentPresence.get(a) == true ) {
+ continue;
+ }
+ if ( msg.indexOf(a) >= 0 ) {
+ agentPresence.put(a, true);
+ total_agents--;
+ answer = a;
+ }
+ }
+
+ return answer;
+ }
+
+ void writeString(String fn, String msg)
+ {
+ try {
+ FileWriter fw = new FileWriter(fn);
+ fw.write(msg);
+ fw.close();
+ System.out.println(fn); // for filters to know what was written
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void onMessage(Message message)
+ {
+ // System.out.println("Got message");
+ try {
+ if ( message instanceof ObjectMessage ) {
+
+ String suffix = null;
+ Object obj = ((ObjectMessage)message).getObject();
+ Gson gson = new Gson();
+ String msg = gson.toJson(obj);
+
+ suffix = ".json";
+ if ( !do_filter ) {
+ String out = outfn + suffix;
+ if ( timeout > 0 ) out = out + "." + (++generation);
+ writeString(out, msg);
+ if ( timeout <= 0 ) close();
+ } else {
+ String agent = receivedAgent(msg);
+ if ( agent != null ) {
+ String out = outfn + "." + agent + suffix;
+ writeString(out, msg);
+ }
+
+ if ( total_agents == 0 ) close();
+ }
+ }
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ }
+
+ public void run()
+ {
+ try {
+ connect();
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+
+ static void usage(String msg)
+ {
+ if ( msg != null ) System.out.println(msg);
+
+ System.out.println("Usage:");
+ System.out.println(" DuccPubListener args");
+ System.out.println("Where args are:");
+ System.out.println(" -host AMQhostname");
+ System.out.println(" Default is \"localhost\"");
+ System.out.println(" -port AMQportname");
+ System.out.println(" Default is 61616");
+ System.out.println(" -topic topic");
+ System.out.println(" No default, required");
+ System.out.println(" -output outputFileName");
+ System.out.println(" Default is topic");
+ System.out.println(" -timeout timeInSeconds");
+ System.out.println(" How long to listen. Default is 0. If 0, exit after first message.");
+ System.out.println(" -agent agentname");
+ System.out.println(" For agent broadcasts, which agent to listen for. Default is \"all\"");
+
+ System.exit(1);
+ }
+
+ public static void main(String[] args)
+ {
+
+ if ( args.length == 0 ) usage(null);
+
+ String[] agents = {"all"};
+ String amqhost = "localhost";
+ int amqport = 61616;
+ int timeout = 0;
+ String topic = null;
+ String outfn = null;
+
+ for ( int i = 0; i < args.length; ) {
+
+ if ( "-agent".startsWith(args[i]) ) {
+ agents = args[i+1].split(",");
+ i++; i++;
+ continue;
+ }
+
+ if ( "-host".startsWith(args[i]) ) {
+ amqhost = args[i+1];
+ i++; i++;
+ continue;
+ }
+
+ if ( "-port".startsWith(args[i]) ) {
+ try {
+ amqport = Integer.parseInt(args[i+1]);
+ } catch ( Throwable t ) {
+ usage("AMQ port is not numeric");
+ }
+ i++; i++;
+ continue;
+ }
+
+ if ( "-topic".startsWith(args[i]) ) {
+ topic = args[i+1];
+ i++; i++;
+ continue;
+ }
+
+ if ( "-timeout".startsWith(args[i]) ) {
+ try {
+ timeout = Integer.parseInt(args[i+1]);
+ } catch ( Throwable t ) {
+ usage("Timeout is not numeric");
+ }
+ i++; i++;
+ continue;
+ }
+
+
+ if ( "-output".startsWith(args[i]) ) {
+ outfn = args[i+1];
+ i++; i++;
+ continue;
+ }
+
+ usage(null);
+ }
+
+ if ( topic == null ) {
+ usage("Must specify topic");
+ }
+
+ if ( outfn == null ) {
+ outfn = topic;
+ }
+
+ DuccPubListener dl = new DuccPubListener(amqhost, amqport, topic, timeout, outfn, agents);
+ dl.run();
+ }
+}
+
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.inputs
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.inputs?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.inputs (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.inputs Thu Jan 24 18:13:55 2013
@@ -0,0 +1,3 @@
+elapsed=14954 15570 19227 20054 20560 28211 33211 28114 31732 41728 43411 38173 45100 50907 146957
+
+
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.job
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.job?rev=1438113&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.job (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.job Thu Jan 24 18:13:55 2013
@@ -0,0 +1,21 @@
+description Test job 1
+
+driver_classpath ../lib/uima-ducc-examples.jar
+driver_descriptor_CR org.apache.uima.ducc.test.randomsleep.FixedSleepCR
+driver_descriptor_CR_overrides jobfile:1.inputs,compression:10,error_rate:0.0
+driver_jvm_args -Xmx500M
+driver_environment LD_LIBRARY_PATH=/a/nother/bogus/path
+
+process_descriptor_AE org.apache.uima.ducc.test.randomsleep.FixedSleepAE
+process_memory_size 4
+process_classpath ../lib/uima-ducc-examples.jar
+process_jvm_args -Xmx100M
+process_thread_count 2
+process_per_item_time_max 5
+process_get_meta_time_max 5
+process_environment AE_INIT_TIME=5 AE_INIT_RANGE=5 INIT_ERROR=0 LD_LIBRARY_PATH=/yet/a/nother/dumb/path
+process_deployments_max 999
+
+scheduling_class normal
+
+