Re: Internal storage of nodes

Martin Matula <[email protected]> Wed, 13 Oct 2004 12:04:19 +0200
Newsgroups gmane.comp.java.netbeans.modules.mdr.devel
Message-ID <[email protected]>
Hi Brian,
please remove org-netbeans-modules-mdr.jar, openide-fs.jar and 
openide-loaders.jar. Then it should work.
Also instead of openide.jar you can use just openide-util.jar which is 
smaller. But openide.jar is fine too.
Martin

Brian Topping wrote:

>Hi Martin,  thanks for the input. 
>
>I had a nosebleed idea to start using the 4.0 source instead of the 3.x, but
>I'm having problems getting the minimum set of libraries together for
>standalone mode.  The FAQ looks like the set required for 3.x, and I've been
>playing around for hours trying to scrape the 4.0 build for stuff that might
>work.  It looks like it is mostly loading, but the root FS looks empty and
>there's nothing named 'MDRepositories' registered there.
>
>My current list of jars are as follows:
>
>jmi.jar
>jmiutils.jar
>mdr.jar
>mof.jar
>notnow
>openide-fs.jar
>openide-loaders.jar
>openide.jar
>org-netbeans-api-mdr.jar
>org-netbeans-modules-mdr.jar
>
>The first line of code that I am executing is throwing an NPE in
>getDefaultRepository():
>
>  MDRepository repository = MDRManager.getDefault().getDefaultRepository();
>
>Any ideas on what I am missing?
>
>thanks!
>
>-b
>
>  
>
>>-----Original Message-----
>>From: Martin Matula [mailto:[email protected]]
>>Sent: Tuesday, October 12, 2004 4:56 PM
>>To: [email protected]
>>Subject: Re: [mdr-dev] Internal storage of nodes
>>
>>
>>Brian,
>>if you are using repository in a usual way (with 
>>memory/b-tree storage), 
>>DeferredObjects should never be used, externalObjects should 
>>always be 
>>null, so getExternal should take no time. All the objects in 
>>the storage 
>>are subclasses of StorableBaseObject. MdrStorage.getObject() reads 
>>object from the storage based on its MOFID.
>>refAllOfType call delegates to StorableClass.allObjects(true), which 
>>creates a lazy collection over a storage index (we store a separate 
>>index in the storage that maps a class to all of its instances).
>>Hopefuly this helps. I am still not sure if I understand what exactly 
>>you need.
>>Martin
>>
>>Brian Topping wrote:
>>
>>    
>>
>>>Hi Martin,
>>>
>>>I'd like to use this in a tool that I have already built 
>>>      
>>>
>>that uses the
>>    
>>
>>>MDRepository interface.  The storage would would be 
>>>      
>>>
>>transient memory storage
>>    
>>
>>>only.  
>>>
>>>In the end, my primary goal is not really a focus on the 
>>>      
>>>
>>storage, but an
>>    
>>
>>>effort to get to the source of where nodes come from in an 
>>>      
>>>
>>extant model, such
>>    
>>
>>>as when a collection is returned from a refAllOfType call.  
>>>      
>>>
>>It seems like
>>    
>>
>>>these collections always go through getExternal, but I 
>>>      
>>>
>>realize I might be
>>    
>>
>>>looking in the very wrong place for things ;-)
>>>
>>>Thanks!
>>>
>>>Brian
>>>
>>> 
>>>
>>>      
>>>
>>>>-----Original Message-----
>>>>From: Martin Matula [mailto:[email protected]]
>>>>Sent: Tuesday, October 12, 2004 3:55 PM
>>>>To: [email protected]
>>>>Subject: Re: [mdr-dev] Internal storage of nodes
>>>>
>>>>
>>>>Hi Brian,
>>>>in what context do you want to measure this? Are you using MDR as a 
>>>>standalone tool or do you refer to its usage in JavaCore module?
>>>>Martin
>>>>
>>>>Brian Topping wrote:
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>Hi list,
>>>>>
>>>>>I'm experimenting with some code in NBR and was wondering if 
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>I could confirm
>>>>   
>>>>
>>>>        
>>>>
>>>>>some of my findings or get some alternate suggestions.  
>>>>>
>>>>>I'm trying to find bottleneck points in the code for objects 
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>in a repository.
>>>>   
>>>>
>>>>        
>>>>
>>>>>I'd like to add some experimental code to audit them as they 
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>go in or out of
>>>>   
>>>>
>>>>        
>>>>
>>>>>storage.  It seems like persistent storage of objects is all 
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>done by mofID
>>>>   
>>>>
>>>>        
>>>>
>>>>>via DeferredObjects, is that so?  Then it seems that
>>>>>registerExternal/removeExternal/getExternal in MdrStorage 
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>are going to be
>>>>   
>>>>
>>>>        
>>>>
>>>>>bottlenecks, that I should be able to audit everything that 
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>is created or
>>>>   
>>>>
>>>>        
>>>>
>>>>>read from there.
>>>>>
>>>>>If this isn't the case, is there some minimal set of points 
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>that I can
>>>>   
>>>>
>>>>        
>>>>
>>>>>intercept where objects in the repository are sent after 
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>they are created?
>>>>   
>>>>
>>>>        
>>>>
>>>>>Thanks!
>>>>>
>>>>>Brian
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>   
>>>>
>>>>        
>>>>
>>> 
>>>
>>>      
>>>
>>    
>>
>
>  
>