Project

General

Profile

« Previous | Next » 

Revision 6637

set the newly assigned MN id after we call CN.register().

View differences:

src/edu/ucsb/nceas/metacat/admin/D1Admin.java
303 303
	            boolean result = cn.updateNodeCapabilities(session, node.getIdentifier(), node);
304 304
            } else {
305 305
	            logMetacat.debug("Registering node with DataONE. " + cn.getNodeBaseServiceUrl());
306
	            NodeReference mnode = cn.register(session, node);
306
	            NodeReference mnodeRef = cn.register(session, node);
307
	            // save this assigned node id
308
	            PropertyService.setPropertyNoPersist("dataone.memberNodeId", mnodeRef.getValue());
309
	            
307 310
            }
308 311
        } catch (ServiceFailure e) {
309 312
            logMetacat.warn("Could not register as node with DataONE (" + e.getCode() + "/" + e.getDetail_code() + "): " + e.getDescription());
......
319 322
            logMetacat.warn("Could not register as node with DataONE (" + e.getCode() + "/" + e.getDetail_code() + "): " + e.getDescription());
320 323
        } catch (PropertyNotFoundException e) {
321 324
            logMetacat.warn("Could not find the location for client certificates: " + e.getMessage());
322
        }
325
        } catch (GeneralPropertyException e) {
326
            logMetacat.warn("Could not set the assigned node id: " + e.getMessage());
327
		}
323 328
	}
324 329

  
325 330
	/**

Also available in: Unified diff