[MOBY-l] JMoby, using the testing registry

Thomas Van Parys thpar at psb.ugent.be
Thu Jun 12 13:23:18 UTC 2008


Hi all,

I'm not completely sure where to post JMoby bug reports.

When making a java client for a service that's registered only at the 
testing central, I noticed that every now and then, the client still 
tries to connect to the default moby central.

This is eg. the case when getting back a MobyDataComposite from a 
service. The type of the composite is looked up in the default central, 
rather than the testing central. This could also pose problems when 
trying to use a locally installed moby central.


Unless I'm misusing the existing code of course, I believe the bug lies in

org.biomoby.shared.data.MobyDataComposite.java (line 40)
public MobyDataComposite(org.w3c.dom.Element element, Registry registry) 
throws MobyException{
this(element.getLocalName(), getName(element), 
MobyPrefixResolver.getAttr(element, "namespace"), getId(element));

//....
}

This will just ignore the supplied registry as it is set to null here:
public MobyDataComposite(String typeName, String name, String namespace, 
String id){
        this(typeName, name, namespace, id, (Registry) null);
}
(this then chooses the default registry).

Bug is solved by changing it to
public MobyDataComposite(org.w3c.dom.Element element, Registry registry) 
throws MobyException{
this(element.getLocalName(), getName(element), 
MobyPrefixResolver.getAttr(element, "namespace"), getId(element), registry);

//....
}


Also, when wanting to use a non-default registry, I have to supply it 
with every new moby object. Is there a workaround for this?
eg.
job.put("locus_id", new MobyDataString(locusId, registry));



regards,
Thomas


-- 
==================================================================
Thomas Van Parys
Tel:+32 (0)9 331 36 95                        fax:+32 (0)9 3313809
VIB Department of Plant Systems Biology, Ghent University
Technologiepark 927, 9052 Gent, BELGIUM
thomas.vanparys at psb.ugent.be    http://bioinformatics.psb.ugent.be
==================================================================



More information about the moby-l mailing list