Hey James, I don't know if its the best way. I would implement a collection Pool as an External Resources and pass these Resource to the different Annotators in your AE.
Regards, Johannes [1] https://uima.apache.org/d/uimafit-current/tools.uimafit.book.html#ugr.tools.uimafit.externalresources ----- Original Message ----- From: "James Baker" <james.d.ba...@gmail.com> To: user@uima.apache.org Sent: Wednesday, September 17, 2014 11:33:58 AM Subject: Share database connections between annotators What is the best way of sharing a database connection (in my case, to MongoDB) between annotators? Currently, I instantiate a new database connection for each annotator, but as my UIMA pipeline now has over 50 annotators (not all of which connect to the database), I am ending up with a large number of database connections. Ideally, I'd like to move to a single connection pool that can be shared by the annotators. The Mongo driver supports connection pooling, but I'm unsure how best to implement in UIMA. Any advice would be appreciated. Thanks, James