Project

General

Profile

Revision 6651

Added by Chris Jones about 9 years ago

Send the correct node id (the target node) when calling setReplicationStatus()

View differences:

src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
431 431
            "\tSource NodeReference ="  + sourceNode.getValue());
432 432
        
433 433
        boolean result = false;
434

  
434
        String nodeIdStr  = null;
435
        NodeReference nodeId = null;
436
        
437
        // get the local node id
438
        try {
439
            nodeIdStr = PropertyService.getProperty("dataone.memberNodeId");
440
            nodeId = new NodeReference();
441
            nodeId.setValue(nodeIdStr);
442
            
443
        } catch (PropertyNotFoundException e1) {
444
            logMetacat.error("Couldn't get dataone.memberNodeId property: " + 
445
                e1.getMessage());
446
            
447
        }
435 448
        // TODO: check credentials
436 449

  
437 450
        // get the referenced object
......
477 490

  
478 491
        try {
479 492
          // call the CN as the MN to set the replication status
480
            cn.setReplicationStatus(thisNodeSession, pid, sourceNode, ReplicationStatus.COMPLETED, serialVersion);
493
            cn.setReplicationStatus(thisNodeSession, pid, nodeId, ReplicationStatus.COMPLETED, serialVersion);
481 494
            
482 495
        } catch (InvalidToken e) {
483 496
            // TODO Auto-generated catch block

Also available in: Unified diff