Re: [mdr-users] custom implementation recycling?

SainTiss <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.mdr.user
Message-ID <[email protected]>
Apparently, it's got more to do with garbage collection being handled differently on different systems, instead of different JDK's as I erroneously thought...

Point is, I was trying to add an attribute to the custom implementation, which is not present in the MOF model... So obviously I would need the same custom implementation be associated with the same JMI object all the time, otherwise the value of my additional attribute wouldn't be preserved...

Unfortunately, it seems that these custom implementation wrappers can be garbage collected when there is no reference to them or their wrapped JMI object in scope. If I keep a reference to the custom implementation wrapper, then it seems like the JMI object is assigned the same wrapper if it's fetched from MDR later on... But I'm not sure if I can count on that... Also, keeping references to these wrappers isn't the most pretty solution...

Is there a solution/workaround here?

Thanks,

Hans

On Tue, 14 Jun 2005 13:17:46 +0200
SainTiss <[email protected]> wrote:

> Hi,
> 
> Does MDR somehow guarantee that a custom implementation, associated with an entity stored in MDR, is always the same object?
> 
> For example, suppose I've got a metaclass A, and a custom implementation class ACust. Suppose I create an instance of A through AProxy, then the resulting object is an ACust. If, a bit later, I query MDR for this instance, can I be sure I'm dealing with the exact same ACust object? Or is it possible that MDR creates a new ACust wrapper every time I execute a query?
> 
> I'm asking this because, AFAICS, this seems to differ depending on system configuration (e.g. JDK used)...
> 
> Thanks,
> 
> Hans
> 
> -- 
> Hans Schippers
> Research Assistant of the Research Foundation - Flanders (FWO - Vlaanderen)
> http://www.win.ua.ac.be/~hschipp/
> Formal Techniques in Software Engineering (FoTS)
> University of Antwerp
> Middelheimlaan 1
> 2020 Antwerpen - Belgium
> Phone: +32 3 265 38 71
> Fax: +32 3 265 37 77
> 


-- 
Hans Schippers
Research Assistant of the Research Foundation - Flanders (FWO - Vlaanderen)
http://www.win.ua.ac.be/~hschipp/
Formal Techniques in Software Engineering (FoTS)
University of Antwerp
Middelheimlaan 1
2020 Antwerpen - Belgium
Phone: +32 3 265 38 71
Fax: +32 3 265 37 77
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.