Hi folks,

I'm trying the PEAR class loaders in UIMA 2.2. I think I found an issue
that, if a PEAR description file is specified in the aggregate analysis
engine description, the session object returned from the method
org.apache.uima.analysis_component.JCasAnnotator_ImplBase.getContext().getSession()
from the related annotator will be different from other annotators. In other
words, the annotators cannot share the same session object if the PEAR class
loader is used.

Here is more detail on the situation.

I have two annotators. Both of them sharing the same piece of information
via the Session object (Session session = getContext().getSession();). I
assume that both annotators will have access to the same session object. I
tried it and found the inconsistent behavior between the following cases:

Case 1: The aggregate analysis engine description contains full descriptions
of both annotators  (no import tags).
Case 2: The aggregate analysis engine description contains import tags with
the PEAR description files specified (xxx_pear.xml) for both annotators.

In case 1, for both annotators, the *same* session object are returned from
the method
org.apache.uima.analysis_component.JCasAnnotator_ImplBase.getContext().getSession().
However in case 2, the *different* session objects are returned from the
method.

I'm not sure if it's a bug or expected behavior. Could someone please shed
some light?

Please feel free to let me know if you need more information.

Thanks in advance,
Danai Wiriyayanyongsuk

Reply via email to