Index: src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java
===================================================================
--- src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java	(revision 6571)
+++ src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java	(revision 6572)
@@ -253,7 +253,9 @@
 
     // save the sysmeta
     try {
+      // lock and unlock of the pid happens in the subclass
     	HazelcastService.getInstance().getSystemMetadataMap().put(sysmeta.getIdentifier(), sysmeta);
+    	
     } catch (Exception e) {
     	logMetacat.error("Problem creating system metadata: " + pid.getValue(), e);
         throw new ServiceFailure("1190", e.getMessage());
@@ -506,83 +508,28 @@
    * @throws NotImplemented
    */
   public SystemMetadata getSystemMetadata(Session session, Identifier pid)
-    throws InvalidToken, ServiceFailure, NotAuthorized, NotFound,
-    InvalidRequest, NotImplemented {
-
-    if (!isAuthorized(session, pid, Permission.READ)) {
-      throw new NotAuthorized("1400", Permission.READ + " not allowed on " + pid.getValue());  
-    }
-    SystemMetadata systemMetadata = null;
-    try {
-      systemMetadata = IdentifierManager.getInstance().getSystemMetadata(pid.getValue());
-    } catch (McdbDocNotFoundException e) {
-      throw new NotFound("1420", "No record found for: " + pid.getValue());
-    }
+      throws InvalidToken, ServiceFailure, NotAuthorized, NotFound,
+      InvalidRequest, NotImplemented {
+      
+      if (!isAuthorized(session, pid, Permission.READ)) {
+        throw new NotAuthorized("1400", Permission.READ + " not allowed on " + pid.getValue());  
+      }
+      SystemMetadata systemMetadata = null;
+      try {
+        HazelcastService.getInstance().getSystemMetadataMap().lock(pid);
+        systemMetadata = HazelcastService.getInstance().getSystemMetadataMap().get(pid);
+        HazelcastService.getInstance().getSystemMetadataMap().unlock(pid);
+        
+      } catch (Exception e) {
+        // convert hazelcast RuntimeException to NotFound
+        throw new NotFound("1420", "No record found for: " + pid.getValue());
+        
+      }
     
     return systemMetadata;
   }
-   
+     
   /**
-   * Set access for a given object using the object identifier and a Subject
-   * under a given Session.
-   * 
-   * @param session - the Session object containing the credentials for the Subject
-   * @param pid - the object identifier for the given object to apply the policy
-   * @param policy - the access policy to be applied
-   * 
-   * @return true if the application of the policy succeeds
-   * @throws InvalidToken
-   * @throws ServiceFailure
-   * @throws NotFound
-   * @throws NotAuthorized
-   * @throws NotImplemented
-   * @throws InvalidRequest
-   */
-  public boolean setAccessPolicy(Session session, Identifier pid, 
-    AccessPolicy accessPolicy) 
-    throws InvalidToken, ServiceFailure, NotFound, NotAuthorized, 
-    NotImplemented, InvalidRequest {
-
-    boolean success = false;
-    
-    // get the subject
-    Subject subject = session.getSubject();
-    // get the system metadata
-    String pidStr = pid.getValue();
-    
-    // are we allowed to do this?
-    if (!isAuthorized(session, pid, Permission.CHANGE_PERMISSION)) {
-      throw new NotAuthorized("4420", "not allowed by " + subject.getValue() + " on " + pidStr);  
-    }
-    
-    SystemMetadata systemMetadata = null;
-    try {
-      systemMetadata = IdentifierManager.getInstance().getSystemMetadata(pidStr);
-    } catch (McdbDocNotFoundException e) {
-      throw new NotFound("4400", "No record found for: " + pid);
-    }
-        
-    // set the access policy
-    systemMetadata.setAccessPolicy(accessPolicy);
-    
-    // update the metadata
-    try {
-    	HazelcastService.getInstance().getSystemMetadataMap().lock(systemMetadata.getIdentifier());
-    	HazelcastService.getInstance().getSystemMetadataMap().put(systemMetadata.getIdentifier(), systemMetadata);
-    	HazelcastService.getInstance().getSystemMetadataMap().unlock(systemMetadata.getIdentifier());
-	} catch (Exception e) {
-		throw new ServiceFailure("4430", e.getMessage());
-	} finally {
-		HazelcastService.getInstance().getSystemMetadataMap().unlock(systemMetadata.getIdentifier());
-	}
-    
-    // TODO: how do we know if the map was persisted?
-    success = true;
-    
-    return success;
-  }
-  
-  /**
    * Test if the user identified by the provided token has authorization 
    * for operation on the specified object.
    * 
@@ -956,19 +903,22 @@
    * Insert a systemMetadata document and return its localId
    */
   protected void insertSystemMetadata(SystemMetadata sysmeta) 
-    throws ServiceFailure {
-    
-  	logMetacat.debug("Starting to insert SystemMetadata...");
-    sysmeta.setDateSysMetadataModified(new Date());
-    logMetacat.debug("Inserting new system metadata with modified date " + 
-        sysmeta.getDateSysMetadataModified());
-
-    //insert the system metadata
-    try {
-    	HazelcastService.getInstance().getSystemMetadataMap().put(sysmeta.getIdentifier(), sysmeta);
-    } catch (Exception e) {
-        throw new ServiceFailure("1190", e.getMessage());
-	}  
+      throws ServiceFailure {
+      
+  	  logMetacat.debug("Starting to insert SystemMetadata...");
+      sysmeta.setDateSysMetadataModified(Calendar.getInstance().getTime());
+      logMetacat.debug("Inserting new system metadata with modified date " + 
+          sysmeta.getDateSysMetadataModified());
+      
+      //insert the system metadata
+      try {
+        // note: the calling subclass handles the map hazelcast lock/unlock
+      	HazelcastService.getInstance().getSystemMetadataMap().put(sysmeta.getIdentifier(), sysmeta);
+      	
+      } catch (Exception e) {
+          throw new ServiceFailure("1190", e.getMessage());
+          
+	    }  
   }
 
   /**
