uima-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r707118 - in /incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main: java/org/apache/uima/aae/ java/org/apache/uima/aae/controller/ java/org/apache/uima/aae/error/handler/ java/org/apache/uima/aae/handler/input/ java/org/apache/uima/a...
Date Wed, 22 Oct 2008 16:21:58 GMT
Author: eae
Date: Wed Oct 22 09:21:58 2008
New Revision: 707118

URL: http://svn.apache.org/viewvc?rev=707118&view=rev
Log: (empty)

Modified:
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/AsynchAECasManager_impl.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/InputChannel.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AnalysisEngineController.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/BaseAnalysisEngineController.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/Endpoint.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/Endpoint_impl.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/error/handler/ProcessCasErrorHandler.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/handler/input/ProcessRequestHandler_impl.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/handler/input/ProcessResponseHandler.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/message/AsynchAEMessage.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UimaMessageValidator.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/resources/uimaee_messages.properties

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/AsynchAECasManager_impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/AsynchAECasManager_impl.java?rev=707118&r1=707117&r2=707118&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/AsynchAECasManager_impl.java
(original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/AsynchAECasManager_impl.java
Wed Oct 22 09:21:58 2008
@@ -88,12 +88,14 @@
 
   public void initialize(int aCasPoolSize, String aContextName,
           Properties aPerformanceTuningSettings) throws Exception {
+ 
     UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
-            "getEndpointConnection", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+            "initialize", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
             "UIMAEE_primary_cas_pool_init__CONFIG", new Object[] { aCasPoolSize, aContextName
});
     // Create CAS Pool for incoming messages
     casManager.defineCasPool(aContextName, aCasPoolSize, aPerformanceTuningSettings);
     contextName = aContextName;
+    
     setInitialized(true);
     if (aPerformanceTuningSettings != null) {
       System.out.println("CasManager Initialized Cas Pool:" + aContextName + ". Cas Pool
Size:"

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/InputChannel.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/InputChannel.java?rev=707118&r1=707117&r2=707118&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/InputChannel.java
(original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/InputChannel.java
Wed Oct 22 09:21:58 2008
@@ -32,4 +32,9 @@
 	public ServiceInfo getServiceInfo();
 	public boolean isStopped();
   public int getConcurrentConsumerCount();
+  public void destroyListener( String anEndpointName, String aDelegateKey );
+  public void createListener( String aDelegateKey ) throws Exception;
+  public boolean isFailed(String aDelegateKey);
+  public boolean isListenerForDestination( String anEndpointName);
+
 }

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java?rev=707118&r1=707117&r2=707118&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java
(original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java
Wed Oct 22 09:21:58 2008
@@ -32,6 +32,7 @@
 import org.apache.uima.UIMAFramework;
 import org.apache.uima.aae.AsynchAECasManager;
 import org.apache.uima.aae.InProcessCache;
+import org.apache.uima.aae.InputChannel;
 import org.apache.uima.aae.UIMAEE_Constants;
 import org.apache.uima.aae.UimaClassFactory;
 import org.apache.uima.aae.InProcessCache.CacheEntry;
@@ -1023,6 +1024,12 @@
 
 						delegateStatMap.put( key, delegateStatsArray);					
 					}
+					// If the service has stopped dont bother doing anything else. The service
+					// may have been stopped because listener connection could not be established.
+					if ( isStopped() ) {
+					  return;
+					}
+					
 					dispatchMetadataRequest(delegateEndpoints[i]);
 				}
 			}
@@ -1502,14 +1509,26 @@
 	public void retryProcessCASRequest(String aCasReferenceId, Endpoint anEndpoint, boolean
addEndpointToCache) throws AsynchAEException
 	{
 		Endpoint endpoint = null;
-		if ( getInProcessCache().getEndpoint(anEndpoint.getEndpoint(), aCasReferenceId) != null)
+    String key = lookUpDelegateKey(anEndpoint.getEndpoint());
+
+    if ( getInProcessCache().getEndpoint(anEndpoint.getEndpoint(), aCasReferenceId) != null)
 		{
 			endpoint = getInProcessCache().getEndpoint(anEndpoint.getEndpoint(), aCasReferenceId);
+      Endpoint masterEndpoint = lookUpEndpoint(key, true);
+      //  check if the master endpoint destination has changed. This can be a case when
+      //  a new temp queue is created when the previous temp queue is destroyed due to
+      //  a broken connection.
+      if ( masterEndpoint.getDestination() != null ) {
+        //  Make sure that we use the current destination for replies
+        if (! masterEndpoint.getDestination().toString().equals( endpoint.getDestination().toString()))
{
+          //  Override the endopoint reply-to destination with the master destination
+          endpoint.setDestination(masterEndpoint.getDestination());
+        }
+      }
 		}
 		else
 		{
 			endpoint = anEndpoint;
-			String key = lookUpDelegateKey(anEndpoint.getEndpoint());
 			endpoint = lookUpEndpoint(key, true);
 			getInProcessCache().addEndpoint(endpoint, aCasReferenceId);
 		}
@@ -1785,8 +1804,8 @@
 			getCasManagerWrapper().initialize("AggregateContext");
 			aggregateMetadata.setTypeSystem(getCasManagerWrapper().getMetadata().getTypeSystem());
 			aggregateMetadata.setTypePriorities(getCasManagerWrapper().getMetadata().getTypePriorities());
+			
 			aggregateMetadata.setFsIndexCollection(getCasManagerWrapper().getMetadata().getFsIndexCollection());
-
 		}
 		
         flowControllerContainer = 
@@ -1804,6 +1823,7 @@
 				flowControllerContainer.removeAnalysisEngines(disabledDelegateList);
 			}
 		}
