Project

General

Profile

« Previous | Next » 

Revision 8759

use new method to override the CN URL when constructing a CNode instance. see https://redmine.dataone.org/issues/5142

View differences:

src/edu/ucsb/nceas/metacat/admin/D1Admin.java
34 34
import org.dataone.client.CNode;
35 35
import org.dataone.client.D1Client;
36 36
import org.dataone.client.auth.CertificateManager;
37
import org.dataone.configuration.Settings;
37 38
import org.dataone.service.exceptions.BaseException;
38 39
import org.dataone.service.types.v1.Node;
39 40
import org.dataone.service.types.v1.NodeList;
......
293 294
				} else {
294 295
					
295 296
					PropertyService.setProperty("D1Client.CN_URL", cnURL);
297
					Settings.getConfiguration().setProperty("D1Client.CN_URL", cnURL);
296 298
					PropertyService.setPropertyNoPersist("dataone.nodeName", nodeName);
297 299
					PropertyService.setPropertyNoPersist("dataone.nodeDescription", nodeDescription);					
298 300
					PropertyService.setPropertyNoPersist("dataone.nodeSynchronize", Boolean.toString(synchronize));
......
432 434
        logMetacat.debug("Setting client certificate location.");
433 435
        String mnCertificatePath = PropertyService.getProperty("D1Client.certificate.file");
434 436
        CertificateManager.getInstance().setCertificateLocation(mnCertificatePath);
435
        CNode cn = D1Client.getCN();
437
        CNode cn = D1Client.getCN(PropertyService.getProperty("D1Client.CN_URL"));
436 438
        
437 439
        // check if this is new or an update
438 440
        boolean update = isNodeRegistered(node.getIdentifier().getValue());

Also available in: Unified diff