@Override
	public void update(ResourceSnapshot resource, DataSet content, WriteSession session) throws InconsistentContentException, UnknownResourceException {
		DataSet dataSet = get(resource);
		logDebug(resource, "Enforcing consistency...");
		enforceConsistency(resource,content,dataSet);
		try {
			logDebug(resource,"Persisting new state:%n%s",content);
			add(resource.name(),content);
			session.modify(resource);
			session.saveChanges();
		} catch (Exception e) {
			// Recover if failed
			add(resource.name(),dataSet);
			logError(resource,e,"Something went wrong",e);
			throw new ApplicationRuntimeException("Update failed",e);
		}
	}
@Override
	public void update(ResourceSnapshot resource, DataSet content, WriteSession session) throws InconsistentContentException, UnknownResourceException {
		DataSet dataSet = get(resource);
		logDebug(resource, "Enforcing consistency...");
		enforceConsistency(resource,content,dataSet);
		try {
			logDebug(resource,"Persisting new state:%n%s",content);
			add(resource.name(),content);
			session.modify(resource);
			session.saveChanges();
		} catch (Exception e) {
			
			add(resource.name(),dataSet);
			logError(resource,e,"Something went wrong",e);
			throw new ApplicationRuntimeException("Update failed",e);
		}
	}
@ Override public void update ( ResourceSnapshot resource , DataSet content , WriteSession session ) throws InconsistentContentException , UnknownResourceException { DataSet dataSet = get ( resource ) ; logDebug ( resource , "Enforcing consistency..." ) ; enforceConsistency ( resource , content , dataSet ) ; try { logDebug ( resource , "Persisting new state:%n%s" , content ) ; add ( resource . name ( ) , content ) ; session . modify ( resource ) ; session . saveChanges ( ) ; } catch ( Exception e ) { // Recover if failed add ( resource . name ( ) , dataSet ) ; logError ( resource , e , "Something went wrong" , e ) ; throw new ApplicationRuntimeException ( "Update failed" , e ) ; } }
{@inheritDoc} <br>

Update a person resource.
{ @inheritDoc } <br >