code: @Override
      public boolean updatePolicy(String name, String newDocument)
              throws PolicyIndexException {
          log.debug("Updating document: " + name);
  
          // FIXME:  DBXML container.updateDocument is failing to update document metadata (this tested on DBXML ver 2.5.13)
          // specifically anySubject, anyResource metadata elements are not changing
          // if Subjects and Resources elements are added/deleted from document.
  
  
          // FIXME: this will acquire and release write locks for each operation
          // should instead do this just once for an update
          deletePolicy(name);
          addPolicy(name, newDocument);
  
          // FIXME:  code below would also need updating for transactions, deadlocks, single thread updates...
  
          /* original code below works apart from metadata update not happening
          try {
              utils.validate(newDocument, name);
          } catch (MelcoePDPException e) {
              throw new PolicyIndexException(e);
          }
  
          XmlTransaction txn = null;
  
          try {
              try {
                  txn = dbXmlManager.manager.createTransaction();
                  XmlDocument doc = makeDocument(name, newDocument);
                  dbXmlManager.container.updateDocument(txn, doc, dbXmlManager.updateContext);
                  txn.commit();
                  setLastUpdate(System.currentTimeMillis());
              } catch (XmlException xe) {
                  txn.abort();
                  throw new PolicyIndexException("Error updating document: "
                                                               + name,
                                                       xe);
              }
          } catch (XmlException xe) {
              throw new PolicyIndexException("Error aborting transaction: "
                      + xe.getMessage(), xe);
          }
          */
  
          return true;
      }
docs: /*
  (non-Javadoc)
  @see
  org.fcrepo.server.security.xacml.pdp.data.PolicyDataManager#updatePolicy
  (java.lang.String, java.lang.String)