Hi Charles,

Glad to hear of your progress. The problem you are describing was
anticipated not long before the first release, and although we added
a mechanism to retrieve the CAS, it was not adequately documented.

The sendCAS method returns a string which is a unique CAS reference ID.
This reference ID is then available from the status object returned to
entityProcessComplete(). The user must save an association from CAS
reference IDs to each CAS given to sendCAS.

Here is code that Jerry Cwiklik gave me to extract the reference ID
from the status object:

public synchronized void entityProcessComplete(CAS aCAS,
EntityProcessStatus aProcessStatus)
  {
      String casReferenceId="";
      if ( aProcessStatus instanceof UimaASProcessStatus )
      {
         casReferenceId =
           ((UimaASProcessStatus)aProcessStatus).getCasReferenceId();
      }

The object returned should always be an instance of UimaASProcessStatus,
so the check should not be necessary, but the casting is.

***Note***
While researching this reply, we've found a framework bug (Jira 1216):
on an error condition, the UimaAsynchronousEngine does not release
the CAS given to sendCAS. As a workaround, on errors the listener
should do CAS.release(). Unfortunately, when using the next version
with this bug fixed, the handler code must not do the release.

Regards,
Eddie

On Sun, Oct 26, 2008 at 9:34 PM, Charles Proefrock <[EMAIL PROTECTED]> wrote:
>
> We've made progress on our transition and now have an app and a configuration 
> that we believe should meet our needs.  We have an application derived from 
> the RunRemoteAsyncAE with the CR and 1 deployed Aggregate.  The deployed 
> aggregate uses a mixture of numInstances and remoteAsyncEngines to achieve 
> the objectives outlined in my original message.  Not too much different than 
> originally described, but a better understanding of the AS approach to 
> scale-up, surpassing what we had achieved with the processingUnitThreadCount 
> in the CPE application.
>
> We are experiencing one problem at this point which I didn't expect.  Null 
> CAS returned on error conditions.
>
> In our CPE implementation we manage a database queue by accessing the queue 
> with a Collection Reader and then completing the queue update via the 
> StatusCallbackListener::entityProcessComplete() call.  Independent of whether 
> the call ends with success or error, the CAS reference is valid, so we can 
> access specific information about the CAS and properly update the database 
> status.
>
> Our first attempt at error detection in our AS implementation results in a 
> null CAS passed into the entityProcessComplete() call.  This occurs on a 
> remote delegate timeout exception.  I did not test other error scenarios to 
> determine if the CAS is valid.
>
> Please let me know how to configure the system to return a valid CAS 
> reference on error to the StatusCallbackListener.
>
> Thanks,
>
> Charles
>
>

Reply via email to