Hi Thomas,
it is possible to share resources between analysis engines. You will
find an example in the UIMA documentation for FileResources that are
shared.
(http://incubator.apache.org/uima/downloads/releaseDocs/2.2.0-incubating/docs/html/tutorials_and_users_guides/tutorials_and_users_guides.html#ugr.tug.aae.accessing_external_resource_files)
In your case I think you can also look at the UIMA tutorial example 6.
There an individual external resource called StringMapResource is
created. I think you can do something similar.
Create a config file with all you database connection information and
load it using your own resource e.g. DBResource. Within the DBResource
implementation you can open the connection and return it on request.
I haven't tried that myself, but I think it should work :-)
-- Michael
Thomas Francart wrote:
Hi all
I want to share a remote connection to an EJB (it could be to a database)
across analysis engines.
1. If I assume that all my AE are local, is this possible ? how ?
2. In the UIMA philosophy, should each AE open its own connection ?
3. If I need to open a connection for each AE, how can I share the
connection properties for this connection in a single file ? in other words,
how can I access a single properties file (or maybe a resource XML
description) from every AE ?
4. I understood there was a notion of "session" that was intended to share
data across multiple instances of the same AE. Isn't there a notion of
session to share data across the different AE in the flow ? (I don't want to
put connection parameters inside the CAS, it has nothing to do with the
document analysis)
Thanks for your help
Thomas