Unless you did an SVN update, I don't understand how it worked
and then didn't. I also don't understand how Apache Camel is
being used.

I used the 2.2.2 release code for my test, but the invalid API call
is also in the current trunk.

In camel the string body of the in message is copied to the CAS object,
it is expect that the string body is a URI which can be used to retrieve
an actual CAS from hbase in a CAS Multiplier.

The UIMA AS client API handles all JMS interactions transparently.
A minimal application calling a UIMA AS service would look
something like this:
-------------------------------
   uimaEEEngine = new BaseUIMAAsynchronousEngine_impl();
   Map<String,Object> appCtx = new HashMap<String,Object>();
   // Add Broker URI
   appCtx.put(UimaAsynchronousEngine.ServerUri, brokerUrl);
   // Add Queue Name
   appCtx.put(UimaAsynchronousEngine.Endpoint, endpoint);
   // Add the Cas Pool Size
   appCtx.put(UimaAsynchronousEngine.CasPoolSize, casPoolSize);
   //initialize
   uimaEEEngine.initialize(appCtx);

My code looks like this and prints out the exception in the initialize method.

It only fails if it runs as camel component, for some strange reason.

   // Loop
   {
      // get an empty CAS
      CAS cas = uimaEEEngine.getCAS();

      // initialize CAS ...

      // call service asynchronously
      uimaEEEngine.sendCAS(cas);
    }

-------------------------------------------------------

The loop will block waiting for an empty CAS, so the cas pool
size should be at least as big as the number of service instances.

Does UIMA AS waits with sending back the input CAS with the URI until the new
CAS which is created in the CAS Multiplier is processed successful ?


Can you give more details of the client code?
Here is my client code:

       uimaAsEngine =
           new BaseUIMAAsynchronousEngine_impl();
uimaAsEngine.addStatusCallbackListener(new UimaStatusCallbackListener());

       Map<String,Object> appCtx = new HashMap<String,Object>();
       appCtx.put(UimaAsynchronousEngine.ServerUri, "tcp://karkand:61616");
       appCtx.put(UimaAsynchronousEngine.Endpoint, "TextAnalysisQueue");
       appCtx.put(UimaAsynchronousEngine.CasPoolSize, 1);

       uimaAsEngine.initialize(appCtx);

Can you use
the test application driver, runRemoteAsyncAE to test the service?
yes

Jörn

Reply via email to