uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaroslaw Cwiklik <uim...@gmail.com>
Subject Re: javax.jms.JMSException: acknowledgeMode SESSION_TRANSACTED cannot be used for an non-transacted Session
Date Thu, 26 Mar 2009 13:35:12 GMT
Jörn, the top level Uima AS service "holds" the input CAS until all child
CASes are processed.
Only then, the service returns back to the client.

Th Exception you are getting suggests that the Camel attempts to send
in a transactional context. As you pointed out, we create a
non-transactional session.
Perhaps you should try to find a way to prevent Camel from insisting on
using transactions
when sending/receiving messages.


> 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

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();


        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);


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


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message