I agree that building this into JVM would be probably the best thing.

In the meantime, however, I'll take another chance here: Cojen project
has some sort of solution "transient classes", looks like it creates
classloader for each new 100 "injections" -
http://cojen.sourceforge.net/xref/org/cojen/util/ClassInjector.html

Also one more thought - could we create a pool of classes that have
single method something like invoke(Class[], Object[]), then track the
references ourselves and instead of creating new class modify the
contents of the method in existing but unused class?

  Yardena.

On Jan 19, 5:05 am, Charles Oliver Nutter <[EMAIL PROTECTED]>
wrote:
> Kresten Krab Thorup wrote:
> > So what I suggest is to have a new special kind of class loader
> > (TransientClassLoader maybe) which doesn't have the strong link to
> > classes loaded by it.  If this was a new class, then no existing code
> > would be broken by it; and so the new semantics for when a class is
> > eligible for class unloading would only apply to classes loaded by
> > transient class loader (ad subclasses thereof).
>
> This is *exactly* what I want. Unfortunately the only way to get it
> right now is to hack the JDK or create your own version that calls out
> to JNI to define the underlying class. But such an addition would be a
> trivial piece of code to add to JDK.
>
> - Charlie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to jvm-languages@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to