Re: cores sharing an instance

2013-07-01 Thread Roman Chyla
as for the second option: If you look inside SolrResourceLoader, you will notice that before a CoreContainer is created, a new class loader is also created line:111 this.classLoader = createClassLoader(null, parent); however, this parent object is always null, because it is called from: public

Re: cores sharing an instance

2013-06-30 Thread Peyman Faratin
That is what I had assumed but it appears not to be the case. A class (and its properties) of one core is not visible to another class in another core - in the same JVM. Peyman On Jun 29, 2013, at 1:23 PM, Erick Erickson wrote: > Well, the code is all in the same JVM, so there's no > reason

Re: cores sharing an instance

2013-06-30 Thread Peyman Faratin
I see. If I wanted to try the second option ("find a place inside solr before the core is created") then where would that place be in the flow of app waking up? Currently what I am doing is each core loads its app caches via a requesthandler (in solrconfig.xml) that initializes the java class th

Re: cores sharing an instance

2013-06-29 Thread Erick Erickson
Well, the code is all in the same JVM, so there's no reason a singleton approach wouldn't work that I can think of. All the multithreaded caveats apply. Best Erick On Fri, Jun 28, 2013 at 3:44 PM, Peyman Faratin wrote: > Hi > > I have a multicore setup (in 4.3.0). Is it possible for one core to

Re: cores sharing an instance

2013-06-29 Thread Roman Chyla
Cores can be reloaded, they are inside solrcore loader /I forgot the exact name/, and they will have different classloaders /that's servlet thing/, so if you want singletons you must load them outside of the core, using a parent classloader - in case of jetty, this means writing your own jetty init

Re: cores sharing an instance

2013-06-29 Thread Peyman Faratin
its the singleton pattern, where in my case i want an object (which is RAM expensive) to be a centralized coordinator of application logic. thank you On Jun 29, 2013, at 1:16 AM, Shalin Shekhar Mangar wrote: > There is very little shared between multiple cores (instanceDir paths, > logging c

Re: cores sharing an instance

2013-06-28 Thread Shalin Shekhar Mangar
There is very little shared between multiple cores (instanceDir paths, logging config maybe?). Why are you trying to do this? On Sat, Jun 29, 2013 at 1:14 AM, Peyman Faratin wrote: > Hi > > I have a multicore setup (in 4.3.0). Is it possible for one core to share an > instance of its class with

cores sharing an instance

2013-06-28 Thread Peyman Faratin
Hi I have a multicore setup (in 4.3.0). Is it possible for one core to share an instance of its class with other cores at run time? i.e. At run time core 1 makes an instance of object O_i core 1 --> object O_i core 2 --- core n then can core K access O_i? I know they can share properties but