[MOBY-dev] RegistryCache

Paul Gordon gordonp at ucalgary.ca
Wed Oct 31 13:50:55 UTC 2007


Hi Ola,

The registry is associated with datatypes, namespaces, etc., not individual objects, so I don't think the call lineage you give below causes any problem (since the instantiated data type is based through).  Feel free to send me a sample program if you run into a case where this association is a problem (i.e. normally to get a registry you'd say object.getDataType().getRegistry(), which actually allows you to do crazy stuff like have data instances from multiple registries concurrently).  

With regards to your second question, CentralDigestCachedImpl is completely independent of RegistryCache, but we're working to reconcile these.  If you use RegistryCache, you only need a CentralImpl for things like findService(), not for datatype, namespace, etc. definitions.  You can pick any CentralImpl that suits you, as the service lookup functionality is independent from the definitions (which come from RDF in RegistryCache).
__________
I think I have found a bug in jMoby, but  
please correct me if I'm wrong.

The following call with reg being my custom Regsitry:

		MobyDataComposite comp = new MobyDataComposite("DNASequence", reg);

calls

     public MobyDataComposite(String typeName, Registry r){
	this(MobyDataType.getDataType(typeName, r));
     }

calls

     public MobyDataComposite(MobyDataType type){
	this(type, "");
     }

calls

     public MobyDataComposite(MobyDataType type, String name){
	this(type, name, "", "");
     }

calls

     public MobyDataComposite(MobyDataType type, String name, String  
namespace, String id){
	super(namespace, id);
	setName(name);
	setDataType(type);
	members = new ConcurrentHashMap<String, MobyDataObject>();
     }

where super calls

     public MobyDataObject(String namespace, String id){
	this(namespace, id, null);
     }

calls
     public MobyDataObject(String namespace, String id, Registry  
registry){
	super("");

thus having registry=null. This means I will always use the default  
registry and not my custom registry that I inputted. This prevents me  
from using my cached registry which you explained below.




More information about the MOBY-dev mailing list