Thanks Shawn. To have singleton design pattern for SolrServer object creation, I found that there are so many ways described in http://en.wikipedia.org/wiki/Singleton_pattern So which is the best one, out of 5 examples mentioned in above url, for web application in general practice.
I am sure lots of people (in this mailing list) will have practical experience as which type of singleton pattern need to be implement for creation of SolrServer object. Waiting for some comments in this front ? Regards Sandeep On Wed, Jun 26, 2013 at 9:20 PM, Shawn Heisey <s...@elyograg.org> wrote: > On 6/25/2013 11:52 PM, Sandeep Gupta wrote: > > Also in application development side, > > as I said that I am going to use HTTPSolrServer API and I found that we > > shouldn't create this object multiple times > > (as per the wiki document > http://wiki.apache.org/solr/Solrj#HttpSolrServer) > > So I am planning to have my Server class as singleton. > > Please advice little bit in this front also. > > This is always the way that SolrServer objects are intended to be used, > including CommonsHttpSolrServer in version 1.4. The only major > difference between the two objects is that the new one uses > HttpComponents 4.x and the old one uses HttpClient 3.x. There are other > differences, but they are just the result of incremental improvements > from version to version. > > Thanks, > Shawn > >