Stanley M. Ho
Stanley.Ho at Sun.COM
Wed Jun 13 11:23:00 PDT 2007
Bryan Atsatt wrote:
> Stanley's idea was that a Repository implementation could return a
> *copy* of a ModuleDefinition created by a different Repository. Such a
> Repository would in fact form an isolation context. And caching Module
> instances becomes trivial: each definition can just have one as a field.
> While there are definite lifecycle issues here between such repository
> instances, they are probably solvable.
> And then we really *do* have an exact analogue of the loader delegation
> model, in which:
> Repository ~= ClassLoader
> ModuleDefinition ~= Class
> Module ~= Object
> Isolation of classes requires different Class instances. So isolation of
> modules requires different ModuleDefinition instances.
Yes, that's the basic idea for isolation. In addition, the ModuleSystem
object is the one actually handling the module instances' instantiation,
initialization, and release, so the repository implementors do not have
to be aware of most of the module runtime's complexities.
More information about the jsr277-eg-observer