Hi All,

I am using SolrJ (3.1) and Tomcat 6.x. I want to open solr server once (20
concurrence) and reuse this across all the site. Or something like
connection pool like we are using for DB (ie Apache DBCP). There is a way to
use static method which is a way but I want better solution from you people.



I read one threade where Ahmet suggest to use something like that

String serverPath = "http://localhost:8983/solr";;
HttpClient client = new HttpClient(new
MultiThreadedHttpConnectionManager());
URL url = new URL(serverPath);
CommonsHttpSolrServer solrServer = new CommonsHttpSolrServer(url, client);

But how to use instance of this across all class.

Please suggest.

regards
Jonty

Reply via email to