+		
 		//	Before processing CASes, send notifications to all collocated delegates to
 		//	complete initialization. Currently this call forces all collocated Cas Multiplier delegates
 		//	to initialize their internal Cas Pools. CM Cas Pool is lazily initialized on 
@@ -1817,7 +1837,6 @@
 		// the controller before it is initialized.
 		latch.openLatch(getName(), isTopLevelComponent(), true);
 		initialized = true;
-		
 		//  Notify client listener that the initialization of the controller was successfull
 		notifyListenersWithInitializationStatus(null);
 	}

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AnalysisEngineController.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AnalysisEngineController.java?rev=707118&r1=707117&r2=707118&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AnalysisEngineController.java
(original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AnalysisEngineController.java
Wed Oct 22 09:21:58 2008
@@ -197,4 +197,6 @@
   public UimaTransport getTransport(String aKey) throws Exception;
 
   public void initializeVMTransport(int parentControllerReplyConsumerCount) throws Exception;
+
+  public InputChannel getReplyInputChannel(String aDelegateKey);
 }

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/BaseAnalysisEngineController.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/BaseAnalysisEngineController.java?rev=707118&r1=707117&r2=707118&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/BaseAnalysisEngineController.java
(original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/BaseAnalysisEngineController.java
Wed Oct 22 09:21:58 2008
@@ -880,7 +880,10 @@
 	{
 		if ( !inputChannelMap.containsKey(anInputChannel.getInputQueueName()))
 		{
-			inputChannelMap.put(anInputChannel.getInputQueueName(), anInputChannel);
+      inputChannelMap.put(anInputChannel.getInputQueueName(), anInputChannel);
+      if ( inputChannelList.contains(anInputChannel)) {
+        inputChannelList.add(anInputChannel);
+      }
 		}
 	}
 	public InputChannel getInputChannel()
@@ -1769,14 +1772,25 @@
 		
 		for( int i=0; inputChannelList != null && i < inputChannelList.size(); i++ )
 		{
-			if ( ((InputChannel)inputChannelList.get(i)).getInputQueueName().equals( anEndpointName)
)
-			{
-				return (InputChannel)inputChannelList.get(i);
-			}
+		  InputChannel iC = (InputChannel)inputChannelList.get(i);
+		  if ( iC.isListenerForDestination( anEndpointName)) {
+        return (InputChannel)inputChannelList.get(i);
+		  }
 		}
 		return null;
 	}
 	 
