The first pass of my client code creates a new UimaAsynchronousEngine object for
each call to the broker.  Creating the object can take significant time, so I
want to reuse them in an update to the my client code.  Processing the CAS on
the server can take quite a while so the timeout is set to 10 minutes.  The
normal processing time is a minute or less but there are cases that take quite a
bit longer so the timeout is set to account for those cases.

I have questions on error processing.  The scenario of this post is:
   1) Start broker and server components
   2) Start client
   3) Process first CAS -- first time, so create new Engine object
   4) Process next CAS -- reuse Engine object 
   5) Process next CAS -- reuse Engine object
   6) End broker
   7) Process next CAS -- fails at 10 minute mark.
   8) Process next CAS 
   9) Start broker and server components -- CAS supplied in step 8 now runs

What I am looking for is a way for the client to detect the broker is down
before waiting for a timeout (step 7).  Reusing the engine objects appears to be
working well and performance is better.  I'm not sure I can live with the error
detection model, however.  I like the fact that the Engine object automatically
re-connects when the broker comes back on-line (step 9), but I would rather
detect that the broker is down in the client and give my user an error then make
them wait for the timeout.  If I could detect the connection problem then I
could discard the current Engine object and re-create a new one when the next
request comes in.

Any ideas?  Thanks!

Dave

Reply via email to