Re: best practice to introducing singletons inside of Solr (IoC)

2012-01-03 Thread Chris Hostetter
: Ok. Let me try with plain java one. Possibly I'll need more tight : integration like injecting a core into the singleton, etc. But I don't know : yet. yeah ... it really depends on what you mean by "singleton" ... ...single instance in entire JVM? ...single instance in each web

Re: best practice to introducing singletons inside of Solr (IoC)

2011-12-28 Thread Mikhail Khludnev
Erick, Ok. Let me try with plain java one. Possibly I'll need more tight integration like injecting a core into the singleton, etc. But I don't know yet. Thanks for your efforts. On Wed, Dec 28, 2011 at 5:48 PM, Erick Erickson wrote: > I must be missing something here. Why would this be any dif

Re: best practice to introducing singletons inside of Solr (IoC)

2011-12-28 Thread Erick Erickson
I must be missing something here. Why would this be any different from any other singleton? I just did a little experiment where I implemented the classic singleton pattern in a RequestHandler and accessed from a Filter (both plugins) with no problem at all, just the usual blah var = MySingleton.ge

Re: best practice to introducing singletons inside of Solr (IoC)

2011-12-27 Thread Mikhail Khludnev
Colleagues, Don't hesitate to emit your opinion. Please! Regards On Wed, Dec 21, 2011 at 11:06 PM, Mikhail Khludnev < mkhlud...@griddynamics.com> wrote: > Hello, > > I need to introduce several singletons inside of Solr and make them > available for my own SearchHandlers, Components, and even Q

best practice to introducing singletons inside of Solr (IoC)

2011-12-21 Thread Mikhail Khludnev
Hello, I need to introduce several singletons inside of Solr and make them available for my own SearchHandlers, Components, and even QParsers, etc. Right now I use some kind of fake SolrRequestHandler which loads on init() and available everywhere through solrCore.getRequestHandler("wellknownName