uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Burn Lewis <burnle...@gmail.com>
Subject Re: Sessions
Date Sat, 05 Jan 2013 04:25:51 GMT
With a cast I think you can get the root context and use its session object.

Session rootSession =
((UimaContextAdmin)aContext).getRootContext().getSession();

Note that the the Javadocs say developers should not use this interface!
It may be preferable to use the external resource support to share a map
amongst annotators.




On Fri, Jan 4, 2013 at 11:22 AM, Eddie Epstein <eaepstein@gmail.com> wrote:

> I am not 100% sure here, but think that an analytic's UimaContext is
> fixed after the component has been instantiated. For dynamic control
> of processing, the flow controller could use something outside of the
> UIMA framework, or the analytic read a control key put in the CAS
> itself.
>
> Eddie
>
> On Thu, Jan 3, 2013 at 12:20 PM, Kline, Larry D
> <Larry.Kline@usoncology.com> wrote:
> > I have a remotely deployed uima application (running in jboss and using
> > a pear file) that has a web service front end.  One of the web service
> > methods sets a value into the uima session.
> >
> >
> >
> > recognitionAE.getUimaContext().getSession().put("g2_stemmer",
> > stemmerAlgorithmKey);
> >
> >
> >
> > Then I would like to get that value in a user defined flow controller.
> > But in the flow controller I execute this:
> >
> >
> >
> >                                 fcContext = getContext();
> > // this is a FlowController method
> >
> >                                 String stemmer =
> > (String)fcContext.getSession().get(STEMMER_KEY_NAME);
> >
> >
> >
> > And I get a different session object.  Is there some way to get the root
> > session object?
> >
> >
> >
> > Thanks,
> >
> > Larry
> >
> > </pre>The contents of this electronic mail message and any attachments
> are confidential, possibly privileged and intended for the addressee(s)
> only.<br>Only the addressee(s) may read, disseminate, retain or otherwise
> use this message. If received in error, please immediately inform the
> sender and then delete this message without disclosing its contents to
> anyone.</pre>
>

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