[Urspr�ngliche Nachricht]
   Von: "jon *" <[EMAIL PROTECTED]>, Sun, 08 Aug 1999 11:39:47 -0700
   An: "Java-Servlets" <[EMAIL PROTECTED]>
   Betreff: Re: little singleton/JServ question  
____

> > how to overcome this ?! i just want to have one filecache created per
> > VM.
> dependent. This means that each instance of each class that is created has a
> class loader associated with that class (see: Class.getClassLoader()).

something i guessed......, but know too little about :)

> the singleton properties. Note that you are correctly only getting on
> instance per zone.

thats ok. of course this is kind of stupid with a caching algorithm,
which is dependent on the total free space in the VM... :)
the caches are fighting against each other and the GC runs like hell...

> The only way that I can think of getting around this (and it probably won't
> work, but try it anyways) 

as expected: it doesn�t.

> Your only other option would be to write some sort of daemon that ran in a
> JVM all by itself and loaded that singleton into memory and served requests
> for it. You could use something like XML-RPC <http://www.xml-rpc.com/> or
> RMI or EJB to handle this.

prove me wrong, but i think the overhead of communication between the
JVMs would surely eat up all the savings of the cache, whatever method
will be used.

how about starting JServ after instantiating the singletons needed,
like:

public class runme
{
  public static void main(String argv[])
  {
    Object singleton1 = filecache.getInstance();
    Object singleton2 = filecache.getInstance();
    
    and then start
    
    Class.forName("org.apache.java.JServ").main(...)
    
might there be a slight chance for that to work !?    
or, in other words, is there a chance for a servlet to get to the
�root�-classLoader ?!

> I hope that makes sense.

it does. thanx a lot

MfG Uwe Schaefer
______________________________________________
Email: [EMAIL PROTECTED]




------------------------------------------------------------
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:       [EMAIL PROTECTED]

Reply via email to