Re: What is transient metadata ?
Holger Krug <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jun 28, 2002 at 02:02:29PM +0000, Tomas Zezula wrote: > >> On Thu, Jun 27, 2002 at 11:24:51AM +0000, Tomas Zezula wrote: > >> > >>> So, Java module requires that these objects will be freed > >>> automatically when they are not more referenced. > > On the other side, the framework is quite dangerous and can cause lots > of unwanted "surprises". > E.g. iterator's operation hasNext can return true and following next > can throw > NoSuchObjectException even if both operation are called in the > synchronized block. I understand you both the following way: The data in question is available nevertheless (in the form of Java source resp. class files), what MDR does is to add an abstraction layer which allows uniform access to Java metadata. To save harddisk space you decided to allow the java module to add transient data to the repository. The repository will remove it, when it's not accessed anymore. Did you consider an alternative solution where the Java module does not create the actual meta-data and add it to the repository, but where the java module points the repository to the source/class files and gives the functional rule how to compute meta-data from these files. The repository then computes the meta-data, when required by its clients and frees it using some kind of caching strategy. I do not know if such an approach would be possible in your case and it's far above what JMI provides, but, if viable, it seems to be the most appropriate way. The advantage would be that all data would be available at any time. The disadvantage would be that the implementation of the repository part (rule evaluation, caching strategy) would be far more complex than transient meta-data. -- Holger Krug [email protected]