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
initialization or config to force shared class loaders. or find a place
inside the solr, before the core is created. Google for montysolr to see
the example of the first approach.

But, unless you really have no other choice, using singletons is IMHO a bad
idea in this case

Roman

On 29 Jun 2013 10:18, "Peyman Faratin" <pey...@robustlinks.com> wrote:
>
> 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 <shalinman...@gmail.com>
wrote:
>
> > 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 <pey...@robustlinks.com>
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 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 is it
possible to share objects?
> >>
> >> thank you
> >>
> >
> >
> >
> > --
> > Regards,
> > Shalin Shekhar Mangar.
>

Reply via email to