jmod request
Mark Reinhold
mr at sun.com
Wed Apr 28 13:21:44 PDT 2010
> Date: Tue, 27 Apr 2010 12:12:13 +0100
> From: alan.bateman at oracle.com
> Jonathan Gibbons wrote:
>> It seems that if a module has been installed, it cannot be replaced by
>> installing it again.
>>
>> Is there any chance of getting "remove" or "uninstall" options for jmod, or
>> even the ability to reinstall a module. Now that we can build all the
>> modules for JDK, it would be very helpful to be able to install new modules
>> without rebuilding JDK.
>>
>> As a short term work around, it appears to work to delete the appropriate
>> directory with an "rm" command. Is this likely OK, or likely to cause
>> horrors in the minds of the folk that understand module libraries?
>
> Mark - is uninstall feasible? I assume there is potential for consistency
> issues if there is library delegation and a module is removed from a parent
> library.
Yes. I don't know how to prevent such inconsistencies without making
a library aware of all of its children, which seems undesirable (anyone
remember Codemgr_wsdata/children?).
If we can't prevent inconsistencies then we can at least detect and offer
to repair them. One possibility would be for a library to store the
last-modified time of its parent. If, at startup, the parent has been
modified then validate the library, and if any required modules are
missing but available from a repository, then offer to install them.
This check must be done recursively, but library delegation chains are
expected to be short.
> Also, I wonder about the consequences of uninstalling a module when
> the library is in use by a running application.
The easy solution is simply to disallow that, by arranging for running
applications to hold read locks on the modules that they use. That's not
very friendly, though, so we'll have to explore other solutions such as,
e.g., marking in-use modules for future deletion.
- Mark
More information about the jigsaw-dev
mailing list