Currently our application uses Spring Batch in order process data about 100 
items at a time and runs GATE as part of that processing.  We are looking to 
slot UIMA AS in there instead.  I've looked through the runRemoteAsync example 
class that was provided and have created an AsynchronousClient from that.  The 
thing I don't understand is how I would tie that in with Spring Batch.  We want 
the batch process to fire off 100 CASes to UIMA and then wait for all of them 
to finish before moving onto the next batch.  Currently, the only ways I can 
think of doing this is to either have the StatusCallbackListener decrement a 
counter once the entityProcessComplete() method has been called or to have the 
class that fires off the CASes for processing maintain an array list of all 
StatusCallbackListeners created and just poll them constantly, removing the 
ones that have finished.  In the first situation, the batch process would just 
block until the counter hits
 0, while the second situation would block until the array list is empty.  Is 
there are more elegant way to integrate an asychronous UIMA client using 
callback listeners with Spring batch?  Thanks.

Reply via email to