+	public InputChannel getReplyInputChannel( String aDelegateKey ) {
+    for( int i=0; inputChannelList != null && i < inputChannelList.size(); i++
)
+    {
+      if ( ((InputChannel)inputChannelList.get(i)).isFailed(aDelegateKey) )
+      {
+        return (InputChannel)inputChannelList.get(i);
+      }
+    }
+    return null;
+	  
+	}
 	/**
 	 * Callback method called the InProcessCache becomes empty meaning ALL CASes are processed.
 	 * The callback is only active when the the top level component is in the process of shutting


Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/Endpoint.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/Endpoint.java?rev=707118&r1=707117&r2=707118&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/Endpoint.java
(original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/Endpoint.java
Wed Oct 22 09:21:58 2008
@@ -24,6 +24,9 @@
 
 public interface Endpoint
 {
+  public static final int OK = 1;
+  public static final int FAILED = 2;
+  
 	public int getMetadataRequestTimeout();
 	public void setController( AnalysisEngineController aController);
 	public void startCheckpointTimer();
@@ -151,4 +154,7 @@
   
   public void setSerializer( String aSerializer );
  
+  public void setStatus( int aStatus);
+  
+  public int getStatus();
 }

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/Endpoint_impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/Endpoint_impl.java?rev=707118&r1=707117&r2=707118&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/Endpoint_impl.java
(original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/Endpoint_impl.java
Wed Oct 22 09:21:58 2008
@@ -113,6 +113,11 @@
 	//	echoed back to the client. 
 	private String endpointServer = null;
 	
+	private int status;
+	
+	public Endpoint_impl() {
+	  status = Endpoint.OK;
+	}
 	public int getCommand()
 	{
 		return command;
@@ -494,7 +499,9 @@
 	public void setIsCasMultiplier(boolean trueORfalse)
 	{
 		isCasMultiplier = trueORfalse;
-		getServiceInfo().setCASMultiplier();
+		if ( isCasMultiplier ) {
+	    getServiceInfo().setCASMultiplier();
+		}
 	}
 	public void setShadowCasPoolSize( int aPoolSize )
 	{
@@ -585,5 +592,12 @@
   public int getConcurrentReplyConsumers() {
     return concurrentReplyConsumers;
   }
+  public void setStatus( int aStatus) {
+    status = aStatus;
+  }
   
+  public int getStatus() {
+    return status;
+  }
+
 }
\ No newline at end of file

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java?rev=707118&r1=707117&r2=707118&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java
(original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java
Wed Oct 22 09:21:58 2008
@@ -19,7 +19,6 @@
 
 package org.apache.uima.aae.controller;
 
-import java.io.ByteArrayOutputStream;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -27,17 +26,16 @@
 import org.apache.uima.aae.AsynchAECasManager;
 import org.apache.uima.aae.InProcessCache;
 import org.apache.uima.aae.UIMAEE_Constants;
-import org.apache.uima.aae.UimaSerializer;
 import org.apache.uima.aae.InProcessCache.CacheEntry;
 import org.apache.uima.aae.error.AsynchAEException;
 import org.apache.uima.aae.error.ErrorContext;
 import org.apache.uima.aae.error.ErrorHandler;
+import org.apache.uima.aae.error.ServiceShutdownException;
 import org.apache.uima.aae.jmx.JmxManagement;
 import org.apache.uima.aae.jmx.PrimitiveServiceInfo;
 import org.apache.uima.aae.jmx.ServicePerformance;
 import org.apache.uima.aae.message.AsynchAEMessage;
 import org.apache.uima.aae.message.MessageContext;
-import org.apache.uima.aae.message.UIMAMessage;
 import org.apache.uima.aae.monitor.Monitor;
 import org.apache.uima.aae.spi.transport.UimaMessage;
 import org.apache.uima.analysis_engine.AnalysisEngine;
@@ -46,7 +44,6 @@
 import org.apache.uima.cas.CAS;
 import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.OutOfTypeSystemData;
-import org.apache.uima.cas.impl.XmiSerializationSharedData;
 import org.apache.uima.resource.metadata.ConfigurationParameter;
 import org.apache.uima.resource.metadata.impl.ConfigurationParameter_impl;
 import org.apache.uima.util.Level;
@@ -128,17 +125,25 @@
 			}
 			
 			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, getClass().getName(), "initialize",
UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_primitive_ctrl_init_info__CONFIG", new Object[]
{ analysisEnginePoolSize });
-			//	Instantiate and initialize UIMA analytics
-			for (int i = 0; i < analysisEnginePoolSize; i++)
-			{
-				AnalysisEngine ae =  UIMAFramework.produceAnalysisEngine(resourceSpecifier, paramsMap);
-				aeList.add(ae);
-				
-				//	Cache metadata once
-				if (i == 0)
-				{
-					analysisEngineMetadata = ae.getAnalysisEngineMetaData();
-				}
+
+			try {
+	      //  Instantiate and initialize UIMA analytics
+	      for (int i = 0; i < analysisEnginePoolSize; i++)
+	      {
+	        AnalysisEngine ae =  UIMAFramework.produceAnalysisEngine(resourceSpecifier, paramsMap);
+	        aeList.add(ae);
+	        
+	        //  Cache metadata once
+	        if (i == 0)
+	        {
+	          analysisEngineMetadata = ae.getAnalysisEngineMetaData();
+	        }
+	      }
+			} catch ( Exception ex1 ) {
+		     if ( isStopped()  ) {
+		        System.out.println(">>>>>>>>> Service Has Stopped ....");
+		        throw new AsynchAEException(new ServiceShutdownException());
+		      }
 			}
 			if ( serviceInfo == null )
 			{
@@ -148,40 +153,40 @@
 			serviceInfo.setAnalysisEngineInstanceCount(analysisEnginePoolSize);
 			aeInstancePool.intialize(aeList);
 
-			
-			getMonitor().setThresholds(getErrorHandlerChain().getThresholds());
-			// Initialize Cas Manager
-			if (getCasManagerWrapper() != null)
-			{
-				try
-				{
-					if (getCasManagerWrapper().isInitialized())
-					{
-						getCasManagerWrapper().addMetadata(getAnalysisEngineMetadata());
-						if (isTopLevelComponent())
-						{
-							getCasManagerWrapper().initialize("PrimitiveAEService");
-							CAS cas = getCasManagerWrapper().getNewCas("PrimitiveAEService");
-							cas.release();
-						}
-					}
-
-					// All internal components of this Primitive have been initialized. Open the latch
-					// so that this service can start processing requests.
-					latch.openLatch(getName(), isTopLevelComponent(), true);
-					
-				}
-				catch ( Exception e)
-				{
-					e.printStackTrace();
-					throw new AsynchAEException(e);
-				}
-			}
-			else
-			{
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, getClass().getName(), "initialize",
UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_cas_manager_wrapper_notdefined__CONFIG",
new Object[] {});
-			}
+      if ( !isStopped()  ) {
+        getMonitor().setThresholds(getErrorHandlerChain().getThresholds());
+        // Initialize Cas Manager
+        if (getCasManagerWrapper() != null)
+        {
+          try
+          {
+            if (getCasManagerWrapper().isInitialized())
+            {
+              getCasManagerWrapper().addMetadata(getAnalysisEngineMetadata());
+              if (isTopLevelComponent())
+              {
+                getCasManagerWrapper().initialize("PrimitiveAEService");
+                CAS cas = getCasManagerWrapper().getNewCas("PrimitiveAEService");
+                cas.release();
+              }
+            }
 
+            // All internal components of this Primitive have been initialized. Open the
latch
+            // so that this service can start processing requests.
+            latch.openLatch(getName(), isTopLevelComponent(), true);
+            
+          }
+          catch ( Exception e)
+          {
+            e.printStackTrace();
+            throw new AsynchAEException(e);
+          }
+        }
+        else
+        {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, getClass().getName(), "initialize",
UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_cas_manager_wrapper_notdefined__CONFIG",
new Object[] {});
+        }
+      }
 		}
 		catch ( AsynchAEException e)
 		{
@@ -629,6 +634,7 @@
 	
 	public void stop()
 	{
+	  System.out.println(">>>>> Stopping Controller:"+getComponentName());
 		super.stop();
 		stopInputChannel();
 		if ( aeInstancePool != null )
@@ -648,6 +654,7 @@
 			aeList.clear();
 			aeList = null;
 		}
+    System.out.println(">>>>> Done Stopping Controller:"+getComponentName());
 	}
 	
 }

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/error/handler/ProcessCasErrorHandler.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/error/handler/ProcessCasErrorHandler.java?rev=707118&r1=707117&r2=707118&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/error/handler/ProcessCasErrorHandler.java
(original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/error/handler/ProcessCasErrorHandler.java
Wed Oct 22 09:21:58 2008
@@ -35,6 +35,7 @@
 import org.apache.uima.aae.error.ErrorHandlerBase;
 import org.apache.uima.aae.error.ExpiredMessageException;
 import org.apache.uima.aae.error.InvalidMessageException;
+import org.apache.uima.aae.error.MessageTimeoutException;
 import org.apache.uima.aae.error.ServiceShutdownException;
 import org.apache.uima.aae.error.Threshold;
 import org.apache.uima.aae.error.UimaEEServiceException;
@@ -451,7 +452,10 @@
 			{
 				try
 				{
-					sendExceptionToClient( t, casReferenceId, endpoint, aController );
+				  //  Dont send TimeoutExceptions to client
+				  if ( deliverExceptionToClient(t) ) {
+				    sendExceptionToClient( t, casReferenceId, endpoint, aController );
+				  }
 				}
 				catch( Exception e) 
 				{
@@ -501,7 +505,9 @@
 		{
 			try
 			{
-				sendExceptionToClient( t, casReferenceId, endpoint, aController );
+        if ( deliverExceptionToClient(t) ) {
+          sendExceptionToClient( t, casReferenceId, endpoint, aController );
+        }
 			}
 			catch( Exception e) 
 			{
@@ -542,5 +548,11 @@
 		
 		return true;
 	}
-
+	private boolean deliverExceptionToClient( Throwable t) {
+    //  Dont send TimeOutExceptions to client
+	  if ( t instanceof UimaEEServiceException && t.getCause() != null && t.getCause()
instanceof MessageTimeoutException) {
+      return false;
+    }
+    return true;
+	}
 }

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/handler/input/ProcessRequestHandler_impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/handler/input/ProcessRequestHandler_impl.java?rev=707118&r1=707117&r2=707118&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/handler/input/ProcessRequestHandler_impl.java
(original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/handler/input/ProcessRequestHandler_impl.java
Wed Oct 22 09:21:58 2008
@@ -729,6 +729,14 @@
                 new Object[] { getController().getName(), casReferenceId });
 		getController().releaseNextCas(casReferenceId); 
 	}
+	private void handlePingRequest(MessageContext aMessageContext) {
+	  try {
+	    getController().getOutputChannel().sendReply(AsynchAEMessage.Ping, aMessageContext.getEndpoint());
+	  } catch ( Exception e) {
+	    e.printStackTrace();
+	  }
+	  
+	}
 	
 	private void handleStopRequest(MessageContext aMessageContext)
 	{
@@ -813,10 +821,14 @@
 				{
 					handleReleaseCASRequest(messageContext);
 				}
-				else if ( AsynchAEMessage.None == payload && AsynchAEMessage.Stop == command)
-				{
-					handleStopRequest(messageContext);
-				}
+        else if ( AsynchAEMessage.None == payload && AsynchAEMessage.Stop == command)
+        {
+          handleStopRequest(messageContext);
+        }
+        else if ( AsynchAEMessage.None == payload && AsynchAEMessage.Ping == command)
+        {
+          handlePingRequest(messageContext);
+        }
 				// Handled Request
 				return;
 			}

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/handler/input/ProcessResponseHandler.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/handler/input/ProcessResponseHandler.java?rev=707118&r1=707117&r2=707118&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/handler/input/ProcessResponseHandler.java
(original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/handler/input/ProcessResponseHandler.java
Wed Oct 22 09:21:58 2008
@@ -573,6 +573,15 @@
 		getController().getMonitor().resetCountingStatistic(aDelegate, Monitor.ProcessErrorCount);
 		getController().getMonitor().resetCountingStatistic(aDelegate, Monitor.ProcessErrorRetryCount);
 	}
+	
+	private void handlePingReply( MessageContext aMessageContext ) {
+	  try {
+	    
+	  } catch ( Exception e) {
+	    e.printStackTrace();
+	  }
+	}
+	
 	public  void handle(Object anObjectToHandle) throws AsynchAEException
 	{
 		super.validate(anObjectToHandle);
@@ -642,6 +651,10 @@
 			{
 				handleACK(messageContext);
 			}
+      else if (AsynchAEMessage.None == payload && AsynchAEMessage.Ping == command)
+      {
+        handlePingReply(messageContext);
+      }
 
 			else
 			{

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/message/AsynchAEMessage.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/message/AsynchAEMessage.java?rev=707118&r1=707117&r2=707118&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/message/AsynchAEMessage.java
(original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/message/AsynchAEMessage.java
Wed Oct 22 09:21:58 2008
@@ -69,7 +69,8 @@
 	public static final int Terminate = 2003;
 	public static final int ACK = 2004;
 	public static final int ReleaseCAS = 2005;
-	public static final int Stop = 2006;
+  public static final int Stop = 2006;
+  public static final int Ping = 2007;
 	
 	
 	public static final String MessageType = "MessageType";

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UimaMessageValidator.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UimaMessageValidator.java?rev=707118&r1=707117&r2=707118&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UimaMessageValidator.java
(original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UimaMessageValidator.java
Wed Oct 22 09:21:58 2008
@@ -88,7 +88,7 @@
       int command = aMessage.getIntProperty(AsynchAEMessage.Command);
       if (command != AsynchAEMessage.Process && command != AsynchAEMessage.GetMeta
               && command != AsynchAEMessage.ReleaseCAS && command != AsynchAEMessage.Stop
-              && command != AsynchAEMessage.CollectionProcessComplete) {
+              && command != AsynchAEMessage.Ping && command != AsynchAEMessage.CollectionProcessComplete)
{
         UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "validCommand",
                 UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_invalid_command_in_message__INFO",
                 new Object[] { command, endpointName });
@@ -118,6 +118,7 @@
       int command = aMessage.getIntProperty(AsynchAEMessage.Command);
       if (command == AsynchAEMessage.GetMeta
               || command == AsynchAEMessage.CollectionProcessComplete
+              || command == AsynchAEMessage.Ping
               || command == AsynchAEMessage.Stop || command == AsynchAEMessage.ReleaseCAS)
{
         //  Payload not included in GetMeta Request
         return true;
@@ -218,6 +219,8 @@
           return "ReleaseCAS";
         case AsynchAEMessage.Stop:
           return "Stop";
+        case AsynchAEMessage.Ping:
+          return "Ping";
       }
 
     } else if (AsynchAEMessage.Payload.equals(aTypeToDecode)) {

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/resources/uimaee_messages.properties
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/resources/uimaee_messages.properties?rev=707118&r1=707117&r2=707118&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/resources/uimaee_messages.properties
(original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/resources/uimaee_messages.properties
Wed Oct 22 09:21:58 2008
@@ -167,3 +167,4 @@
 UIMAEE_msg_origin_added__FINEST = Controller: {0} Cached Message Origin For Cas: {1}. Message
Origin: {2}
 UIMAEE_input_cas_invalid__INFO = Controller: {0} Received Invalid Request from Cas Multiplier
{1} Containing Cas Id: {2}. The Parent Cas Id Is Missing. 
 UIMAEE_show_remote_delegate_serialization_INFO = >>> Controller: {0} Configured
To Serialize CASes To Remote Delegate: {1} Using {2} Serialization
+UIMAEE_delegate_in_parallel_step_not_remote_WARNING = >>> Controller: {0} Delegate:
{1} Not Remote But Defined In Parallel Step. Only Remote Delegates Can Be In Parallel Step.



Mime
View raw message