I haven't been keeping up with all the multi-VM discussions, so these
questions might sound stupid.  Please be gentle. :)

"John Keiser" <[EMAIL PROTECTED]> writes:

> And even when they do, it is literally impossible for current code
> to automagically work in a multi-VM situation

Are you 100% sure of this?  NSA caches values which the JNI spec says
_explicitly_ can be cached.  It's an optimization that everyone does,
and Sun recommends that people do it.

IDs are opaque objects whose values are set and stored through
function calls.  Is it absolutely impossible for the VM to do the work
to figure out if the value stored in the ID is valid?

For instance, say you have something along the lines:

type jfieldID {
  int *VM; // VMs in which this value has been cached
  ...
}

JNI routines that use a jfieldID would do:

if (is_not_cached_for_current_vm(jID))
  update_jfieldID(jID);

For that matter, why can't ID's be shared across VMs?

-- 
Paul Fisher * [EMAIL PROTECTED]

Reply via email to