This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 26816 - Problem with refImediatePackage in Multiple instance of NBMDR
Summary: Problem with refImediatePackage in Multiple instance of NBMDR
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-27 17:03 UTC by Kozusznik Jan
Modified: 2002-09-27 12:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
It fix probrem with equals of BaseObjectHandler's (724 bytes, patch)
2002-08-28 18:54 UTC, Kozusznik Jan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kozusznik Jan 2002-08-27 17:03:18 UTC
I have encountered following error in NBMDR:

I have model, whose extent is ParentPackage, for
instance.  From that extent I obtain a subpackage
- ChildPackage (method
ParentPackage.getChildPackage(). If I later invoke
ChildPackage.refImmediatePackage(), then it is
quite obvious, that again I get the same
ParentPackage instance.

BUT This ain't true if

In meantime I create a new instance of repository,
load a definition of some meta-model in it and
create extent for that meta-model.

Although I get an instance of ParentPackage after
invoking ChildPackage.refImmediatePackage(), it is
not the original one (equals doesn't return true).

Note:
I perform everything in DIFFERENT instance of
repository and use only ONE instance of JVM.
Comment 1 Kozusznik Jan 2002-08-28 18:54:21 UTC
Created attachment 7241 [details]
It fix probrem with equals of BaseObjectHandler's
Comment 2 Kozusznik Jan 2002-08-28 18:56:30 UTC
It is caused by defect imlementation of method equals in 
BaseObjectHandler. I found this problem when I was been 
registered as listener on extent and I received no Event 
due this bug.
Comment 3 Martin Matula 2002-08-29 10:09:12 UTC
Hi,
thanks for investigating this, however I cannot integrate your patch.
The thing that you've fixed was intentionally there. It improves
performance. Could you please shed some more light into why there are
two instances of BaseObjectHandler for the same MOFID? It should never
happen. Do you have the most recent version of MDR? I remember that a
fix that Dan Prusa made a while ago to the repository (fixing the
problems that arised after rollback) caused this bug, thus I rolled it
back and we found a different fix. So maybe the solution for you could
be to update the MDR with the latest sources. Or is it already the case?
Comment 4 Martin Matula 2002-09-27 12:29:23 UTC
The bug should be fixed in the most current builds (by a 
fix made by Dan Prusa to btree storage).