Project

General

Profile

« Previous | Next » 

Revision 6447

rely on Hazelcast to store the SystemMetadata locally for the node. Entry event listeners store the shared system metadata on their local node when alerted. TODO: remove old replication code that included system metadata xml when replicating scimeta and data

View differences:

D1NodeService.java
76 76
import edu.ucsb.nceas.metacat.IdentifierManager;
77 77
import edu.ucsb.nceas.metacat.McdbDocNotFoundException;
78 78
import edu.ucsb.nceas.metacat.MetacatHandler;
79
import edu.ucsb.nceas.metacat.dataone.hazelcast.HazelcastService;
79 80
import edu.ucsb.nceas.metacat.properties.PropertyService;
80 81
import edu.ucsb.nceas.metacat.replication.ForceReplicationHandler;
81 82
import edu.ucsb.nceas.metacat.util.SystemUtil;
......
241 242
    }
242 243

  
243 244
    // save the sysmeta
244
    try {
245
		IdentifierManager.getInstance().createSystemMetadata(sysmeta);
246
	} catch (McdbDocNotFoundException e) {
247
	    throw new ServiceFailure("1190", "Unable to save System Metadata for the object. ");
248
	}
245
    HazelcastService.getInstance().getSystemMetadataMap().put(sysmeta.getIdentifier(), sysmeta);
249 246
    
250 247
    // setting the resulting identifier failed
251 248
    if (localId == null ) {
......
946 943
        sysmeta.getDateSysMetadataModified());
947 944

  
948 945
    //insert the system metadata
949
	try {
950
		IdentifierManager.getInstance().createSystemMetadata(sysmeta);
951
	  
952
	} catch (McdbDocNotFoundException e) {
953
      throw new ServiceFailure("1030", "Error inserting system metadata: " + 
954
      	e.getClass() + ": " + e.getMessage());
946
    HazelcastService.getInstance().getSystemMetadataMap().put(sysmeta.getIdentifier(), sysmeta);
955 947
      
956
    }
957
      
958 948
  }
959 949

  
960 950
  /**

Also available in: Unified diff