On 2010-11-06 21:51, Žygimantas Medelis wrote: > Hi, > > Nutch initializes plugins multiple times and so > any expensive initialization procedures are being executed more than once. > For example plugin needs to make a connection to the data base. Each > instance of the plugin will have to create that connection, which leads to > plugins spending lots of time making connections (I'm using db connections > only as an example). Ideally a connection pool must be created and shared > between instances of a given plugin. > > Is there any way to share objects (e.g. connection pools) between instances > of the plugin?
Yes - use the ObjectCache utility class. It's basically a singleton instance of a map, where you can keep objects that will be alive as long as the JVM is alive. -- Best regards, Andrzej Bialecki <>< ___. ___ ___ ___ _ _ __________________________________ [__ || __|__/|__||\/| Information Retrieval, Semantic Web ___|||__|| \| || | Embedded Unix, System Integration http://www.sigram.com Contact: info at sigram dot com

